Skip to content

Commit

Permalink
Merge pull request #5 from sangallidavide/tech-ydiago
Browse files Browse the repository at this point in the history
Tech ydiago
  • Loading branch information
muralidhar-nalabothula authored Sep 4, 2024
2 parents 683ea1e + aa3b0f6 commit 6d299c8
Show file tree
Hide file tree
Showing 18 changed files with 63 additions and 45 deletions.
4 changes: 2 additions & 2 deletions config/m4/acx_report.m4
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ 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)
Expand Down
11 changes: 11 additions & 0 deletions config/m4/acx_stripe_subpath.m4
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,14 @@ if [[ -z "${1// }" ]]; then
STRIPE="$STRIPE ($2)"
fi
])

AC_DEFUN([ACX_STRIPE_SUBPATH2],
[
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'`
if [[ -z "${1// }" ]]; then
STRIPE="$STRIPE ($2)"
fi
])
6 changes: 4 additions & 2 deletions config/m4/yambo_diago.m4
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ if test x"$with_ydiago_branch" = "xnone"; then
else
ydiago_check="G";
fi
YDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libydiago.a"
YDIAGO_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/include/"
#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/"
AC_SUBST(YDIAGO_LIBS)
AC_SUBST(YDIAGO_INCS)
Expand Down
4 changes: 2 additions & 2 deletions config/mk/global/actions/compile_external_libraries.mk
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,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:
@if test "$(do_ydiago)" = yes ; then LIBS="ydiago" ; BASE="lib"; $(MAKE) $(MAKEFLAGS) Ydiago-dl; $(mk_external_lib); fi
ydiago:
@if test "$(do_ydiago)" = yes ; then LIBS="ydiago" ; BASE="lib"; $(MAKE) $(MAKEFLAGS) ydiago-dl; $(mk_external_lib); fi
4 changes: 2 additions & 2 deletions config/mk/global/actions/download_external_libraries.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ slepc-dl:
@LIB2DO="slepc"; $(get_external_libraries)
Ydriver-dl:
@LIB2DO="Ydriver"; $(get_external_libraries)
Ydiago-dl:
@LIB2DO="Ydiago"; $(get_external_libraries)
ydiago-dl:
@LIB2DO="ydiago"; $(get_external_libraries)
Empty file.
38 changes: 21 additions & 17 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.23336 h.b7fb28602c.
# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23344 h.008fc9e543.
#
# Report bugs to <[email protected]>.
#
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.23336 h.b7fb28602c'
PACKAGE_STRING='Yambo 5.2.0 r.23336 h.b7fb28602c'
PACKAGE_VERSION='5.2.0 r.23344 h.008fc9e543'
PACKAGE_STRING='Yambo 5.2.0 r.23344 h.008fc9e543'
PACKAGE_BUGREPORT='[email protected]'
PACKAGE_URL=''

Expand Down Expand Up @@ -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.2.0 r.23336 h.b7fb28602c to adapt to many kinds of systems.
\`configure' configures Yambo 5.2.0 r.23344 h.008fc9e543 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1677,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.23336 h.b7fb28602c:";;
short | recursive ) echo "Configuration of Yambo 5.2.0 r.23344 h.008fc9e543:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1890,7 +1890,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
Yambo configure 5.2.0 r.23336 h.b7fb28602c
Yambo configure 5.2.0 r.23344 h.008fc9e543
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
Expand Down Expand Up @@ -2519,7 +2519,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.23336 h.b7fb28602c, which was
It was created by Yambo $as_me 5.2.0 r.23344 h.008fc9e543, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
Expand Down Expand Up @@ -3277,8 +3277,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
SVERSION="5"
SSUBVERSION="2"
SPATCHLEVEL="0"
SREVISION="23336"
SHASH="b7fb28602c"
SREVISION="23344"
SHASH="008fc9e543"



Expand Down Expand Up @@ -4868,6 +4868,8 @@ fi
#




#
# License-Identifier: GPL
#
Expand Down Expand Up @@ -10352,8 +10354,10 @@ if test x"$with_ydiago_branch" = "xnone"; then
else
ydiago_check="G";
fi
YDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libydiago.a"
YDIAGO_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/include/"
#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/"



Expand Down Expand Up @@ -15755,8 +15759,8 @@ fi
#

TMP1=`echo $YDIAGO_LIBS | sed 's/\//+/g'`
TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'`
TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/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")"
Expand All @@ -15765,8 +15769,8 @@ fi
YDIAGO_LIBS_R=$STRIPE

