Skip to content

Commit

Permalink
Coded first version for linking automatically ydiago library from Mu…
Browse files Browse the repository at this point in the history
…rali

Version 5.2.0,  Revision 23111,  Hash 7456c06

MODIFIED *  .gitignore config/configure.ac config/m4/acx_report.m4 config/mk/global/actions/compile_external_libraries.mk config/mk/global/actions/download_external_libraries.mk config/mk/global/defs.mk.in config/report.in config/setup.in configure include/version/version.m4 lib/archive/Makefile.loc lib/archive/git.list.in lib/archive/package.list sbin/compilation/libraries.sh

NEW *  config/m4/yambo_diago.m4 lib/ydiago/Makefile.loc lib/ydiago/make_ydiago.inc.in

Bugs:
-

Additions:
-

Changes:
-

Patch sent by:  Davide Sangalli <[email protected]>
  • Loading branch information
sangallidavide committed Jul 26, 2024
1 parent 7456c06 commit eb83226
Show file tree
Hide file tree
Showing 17 changed files with 244 additions and 19 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ include/system/*
lib/install/make_iotk.inc
lib/iotk/make.sys
lib/iotk/make_iotk.inc
lib/ydiago/make_ydiago.inc
lib/yambo
lib/*/*stamp
lib/*/package-installed
Expand All @@ -78,6 +79,7 @@ lib/*/petsc-*
lib/*/slepc-*
lib/*/futile*
lib/*/yaml*
lib/*/Ydiago*
lib/hdf5/hdf5*
lib/external/*
compile.sh
Expand Down
2 changes: 2 additions & 0 deletions config/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ AC_CONFIG_SRCDIR([driver/yambo.F])
m4_include([config/m4/yambo_remote_compilation_setup.m4])
m4_include([config/m4/yambo_specific.m4])
m4_include([config/m4/yambo_driver.m4])
m4_include([config/m4/yambo_diago.m4])
#
# General
#
Expand Down Expand Up @@ -238,6 +239,7 @@ AC_LANG_PUSH(Fortran)
# ============================================================================
# Yambo Libs
AC_YDRIVER
AC_YDIAGO
# ============================================================================
# YDB/YAMBOpy
ACX_SCRIPTS
Expand Down
3 changes: 3 additions & 0 deletions config/m4/acx_report.m4
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ AC_SUBST(MPI_info)
#
# STRIPE [LIB] from paths
#
ACX_STRIPE_SUBPATH($YDIAGO_LIBS,"LIB")
YDIAGO_LIBS_R=$STRIPE
#
ACX_STRIPE_SUBPATH($IOTK_LIBS,"LIB")
IOTK_LIBS_R=$STRIPE
ACX_STRIPE_SUBPATH($IOTK_INCS,"INC")
Expand Down
23 changes: 23 additions & 0 deletions config/m4/yambo_diago.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#
# License-Identifier: GPL
#
# Copyright (C) 2016 The Yambo Team
#
# Authors (see AUTHORS file for details): AM
#
AC_DEFUN([AC_YDIAGO],[
#
AC_ARG_WITH(ydiago-branch,[AS_HELP_STRING([--with-ydiago-branch=<branch>],[Use the <branch> 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";
else
ydiago_check="G";
fi
YDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libydiago.a"
AC_SUBST(YDIAGO_LIBS)
AC_SUBST(ydiago_check)
AC_SUBST(with_ydiago_branch)
])
2 changes: 2 additions & 0 deletions config/mk/global/actions/compile_external_libraries.mk
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +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
2 changes: 2 additions & 0 deletions config/mk/global/actions/download_external_libraries.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ slepc-dl:
@LIB2DO="slepc"; $(get_external_libraries)
Ydriver-dl:
@LIB2DO="Ydriver"; $(get_external_libraries)
Ydiago-dl:
@LIB2DO="Ydiago"; $(get_external_libraries)
1 change: 1 addition & 0 deletions config/mk/global/defs.mk.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ do_e2y = @compile_e2y@
do_libxc = @compile_libxc@
do_petsc = @compile_petsc@
do_slepc = @compile_slepc@
do_ydiago = yes
shell = @SHELL@
package_bugreport = @PACKAGE_BUGREPORT@
prefix = @prefix@
Expand Down
1 change: 1 addition & 0 deletions config/report.in
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
# > OTHERs
#
# [@Ydriver_check@] Ydriver : @Ydriver_LIB@
# [@ydiago_check@] Ydiago : @YDIAGO_LIBS_R@
#
# [@LIBXC_check@] LibXC : @LIBXC_LIBS_R@
# @LIBXC_INCS_R@
Expand Down
1 change: 1 addition & 0 deletions config/setup.in
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ lfutile = @FUTILE_LIBS@
ifutile = @FUTILE_INCS@
letsf = @ETSF_LIBS@
ietsf = @ETSF_INCS@
lydiago = @YDIAGO_LIBS@
idriver = @DRIVER_INCS@
mpipath = @MPI_PATH@
#
Expand Down
79 changes: 65 additions & 14 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.23096 h.f147e08b32.
# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23111 h.7456c06ea5.
#
# 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.23096 h.f147e08b32'
PACKAGE_STRING='Yambo 5.2.0 r.23096 h.f147e08b32'
PACKAGE_VERSION='5.2.0 r.23111 h.7456c06ea5'
PACKAGE_STRING='Yambo 5.2.0 r.23111 h.7456c06ea5'
PACKAGE_BUGREPORT='[email protected]'
PACKAGE_URL=''

Expand Down Expand Up @@ -808,6 +808,9 @@ internal_blas
FLIBS
YDB_dir
GIT
with_ydiago_branch
ydiago_check
YDIAGO_LIBS
with_ydriver_branch
DRIVER_INCS
Ydriver_check
Expand Down Expand Up @@ -964,6 +967,7 @@ with_mpi_path
with_mpi_libdir
with_mpi_includedir
with_ydriver_branch
with_ydiago_branch
enable_ydb
with_blas_libs
enable_int_linalg
Expand Down Expand Up @@ -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.23096 h.f147e08b32 to adapt to many kinds of systems.
\`configure' configures Yambo 5.2.0 r.23111 h.7456c06ea5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -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.23096 h.f147e08b32:";;
short | recursive ) echo "Configuration of Yambo 5.2.0 r.23111 h.7456c06ea5:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1732,6 +1736,7 @@ Optional Packages:
--with-mpi-includedir=<path> Path to the MPI include directory
--with-ydriver-branch=<branch>
Use the <branch> of the ydriver repository.
--with-ydiago-branch=<branch> Use the <branch> of the ydiago repository.
--with-blas-libs=<libs> Use BLAS libraries <libs>
--with-lapack-libs=<libs> Use LAPACK libraries <libs>
--with-fft-libs=<libs> Link to FFT libraries
Expand Down Expand Up @@ -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.23096 h.f147e08b32
Yambo configure 5.2.0 r.23111 h.7456c06ea5
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
Expand Down Expand Up @@ -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.23096 h.f147e08b32, which was
It was created by Yambo $as_me 5.2.0 r.23111 h.7456c06ea5, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
Expand Down Expand Up @@ -3263,8 +3268,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
SVERSION="5"
SSUBVERSION="2"
SPATCHLEVEL="0"
SREVISION="23096"
SHASH="f147e08b32"
SREVISION="23111"
SHASH="7456c06ea5"



Expand Down Expand Up @@ -4625,6 +4630,15 @@ fi
#


#
# License-Identifier: GPL
#
# Copyright (C) 2016 The Yambo Team
#
# Authors (see AUTHORS file for details): AM
#


#
# General
#
Expand Down Expand Up @@ -10309,6 +10323,31 @@ fi





#

# 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"




# ============================================================================
# YDB/YAMBOpy

Expand Down Expand Up @@ -15410,7 +15449,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
Expand All @@ -15432,12 +15471,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
Expand Down Expand Up @@ -15679,6 +15718,17 @@ fi
# STRIPE [LIB] from paths
#

TMP1=`echo $YDIAGO_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

YDIAGO_LIBS_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"`
Expand Down Expand Up @@ -16578,7 +16628,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.23096 h.f147e08b32, which was
This file was extended by Yambo $as_me 5.2.0 r.23111 h.7456c06ea5, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -16642,7 +16692,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.23096 h.f147e08b32
Yambo config.status 5.2.0 r.23111 h.7456c06ea5
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
Expand Down Expand Up @@ -16763,6 +16813,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" ;;
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.23096 h.f147e08b32, [email protected])
AC_INIT(Yambo, 5.2.0 r.23111 h.7456c06ea5, [email protected])
SVERSION="5"
SSUBVERSION="2"
SPATCHLEVEL="0"
SREVISION="23096"
SHASH="f147e08b32"
SREVISION="23111"
SHASH="7456c06ea5"
AC_SUBST(SVERSION)
AC_SUBST(SSUBVERSION)
AC_SUBST(SPATCHLEVEL)
Expand Down
3 changes: 3 additions & 0 deletions lib/archive/Makefile.loc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ 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:
@+URL="$(url_Ydiago)" ; GBRANCH="$(branch_Ydiago)" ; GIT="$(git_Ydiago)"; LIB="$(pkgname_Ydiago)"; $(call getsrc_git,"Ydiago");
#
# Libraries (archives)
#
Expand Down Expand Up @@ -67,6 +69,7 @@ clean_git_folders:
clean_tgz:
if test ! -e keep-extlibs-stamp ; then \
if test -s $(tarball_Ydriver) && test "$(keep_Ydriver)" != "yes" ; then rm $(tarball_Ydriver) ; fi ; \
if test -s $(tarball_Ydiago) && test "$(keep_Ydiago)" != "yes" ; then rm $(tarball_Ydiago) ; 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 ; \
Expand Down
3 changes: 3 additions & 0 deletions lib/archive/git.list.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
#
[email protected]:yambo-code/Ydriver.git
branch_Ydriver=@with_ydriver_branch@

[email protected]:yambo-code/Ydiago.git
branch_Ydiago=@with_ydiago_branch@
7 changes: 6 additions & 1 deletion lib/archive/package.list
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#
# Libs list
#
EXT_LIBS= yaml futile iotk hdf5 netcdf netcdff etsf_io libxc lapack blacs scalapack petsc slepc fftw fftqe Ydriver
EXT_LIBS= yaml futile iotk hdf5 netcdf netcdff etsf_io libxc lapack blacs scalapack petsc slepc fftw fftqe Ydriver Ydiago
#
# storing options
#
keep_Ydriver=yes
keep_Ydriago=yes
keep_iotk=yes
keep_netcdf=no
keep_netcdff=no
Expand All @@ -25,6 +26,7 @@ keep_hdf5=no
# package versions
#
version_Ydriver=1.4
version_Ydiago=0.1.0
version_iotk=y1.2.2
version_netcdf=4.9.0
version_netcdff=4.6.0
Expand All @@ -44,6 +46,7 @@ version_futile=missing
# package names
#
pkgname_Ydriver=Ydriver-$(version_Ydriver)
pkgname_Ydiago=Ydiago-$(version_Ydiago)
pkgname_iotk=iotk-$(version_iotk)
pkgname_netcdf=netcdf-c-$(version_netcdf)
pkgname_netcdff=netcdf-fortran-$(version_netcdff)
Expand All @@ -63,6 +66,7 @@ pkgname_futile=futile-yambo
# tarball names
#
tarball_Ydriver=$(version_Ydriver).tar.gz
tarball_Ydiago=$(version_Ydiago).tar.gz
tarball_iotk=$(pkgname_iotk).tar.gz
tarball_netcdf=v$(version_netcdf).tar.gz
tarball_netcdff=v$(version_netcdff).tar.gz
Expand All @@ -82,6 +86,7 @@ tarball_futile=$(pkgname_futile).tar.gz
# External URL's on Github
#
url_Ydriver=https://github.com/yambo-code/Ydriver/archive/refs/tags/$(tarball_Ydriver)
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)
Expand Down
Loading

0 comments on commit eb83226

Please sign in to comment.