diff --git a/configure b/configure index 894e41728b..99c67e5a4b 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.23240 h.89334754e0. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23241 h.2243a00016. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23240 h.89334754e0' -PACKAGE_STRING='Yambo 5.2.0 r.23240 h.89334754e0' +PACKAGE_VERSION='5.2.0 r.23241 h.2243a00016' +PACKAGE_STRING='Yambo 5.2.0 r.23241 h.2243a00016' 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.23240 h.89334754e0 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23241 h.2243a00016 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.23240 h.89334754e0:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23241 h.2243a00016:";; 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.23240 h.89334754e0 +Yambo configure 5.2.0 r.23241 h.2243a00016 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.23240 h.89334754e0, which was +It was created by Yambo $as_me 5.2.0 r.23241 h.2243a00016, 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="23240" -SHASH="89334754e0" +SREVISION="23241" +SHASH="2243a00016" @@ -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.23240 h.89334754e0, which was +This file was extended by Yambo $as_me 5.2.0 r.23241 h.2243a00016, 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.23240 h.89334754e0 +Yambo config.status 5.2.0 r.23241 h.2243a00016 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 41e5835d6a..93428adb5c 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23240 h.89334754e0, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23241 h.2243a00016, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23240" -SHASH="89334754e0" +SREVISION="23241" +SHASH="2243a00016" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 1d81345074..8c1b0fe975 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -10,7 +10,6 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! K = <2V-W> for n_spin=1; K= for n_spin>1 ! use pars, ONLY:SP,schlen,pi,cZERO,cI - use drivers, ONLY:l_bss use LOGO, ONLY:pickup_a_random use drivers, ONLY:l_bs_fxc,l_tddft,l_rim_w use frequency, ONLY:w_samp @@ -33,12 +32,12 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) & 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,BSK_IO_mode,BSK_IO_sum_value,& -& BS_nT_grps,BS_blks_free,l_BS_ares_from_res,& +& BS_nT_grps,BS_blks_free,l_BS_ares_from_res,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 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 IO_m, ONLY:REP,OP_WR,RD,WR,WR_CL,OP_APP,io_BS_K,deliver_IO_error_message use TDDFT, ONLY:FXC_K_diagonal,F_xc_gspace,FXC_n_g_corr,io_BS_Fxc, & & FXC_mode,tddft_wf_t,l_Fxc_from_Vxc use xc_functionals,ONLY:V_xc,F_xc,F_xc_mat,magn,XC_potential_driver @@ -396,7 +395,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! if (BS_blk_done(i_block)) m_steps=m_steps-i_steps ! - if (.not. (l_bss.or.l_partial_kernel_loaded) ) then + if ( (.not.l_partial_kernel_loaded) .and. io_BS_K .and. l_write_kernel_step) then ! if (BS_blk_done(i_block) .or. BS_blk_todo) call K_block_free(i_block) ! @@ -463,7 +462,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) 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") - if (.not.l_bss) call K_block_free(i_block) + if (io_BS_K.and.l_write_kernel_step) call K_block_free(i_block) endif #endif cycle @@ -810,7 +809,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) call io_control(ACTION=WR,COM=REP,SEC=(/i_block+1/),ID=ID) io_BS_err=io_BS(iq,X,ID) #endif - if (.not.l_bss) call K_block_free(i_block) + if (io_BS_K.and.l_write_kernel_step) call K_block_free(i_block) endif ! call live_timing(steps=i_steps) @@ -876,6 +875,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) 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.) + ! In this mode the blocks are written to disk after each step and the memory is freed + if (io_BS_K.and.l_write_kernel_step) BS_K_has_been_calculated_loaded=.false. #else call io_control(ACTION=WR_CL,COM=REP,SEC=(/n_BS_blks+2/),ID=ID) io_BS_err=io_BS(iq,X,ID) diff --git a/src/bse/K_solvers.F b/src/bse/K_solvers.F index 9408d1313f..370fbfa78b 100644 --- a/src/bse/K_solvers.F +++ b/src/bse/K_solvers.F @@ -31,9 +31,14 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) type(w_samp) ::W_bss integer ::iq ! - ! Check first if the BS database has been calculated/loaded in K.F + integer :: ID(3) + logical :: l_partial_kernel_loaded ! - if (.not. BS_K_has_been_calculated_loaded ) return + ! 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,ID(1),ID(2),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") ! call section('-','BSE solver(s) @q'//trim(intc(iq))) !