Skip to content

Commit

Permalink
Version 5.2.0, Revision 23241, Hash 2243a00
Browse files Browse the repository at this point in the history
MODIFIED *  configure include/version/version.m4 bse/K_kernel.F bse/K_solvers.F

Changes:
- [yambo] New mode, controlled with "write_all_steps" is activated also
  in presence of solvers. In such case, during the calculation of the
  kernel the blocks are not kept in memory, and only later, when
  entering the solver, the whole kernel is loaded into memory

Patch sent by:  Davide Sangalli <davide.sangalli@gmail.com>
  • Loading branch information
sangallidavide committed Jun 16, 2024
1 parent 2243a00 commit 10f7cbb
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 22 deletions.
22 changes: 11 additions & 11 deletions configure
Original file line number Diff line number Diff line change
@@ -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 <yambo@yambo-code.org>.
#
Expand Down Expand Up @@ -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=''

Expand Down Expand Up @@ -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]...
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"



Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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\\"
Expand Down
6 changes: 3 additions & 3 deletions include/version/version.m4
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
13 changes: 7 additions & 6 deletions src/bse/K_kernel.F
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss)
! K = <2V-W> for n_spin=1; K=<V-W> 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
Expand All @@ -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
Expand Down Expand Up @@ -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)
!
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
9 changes: 7 additions & 2 deletions src/bse/K_solvers.F
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
!
Expand Down

0 comments on commit 10f7cbb

Please sign in to comment.