TMP1=`echo $YDIAGO_INCS | sed 's/\//+/g'`
TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'`
TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/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")"
Expand Down Expand Up @@ -16676,7 +16680,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.23336 h.b7fb28602c, which was
This file was extended by Yambo $as_me 5.2.0 r.23344 h.008fc9e543, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -16740,7 +16744,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.23336 h.b7fb28602c
Yambo config.status 5.2.0 r.23344 h.008fc9e543
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.23336 h.b7fb28602c, [email protected])
AC_INIT(Yambo, 5.2.0 r.23344 h.008fc9e543, [email protected])
SVERSION="5"
SSUBVERSION="2"
SPATCHLEVEL="0"
SREVISION="23336"
SHASH="b7fb28602c"
SREVISION="23344"
SHASH="008fc9e543"
AC_SUBST(SVERSION)
AC_SUBST(SSUBVERSION)
AC_SUBST(SPATCHLEVEL)
Expand Down
2 changes: 1 addition & 1 deletion lib/archive/Makefile.loc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ all: $(EXT_LIBS)
#
Ydriver:
@+URL="$(url_Ydriver)" ; GBRANCH="$(branch_Ydriver)" ; GIT="$(git_Ydriver)"; LIB="$(pkgname_Ydriver)"; $(call getsrc_git,"Ydriver"); $(call copy_driver,"Ydriver")
Ydiago:
ydiago:
@+URL="$(url_Ydiago)" ; GBRANCH="$(branch_Ydiago)" ; GIT="$(git_Ydiago)"; LIB="$(pkgname_Ydiago)"; $(call getsrc_git,"Ydiago");
#
# Libraries (archives)
Expand Down
2 changes: 1 addition & 1 deletion lib/archive/package.list
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Libs list
#
EXT_LIBS= yaml futile iotk hdf5 netcdf netcdff etsf_io libxc lapack blacs scalapack petsc slepc fftw fftqe Ydriver Ydiago
EXT_LIBS= yaml futile iotk hdf5 netcdf netcdff etsf_io libxc lapack blacs scalapack petsc slepc fftw fftqe Ydriver ydiago
#
# storing options
#
Expand Down
8 changes: 5 additions & 3 deletions lib/ydiago/Makefile.loc
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ 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 $(LIBPATH)/lib/libydiago.a ;\
cp ${compdir}/lib/ydiago/$(PACKAGE)/src/ydiago_interface.mod $(LIBPATH)/include/ ;\
chmod +x $(LIBPATH)/lib/libydiago.a ; \
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 ; \
touch ${compdir}/config/stamps_and_lists/libydiago.a.stamp;\
echo ydiago_interface >> ${compdir}/src/bse/modules.list;\
touch installed.stamp;\
fi
#
Expand Down
2 changes: 1 addition & 1 deletion lib/ydiago/make_ydiago.inc.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ FC = @FC@
AR = @AR@

CFLAGS = @CFLAGS@ #-g -fsanitize=address -fno-omit-frame-pointer
YAMBO_FLAGS = #-D_ELPA -D_DOUBLE -D_CUDA -D_OPENMP
YAMBO_FLAGS = @def_mpi@ @def_scalapack@ @def_compiler@ @def_dp@ @def_openmp@ @def_cuda@ #-D_ELPA -D_DOUBLE -D_CUDA -D_OPENMP
ELPA_INC = # include directory of elpa

#
Expand Down
7 changes: 3 additions & 4 deletions src/bse/DOUBLE_project.dep
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,21 @@
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
K_diago_right_residuals.o
K_diagonal.o
K_diagonalize.o
K_dipoles.o
K_dot_product.o
K_driver.o
K_driver_init.o
K_eps_interpolate.o
K_exchange_collisions.o
K_exchange_kernel.o
K_fill_block_cyclic.o
K_inversion_Lo.o
K_inversion_do_it_SLK.o
K_inversion_do_it_full.o
Expand All @@ -46,6 +44,7 @@
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
Expand Down
2 changes: 1 addition & 1 deletion src/bse/K_diagonalize.F
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ subroutine K_diagonalize(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 ydiago_interface
!
implicit none
!
Expand Down
2 changes: 1 addition & 1 deletion src/bse/K_fill_block_cyclic.F
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ subroutine K_fill_block_cyclic(i_BS_mat, diago_mat)
use cuda_m, ONLY:have_cuda
!
!use, intrinsic :: iso_c_binding, only: c_ptr
use YDIAGO_interface
use ydiago_interface
!
implicit none
!
Expand Down
4 changes: 2 additions & 2 deletions src/linear_algebra/PARALLEL_HERMITIAN_diagonalization.F
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ subroutine PARALLEL_HERMITIAN_diagonalization(M, V, N, E)
!
if (SLK_ORTHO%coordinate(1)==-1) return
!
call timing('PARALLEL_HERMITIAN_diagonalization',OPR='start')
call timing('PAR_HERM_diago',OPR='start')
!
lwork=-1
lrwork=-1
Expand Down Expand Up @@ -65,7 +65,7 @@ subroutine PARALLEL_HERMITIAN_diagonalization(M, V, N, E)
!
call LINEAR_ALGEBRA_WS_reset(WS)
!
call timing('PARALLEL_HERMITIAN_diagonalization',OPR='stop')
call timing('PAR_HERM_diago',OPR='stop')
!
end subroutine PARALLEL_HERMITIAN_diagonalization

4 changes: 2 additions & 2 deletions src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ subroutine SERIAL_HERMITIAN_diagonalization(n,M,E)
allocate(WS%v_cmplx(1))
!
if(.not.(l_nl_optics.or.l_real_time)) then
call timing('SERIAL_HERMITIAN_diagonalization',OPR='start')
call timing('SER_HERM_diago',OPR='start')
YAMBO_ALLOC(WS%v_real,(max(1,3*n-2)))
else
allocate(WS%v_real(max(1,3*n-2)))
Expand Down Expand Up @@ -58,7 +58,7 @@ subroutine SERIAL_HERMITIAN_diagonalization(n,M,E)
call LINEAR_ALGEBRA_WS_reset(WS)
!
if(.not.(l_nl_optics.or.l_real_time)) then
call timing('SERIAL_HERMITIAN_diagonalization',OPR='stop')
call timing('SER_HERM_diago',OPR='stop')
endif
!
end subroutine
2 changes: 1 addition & 1 deletion src/modules/mod_interfaces.F
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ subroutine K_diagonalize(i_BS_mat, BS_energies, BS_VR, &
use cuda_m, ONLY:have_cuda
use parallel_m, ONLY:MPI_COMM_WORLD
use openmp, ONLY:n_threads_K
use YDIAGO_interface
use ydiago_interface
implicit none
integer, intent(in) :: i_BS_mat
complex(SP), allocatable :: BS_energies(:)
Expand Down

0 comments on commit 6d299c8

Please sign in to comment.