From 3973f1ef61a668a9afa18eb075a5bb7118f73224 Mon Sep 17 00:00:00 2001 From: marini Date: Thu, 28 Sep 2017 12:02:25 +0200 Subject: [PATCH 001/110] Version 4.3.0, Revision 14885, Hash 4fca3bf MODIFIED * config/version.m4 config/version.m4_gpl configure include/version.inc Patch sent by: marini --- config/version.m4 | 6 +++--- config/version.m4_gpl | 6 +++--- configure | 22 +++++++++++----------- include/version.inc | 4 ++-- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/config/version.m4 b/config/version.m4 index 8fbb8e001f..39b4f0593b 100644 --- a/config/version.m4 +++ b/config/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 4.3.0 r.14884 h.2651b42, yambo@yambo-code.org) +AC_INIT(Yambo, 4.3.0 r.14885 h.4fca3bf, yambo@yambo-code.org) SVERSION="4" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="14884" -SHASH="2651b42" +SREVISION="14885" +SHASH="4fca3bf" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/config/version.m4_gpl b/config/version.m4_gpl index f5d28f4fb5..e27b369b58 100644 --- a/config/version.m4_gpl +++ b/config/version.m4_gpl @@ -1,10 +1,10 @@ -AC_INIT(Yambo, 4.3.0 r.108 (based on r.14884 h.2651b42), yambo@yambo-code.org) +AC_INIT(Yambo, 4.3.0 r.108 (based on r.14885 h.4fca3bf), yambo@yambo-code.org) SVERSION="4" SSUBVERSION="3" SPATCHLEVEL="0" SREVISION="108" -BASE_REV="14884" -SHASH="2651b42" +BASE_REV="14885" +SHASH="4fca3bf" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index fde2da191f..414ac1ff59 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 4.3.0 r.14884 h.2651b42. +# Generated by GNU Autoconf 2.69 for Yambo 4.3.0 r.14885 h.4fca3bf. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='4.3.0 r.14884 h.2651b42' -PACKAGE_STRING='Yambo 4.3.0 r.14884 h.2651b42' +PACKAGE_VERSION='4.3.0 r.14885 h.4fca3bf' +PACKAGE_STRING='Yambo 4.3.0 r.14885 h.4fca3bf' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1458,7 +1458,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 4.3.0 r.14884 h.2651b42 to adapt to many kinds of systems. +\`configure' configures Yambo 4.3.0 r.14885 h.4fca3bf to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1523,7 +1523,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 4.3.0 r.14884 h.2651b42:";; + short | recursive ) echo "Configuration of Yambo 4.3.0 r.14885 h.4fca3bf:";; esac cat <<\_ACEOF @@ -1700,7 +1700,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 4.3.0 r.14884 h.2651b42 +Yambo configure 4.3.0 r.14885 h.4fca3bf generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2379,7 +2379,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 4.3.0 r.14884 h.2651b42, which was +It was created by Yambo $as_me 4.3.0 r.14885 h.4fca3bf, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2730,8 +2730,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="4" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="14884" -SHASH="2651b42" +SREVISION="14885" +SHASH="4fca3bf" @@ -13149,7 +13149,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 4.3.0 r.14884 h.2651b42, which was +This file was extended by Yambo $as_me 4.3.0 r.14885 h.4fca3bf, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13211,7 +13211,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 4.3.0 r.14884 h.2651b42 +Yambo config.status 4.3.0 r.14885 h.4fca3bf configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/include/version.inc b/include/version.inc index 196e820e44..592691ff65 100644 --- a/include/version.inc +++ b/include/version.inc @@ -1,6 +1,6 @@ code_version(1)=4 code_version(2)=3 code_version(3)=0 -code_hash='2651b42' -code_revision=14884 +code_hash='4fca3bf' +code_revision=14885 code_GPL_revision=108 From ebe51743fa8ec3a0ae3a310424104a157869d955 Mon Sep 17 00:00:00 2001 From: marini Date: Mon, 5 Feb 2018 18:06:05 +0100 Subject: [PATCH 002/110] Version 4.3.0, Revision 15241, Hash 642b5e2 MODIFIED * config/version.m4 config/version.m4_gpl configure include/version.inc matrices/MATRIX_transfer.F memory/MEM_report.F modules/mod_timing.F pol_function/X_dielectric_matrix.F pol_function/X_redux.F Bugs: - Forgot trim in MATRIX_transfer was causing too long MEM strings. Changes: - MATRIX_transfer in X_dielectric_matrix replaced with a less communications-consuming procedure. - Time format in mod_timing.F made consistent with the internal time_string. Patch sent by: marini --- config/version.m4 | 6 +++--- config/version.m4_gpl | 6 +++--- configure | 22 ++++++++++----------- include/version.inc | 4 ++-- src/matrices/MATRIX_transfer.F | 4 ++-- src/memory/MEM_report.F | 14 ++++++------- src/modules/mod_timing.F | 26 ++++++++++++------------- src/pol_function/X_dielectric_matrix.F | 27 +++++++++++++------------- src/pol_function/X_redux.F | 4 ++-- 9 files changed, 57 insertions(+), 56 deletions(-) diff --git a/config/version.m4 b/config/version.m4 index 9315fe6b12..66e8650833 100644 --- a/config/version.m4 +++ b/config/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 4.3.0 r.15235 h.09cdcf4, yambo@yambo-code.org) +AC_INIT(Yambo, 4.3.0 r.15241 h.642b5e2, yambo@yambo-code.org) SVERSION="4" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="15235" -SHASH="09cdcf4" +SREVISION="15241" +SHASH="642b5e2" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/config/version.m4_gpl b/config/version.m4_gpl index c31512b51d..344237bc27 100644 --- a/config/version.m4_gpl +++ b/config/version.m4_gpl @@ -1,10 +1,10 @@ -AC_INIT(Yambo, 4.3.0 r.108 (based on r.15235 h.09cdcf4), yambo@yambo-code.org) +AC_INIT(Yambo, 4.3.0 r.108 (based on r.15241 h.642b5e2), yambo@yambo-code.org) SVERSION="4" SSUBVERSION="3" SPATCHLEVEL="0" SREVISION="108" -BASE_REV="15235" -SHASH="09cdcf4" +BASE_REV="15241" +SHASH="642b5e2" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index da648a2ec9..c523103806 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 4.3.0 r.15235 h.09cdcf4. +# Generated by GNU Autoconf 2.69 for Yambo 4.3.0 r.15241 h.642b5e2. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='4.3.0 r.15235 h.09cdcf4' -PACKAGE_STRING='Yambo 4.3.0 r.15235 h.09cdcf4' +PACKAGE_VERSION='4.3.0 r.15241 h.642b5e2' +PACKAGE_STRING='Yambo 4.3.0 r.15241 h.642b5e2' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1478,7 +1478,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 4.3.0 r.15235 h.09cdcf4 to adapt to many kinds of systems. +\`configure' configures Yambo 4.3.0 r.15241 h.642b5e2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1543,7 +1543,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 4.3.0 r.15235 h.09cdcf4:";; + short | recursive ) echo "Configuration of Yambo 4.3.0 r.15241 h.642b5e2:";; esac cat <<\_ACEOF @@ -1731,7 +1731,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 4.3.0 r.15235 h.09cdcf4 +Yambo configure 4.3.0 r.15241 h.642b5e2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2410,7 +2410,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 4.3.0 r.15235 h.09cdcf4, which was +It was created by Yambo $as_me 4.3.0 r.15241 h.642b5e2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2761,8 +2761,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="4" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="15235" -SHASH="09cdcf4" +SREVISION="15241" +SHASH="642b5e2" @@ -13739,7 +13739,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 4.3.0 r.15235 h.09cdcf4, which was +This file was extended by Yambo $as_me 4.3.0 r.15241 h.642b5e2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13801,7 +13801,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 4.3.0 r.15235 h.09cdcf4 +Yambo config.status 4.3.0 r.15241 h.642b5e2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/include/version.inc b/include/version.inc index dad2a111e5..c6e25e17f2 100644 --- a/include/version.inc +++ b/include/version.inc @@ -1,6 +1,6 @@ code_version(1)=4 code_version(2)=3 code_version(3)=0 -code_hash='09cdcf4' -code_revision=15235 +code_hash='642b5e2' +code_revision=15241 code_GPL_revision=108 diff --git a/src/matrices/MATRIX_transfer.F b/src/matrices/MATRIX_transfer.F index 1cc98ba3bf..71d1b90582 100644 --- a/src/matrices/MATRIX_transfer.F +++ b/src/matrices/MATRIX_transfer.F @@ -98,7 +98,7 @@ SUBROUTINE MATRIX_transfer( M_in, M_bse, M, M_out, INDEX_in, INDEX_out, SND, RCV endif ! #if defined _TIMING - call timing('MATRIX transfer ('//PAR_to_PAR_comm_NAME//')',OPR='start') + call timing('MATRIX transfer ('//trim(PAR_to_PAR_comm_NAME)//')',OPR='start') #endif ! ! Transfer World @@ -150,7 +150,7 @@ SUBROUTINE MATRIX_transfer( M_in, M_bse, M, M_out, INDEX_in, INDEX_out, SND, RCV call COMM_reset(TRANSFER_world) ! #if defined _TIMING - call timing('MATRIX transfer ('//PAR_to_PAR_comm_NAME//')',OPR='stop') + call timing('MATRIX transfer ('//trim(PAR_to_PAR_comm_NAME)//')',OPR='stop') #endif ! end SUBROUTINE diff --git a/src/memory/MEM_report.F b/src/memory/MEM_report.F index 00dcc4241f..7b49302537 100644 --- a/src/memory/MEM_report.F +++ b/src/memory/MEM_report.F @@ -32,15 +32,15 @@ subroutine MEM_report( REPORT ) ! character(*) :: REPORT ! - character(lchlen) :: msg_,prefix + character(lchlen) :: msg_,PREFIX character(1) :: where integer :: i_mem,i_el,ORPHAN_TOT,i_title ! if (REPORT=="check") then where="s" - prefix="[MEMORY]" + PREFIX="[MEMORY]" else - prefix=" " + PREFIX=" " where="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) "//& @@ -62,7 +62,7 @@ subroutine MEM_report( REPORT ) endif ! if (ORPHAN_TOT>0) then - 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(ORPHAN_TOT)) call msg(where,msg_(1:len_trim(msg_))) endif ! @@ -75,7 +75,7 @@ subroutine MEM_report( REPORT ) enddo endif ! - WRITE(msg_,'(a8,a," : ",a,3x)') trim(prefix), "Max memory used ",trim(mem_string(MAX_MEM_Kb)) + WRITE(msg_,'(a8,a," : ",a,3x)') trim(PREFIX), "Max memory used ",trim(mem_string(MAX_MEM_Kb)) call msg("nr",msg_(1:len_trim(msg_))) ! contains @@ -106,9 +106,9 @@ subroutine plot_the_element(M,what) endif else if (M%N>1.or.(M%N==1.and.trim(M%shelf)/=trim(M%name(1)))) then - WRITE(msg_,'(a8,a27)') trim(prefix),trim(M%name(i_el))//" "//trim(M%shelf) + WRITE(msg_,'(a8,a27)') trim(PREFIX),trim(M%name(i_el))//" "//trim(M%shelf) else - WRITE(msg_,'(a8,a27)') trim(prefix),trim(M%name(i_el)) + WRITE(msg_,'(a8,a27)') trim(PREFIX),trim(M%name(i_el)) endif WRITE(msg_,'(a," : ",a)') trim(msg_),trim(mem_string(MEM)) if (len_trim(M%desc(i_el))>0) then diff --git a/src/modules/mod_timing.F b/src/modules/mod_timing.F index 64cb741b3a..70b3ad6b4a 100644 --- a/src/modules/mod_timing.F +++ b/src/modules/mod_timing.F @@ -351,35 +351,35 @@ SUBROUTINE clock_write(obj,form) nsec = INT( total_time -86400*nday -3600*nhour -60*nmin ) IF ( call_number == 1 ) THEN IF (nday > 0) THEN - WRITE (local_ch, '(a35," : ",3x,i2,"d",i2,"h CPU ")') & + WRITE (local_ch, '(a40," : ",3x,i2,"d",i2,"h CPU ")') & TRIM(obj%name), nday, nhour ELSEIF (nhour > 0) THEN - WRITE (local_ch, '(a35," : ",3x,i2,"h",i2,"m CPU ")') & + WRITE (local_ch, '(a40," : ",3x,i2,"h",i2,"m CPU ")') & TRIM(obj%name), nhour, nmin ELSEIF (nmin > 0) THEN - WRITE (local_ch, '(a35," : ",i2,"m",f5.2,"s CPU ")') & + WRITE (local_ch, '(a40," : ",i2,"m",f5.2,"s CPU ")') & TRIM(obj%name), nmin, nsec ELSE - WRITE (local_ch, '(a35," : ",3x,f5.2,"s CPU ")') & + WRITE (local_ch, '(a40," : ",3x,f5.2,"s CPU ")') & TRIM(obj%name), nsec ENDIF if (log_as_a_file) call LIVE_message(message="[TIMING]"//local_ch(:100),lfmt="n") call msg('r',local_ch(:100)) ELSE IF (nday > 0) THEN - WRITE(local_ch,'(a35," : ",3x,i2,"d",i2,"h CPU (", & + WRITE(local_ch,'(a40," : ",3x,i2,"d",i2,"h CPU (", & & i8," calls,",f8.3," s avg)")') TRIM(obj%name), nday, nhour, & call_number , total_time / REAL( call_number, DP ) ELSEIF (nhour > 0) THEN - WRITE(local_ch,'(a35," : ",3x,i2,"h",i2,"m CPU (", & + WRITE(local_ch,'(a40," : ",3x,i2,"h",i2,"m CPU (", & & i8," calls,",f8.3," s avg)")') TRIM(obj%name), nhour, nmin, & call_number , total_time / REAL( call_number, DP ) ELSEIF (nmin > 0) THEN - WRITE (local_ch, '(a35," : ",i2,"m",f5.2,"s CPU (", & + WRITE (local_ch, '(a40," : ",i2,"m",f5.2,"s CPU (", & & i8," calls,",f8.3," s avg)")') TRIM(obj%name), nmin, nsec, & call_number , total_time / REAL( call_number, DP ) ELSE - WRITE (local_ch, '(a35," : ",3x,f5.2,"s CPU (", & + WRITE (local_ch, '(a40," : ",3x,f5.2,"s CPU (", & & i8," calls,",f8.3," s avg)")') TRIM(obj%name), nsec, & call_number , total_time / REAL( call_number, DP ) ENDIF @@ -391,9 +391,9 @@ SUBROUTINE clock_write(obj,form) ! time in seconds ! IF ( call_number == 1) THEN - WRITE (local_ch, '(a35," :",f9.2,"s CPU")') TRIM(obj%name), total_time + WRITE (local_ch, '(a40," :",f9.2,"s CPU")') TRIM(obj%name), total_time ELSE - WRITE (local_ch, '(a35," :",f9.2,"s CPU (", i8," calls,",f8.3," s avg)")') & + WRITE (local_ch, '(a40," :",f9.2,"s CPU (", i8," calls,",f8.3," s avg)")') & TRIM(obj%name) , total_time , call_number , & total_time / REAL( call_number, DP ) ENDIF @@ -409,9 +409,9 @@ SUBROUTINE timing_upto_now() use pars, ONLY:lchlen use com, ONLY:msg use stderr, ONLY:real2ch - use LIVE_t, ONLY:LIVE_message + use LIVE_t, ONLY:LIVE_message,time_string IMPLICIT NONE - REAL(SP) :: total_time + REAL(DP) :: total_time character(lchlen)::ch ! IF ( .NOT. internal_list%alloc ) CALL error('timing_upto_now: Internal clock not allocated') @@ -421,7 +421,7 @@ SUBROUTINE timing_upto_now() ! total_time = real(internal_list%clock(1)%total_time,SP) ! - ch=' [Time-Profile]: '//trim(real2ch(total_time))//'s' + ch=' [Time-Profile]: '//trim(time_string(total_time)) call msg('rn',ch(:100)) if (log_as_a_file) call LIVE_message(message="[TIMING]"//ch(:100),lfmt="n") ! diff --git a/src/pol_function/X_dielectric_matrix.F b/src/pol_function/X_dielectric_matrix.F index a49f7841cf..45e71e40a8 100644 --- a/src/pol_function/X_dielectric_matrix.F +++ b/src/pol_function/X_dielectric_matrix.F @@ -37,13 +37,14 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,APPEND_NO_VERIFY) use R_lattice, ONLY:bz_samp,nqibz use electrons, ONLY:levels use parallel_m, ONLY:PP_redux_wait,PAR_IND_Q,PAR_Q_index, PAR_nq, & -& PAR_IND_Xk_ibz,PAR_IND_CON_BANDS_X,PAR_IND_VAL_BANDS_X,PAR_COM_X_WORLD +& PAR_IND_Xk_ibz,PAR_IND_CON_BANDS_X,PAR_IND_VAL_BANDS_X,PAR_COM_X_WORLD,& +& PAR_COM_X_WORLD_RL_resolved use wave_func, ONLY:WF_buffered_IO,WF,WF_buffer use IO_m, ONLY:io_control,OP_RD_CL,OP_APP_WR_CL,VERIFY,REP,io_RESPONSE,OP_WR_CL use com, ONLY:depth,error use TDDFT, ONLY:FXC use interfaces, ONLY:PARALLEL_global_indexes,PARALLEL_WF_distribute,& -& PARALLEL_WF_index,WF_load,WF_free,MATRIX_transfer +& PARALLEL_WF_index,WF_load,WF_free use QP_m, ONLY:QP_n_W_freqs_redux use matrix, ONLY:MATRIX_reset ! @@ -57,7 +58,7 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,APPEND_NO_VERIFY) ! ! Work Space ! - integer :: iq,Xdb,i_err,X_MEM_n_freqs,io_X_done(nqibz),iw,iq_mem,n_poles + integer :: iq,Xdb,i_err,X_MEM_n_freqs,io_X_done(nqibz),iw,iq_mem,n_poles,iw_X_mat real(SP) :: minmax_ehe(2) integer, external :: io_X,X_eh_setup character(1) :: sec_mode @@ -182,8 +183,6 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,APPEND_NO_VERIFY) call X_alloc('X',(/X%ng,X%ng,X_MEM_n_freqs*PAR_nq/)) endif ! - X_mat=cZERO - ! endif ! ! WF distribution @@ -240,22 +239,24 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,APPEND_NO_VERIFY) ! ! PAR => SER for I/O ! + X_mat=cZERO + ! do iw=1,Xw%n_freqs ! X_par(iq_mem)%I=iw ! - if (io_RESPONSE) then - call MATRIX_transfer(M_in=X_par(iq_mem),M=X_mat(:,:,iw),COMM=PAR_COM_X_WORLD,& -& COMM_name="X_dielectric") - else - call MATRIX_transfer(M_in=X_par(iq_mem),M=X_mat(:,:,(iq_mem-1)*X_MEM_n_freqs+iw),& -& COMM=PAR_COM_X_WORLD,COMM_name="X_dielectric") + if ( io_RESPONSE) iw_X_mat=iw + if (.not.io_RESPONSE) iw_X_mat=(iq_mem-1)*X_MEM_n_freqs+iw + ! + if (PAR_COM_X_WORLD_RL_resolved%CPU_id==0) then + X_mat(X_par(iq_mem)%rows(1):X_par(iq_mem)%rows(2),& +& X_par(iq_mem)%cols(1):X_par(iq_mem)%cols(2),iw_X_mat)=X_par(iq_mem)%blc(:,:,iw) endif ! + call PP_redux_wait(X_mat(:,:,iw_X_mat),COMM=PAR_COM_X_WORLD%COMM) + ! enddo ! - call PP_redux_wait(COMM=PAR_COM_X_WORLD%COMM) - ! ! Only the cpus that write the q=1 component knows the value of ng_db. Thus this must ! be re-initialized for all the cpus ! diff --git a/src/pol_function/X_redux.F b/src/pol_function/X_redux.F index f6235a0a29..95faa46ab3 100644 --- a/src/pol_function/X_redux.F +++ b/src/pol_function/X_redux.F @@ -266,9 +266,9 @@ subroutine X_redux(iq,X_par,Xw,X) ! endif ! - ! Now the interfaces. Divide in 2 steps: + ! Now the interfaces. ! - ! 1. From all CPU of the SLK group to one of the RL group. + ! From all CPU of the SLK group to one of the RL group. ! do i_LA_pool=1,PAR_COM_SLK_INDEX_local%n_CPU ! From 8ba288e47853fece16d1af32f6c1eba030526d43 Mon Sep 17 00:00:00 2001 From: marini Date: Mon, 5 Feb 2018 18:16:50 +0100 Subject: [PATCH 003/110] Version 4.3.0, Revision 15244, Hash 2a019ff MODIFIED * config/version.m4 config/version.m4_gpl configure include/version.inc Patch sent by: marini --- config/version.m4 | 6 +++--- config/version.m4_gpl | 6 +++--- configure | 22 +++++++++++----------- include/version.inc | 4 ++-- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/config/version.m4 b/config/version.m4 index 8dc071adf9..a57845e9af 100644 --- a/config/version.m4 +++ b/config/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 4.3.0 r.15238 h.5cd181f, yambo@yambo-code.org) +AC_INIT(Yambo, 4.3.0 r.15245 h.2a019ff, yambo@yambo-code.org) SVERSION="4" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="15238" -SHASH="5cd181f" +SREVISION="15245" +SHASH="2a019ff" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/config/version.m4_gpl b/config/version.m4_gpl index daf7717041..e603404201 100644 --- a/config/version.m4_gpl +++ b/config/version.m4_gpl @@ -1,10 +1,10 @@ -AC_INIT(Yambo, 4.3.0 r.108 (based on r.15238 h.5cd181f), yambo@yambo-code.org) +AC_INIT(Yambo, 4.3.0 r.108 (based on r.15245 h.2a019ff), yambo@yambo-code.org) SVERSION="4" SSUBVERSION="3" SPATCHLEVEL="0" SREVISION="108" -BASE_REV="15238" -SHASH="5cd181f" +BASE_REV="15245" +SHASH="2a019ff" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index deabaa14f6..e4dde16c32 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 4.3.0 r.15238 h.5cd181f. +# Generated by GNU Autoconf 2.69 for Yambo 4.3.0 r.15245 h.2a019ff. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='4.3.0 r.15238 h.5cd181f' -PACKAGE_STRING='Yambo 4.3.0 r.15238 h.5cd181f' +PACKAGE_VERSION='4.3.0 r.15245 h.2a019ff' +PACKAGE_STRING='Yambo 4.3.0 r.15245 h.2a019ff' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1484,7 +1484,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 4.3.0 r.15238 h.5cd181f to adapt to many kinds of systems. +\`configure' configures Yambo 4.3.0 r.15245 h.2a019ff to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1550,7 +1550,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 4.3.0 r.15238 h.5cd181f:";; + short | recursive ) echo "Configuration of Yambo 4.3.0 r.15245 h.2a019ff:";; esac cat <<\_ACEOF @@ -1737,7 +1737,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 4.3.0 r.15238 h.5cd181f +Yambo configure 4.3.0 r.15245 h.2a019ff generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2416,7 +2416,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 4.3.0 r.15238 h.5cd181f, which was +It was created by Yambo $as_me 4.3.0 r.15245 h.2a019ff, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2767,8 +2767,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="4" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="15238" -SHASH="5cd181f" +SREVISION="15245" +SHASH="2a019ff" @@ -13570,7 +13570,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 4.3.0 r.15238 h.5cd181f, which was +This file was extended by Yambo $as_me 4.3.0 r.15245 h.2a019ff, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13632,7 +13632,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 4.3.0 r.15238 h.5cd181f +Yambo config.status 4.3.0 r.15245 h.2a019ff configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/include/version.inc b/include/version.inc index 9dfa56e6b1..4ea9c36202 100644 --- a/include/version.inc +++ b/include/version.inc @@ -1,6 +1,6 @@ code_version(1)=4 code_version(2)=3 code_version(3)=0 -code_hash='5cd181f' -code_revision=15238 +code_hash='2a019ff' +code_revision=15245 code_GPL_revision=108 From 4e4c45e38b6e0914d52f5ba8525bf69c82b2dfbf Mon Sep 17 00:00:00 2001 From: marini Date: Tue, 6 Feb 2018 09:09:03 +0100 Subject: [PATCH 004/110] Version 4.3.0, Revision 15245, Hash 8ba288e MODIFIED * config/version.m4 config/version.m4_gpl configure include/version.inc pol_function/X_dielectric_matrix.F qp/QP_real_axis.F Bugs: - Bug fixed in X_dielectric_matrix when io_RESPONSE=.false. Patch sent by: marini --- config/version.m4 | 6 +++--- config/version.m4_gpl | 6 +++--- configure | 22 +++++++++++----------- include/version.inc | 4 ++-- src/pol_function/X_dielectric_matrix.F | 4 ++-- src/qp/QP_real_axis.F | 2 +- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/config/version.m4 b/config/version.m4 index a57845e9af..fd9a4ab3cb 100644 --- a/config/version.m4 +++ b/config/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 4.3.0 r.15245 h.2a019ff, yambo@yambo-code.org) +AC_INIT(Yambo, 4.3.0 r.15246 h.8ba288e, yambo@yambo-code.org) SVERSION="4" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="15245" -SHASH="2a019ff" +SREVISION="15246" +SHASH="8ba288e" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/config/version.m4_gpl b/config/version.m4_gpl index e603404201..4d8ef74d60 100644 --- a/config/version.m4_gpl +++ b/config/version.m4_gpl @@ -1,10 +1,10 @@ -AC_INIT(Yambo, 4.3.0 r.108 (based on r.15245 h.2a019ff), yambo@yambo-code.org) +AC_INIT(Yambo, 4.3.0 r.108 (based on r.15246 h.8ba288e), yambo@yambo-code.org) SVERSION="4" SSUBVERSION="3" SPATCHLEVEL="0" SREVISION="108" -BASE_REV="15245" -SHASH="2a019ff" +BASE_REV="15246" +SHASH="8ba288e" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index e4dde16c32..56642f9b79 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 4.3.0 r.15245 h.2a019ff. +# Generated by GNU Autoconf 2.69 for Yambo 4.3.0 r.15246 h.8ba288e. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='4.3.0 r.15245 h.2a019ff' -PACKAGE_STRING='Yambo 4.3.0 r.15245 h.2a019ff' +PACKAGE_VERSION='4.3.0 r.15246 h.8ba288e' +PACKAGE_STRING='Yambo 4.3.0 r.15246 h.8ba288e' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1484,7 +1484,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 4.3.0 r.15245 h.2a019ff to adapt to many kinds of systems. +\`configure' configures Yambo 4.3.0 r.15246 h.8ba288e to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1550,7 +1550,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 4.3.0 r.15245 h.2a019ff:";; + short | recursive ) echo "Configuration of Yambo 4.3.0 r.15246 h.8ba288e:";; esac cat <<\_ACEOF @@ -1737,7 +1737,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 4.3.0 r.15245 h.2a019ff +Yambo configure 4.3.0 r.15246 h.8ba288e generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2416,7 +2416,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 4.3.0 r.15245 h.2a019ff, which was +It was created by Yambo $as_me 4.3.0 r.15246 h.8ba288e, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2767,8 +2767,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="4" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="15245" -SHASH="2a019ff" +SREVISION="15246" +SHASH="8ba288e" @@ -13570,7 +13570,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 4.3.0 r.15245 h.2a019ff, which was +This file was extended by Yambo $as_me 4.3.0 r.15246 h.8ba288e, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13632,7 +13632,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 4.3.0 r.15245 h.2a019ff +Yambo config.status 4.3.0 r.15246 h.8ba288e configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/include/version.inc b/include/version.inc index 4ea9c36202..d832f08dc5 100644 --- a/include/version.inc +++ b/include/version.inc @@ -1,6 +1,6 @@ code_version(1)=4 code_version(2)=3 code_version(3)=0 -code_hash='2a019ff' -code_revision=15245 +code_hash='8ba288e' +code_revision=15246 code_GPL_revision=108 diff --git a/src/pol_function/X_dielectric_matrix.F b/src/pol_function/X_dielectric_matrix.F index 45e71e40a8..cbc6b98b99 100644 --- a/src/pol_function/X_dielectric_matrix.F +++ b/src/pol_function/X_dielectric_matrix.F @@ -239,8 +239,6 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,APPEND_NO_VERIFY) ! ! PAR => SER for I/O ! - X_mat=cZERO - ! do iw=1,Xw%n_freqs ! X_par(iq_mem)%I=iw @@ -248,6 +246,8 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,APPEND_NO_VERIFY) if ( io_RESPONSE) iw_X_mat=iw if (.not.io_RESPONSE) iw_X_mat=(iq_mem-1)*X_MEM_n_freqs+iw ! + X_mat(:,:,iw_X_mat)=cZERO + ! if (PAR_COM_X_WORLD_RL_resolved%CPU_id==0) then X_mat(X_par(iq_mem)%rows(1):X_par(iq_mem)%rows(2),& & X_par(iq_mem)%cols(1):X_par(iq_mem)%cols(2),iw_X_mat)=X_par(iq_mem)%blc(:,:,iw) diff --git a/src/qp/QP_real_axis.F b/src/qp/QP_real_axis.F index 4fe100583e..02ed2e9e1b 100644 --- a/src/qp/QP_real_axis.F +++ b/src/qp/QP_real_axis.F @@ -440,7 +440,7 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,GW_iter) do i3=1,X%ng lrhotw(i3)=V_dot_V_omp(X%ng,scattering_main%rhotw,X_mat(1,i3,i2+X_range(1)-1)) enddo - ! + ! ! To compensate the Tel/w divergence of the Bose function at finite ! Tel I multiply the X_mat function by [w/(Tel*Bose_E_cut)]^2 ! From 89c2778f4bf94079e36e5954900728bb4e64bfd5 Mon Sep 17 00:00:00 2001 From: marini Date: Mon, 19 Feb 2018 08:35:47 +0100 Subject: [PATCH 005/110] Version 4.3.0, Revision 15253, Hash 8bb7ecb MODIFIED * config/version.m4 config/version.m4_gpl configure include/version.inc Patch sent by: marini --- config/version.m4 | 6 +++--- config/version.m4_gpl | 6 +++--- configure | 22 +++++++++++----------- include/version.inc | 4 ++-- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/config/version.m4 b/config/version.m4 index fd9a4ab3cb..4c20615677 100644 --- a/config/version.m4 +++ b/config/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 4.3.0 r.15246 h.8ba288e, yambo@yambo-code.org) +AC_INIT(Yambo, 4.3.0 r.15254 h.8bb7ecb, yambo@yambo-code.org) SVERSION="4" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="15246" -SHASH="8ba288e" +SREVISION="15254" +SHASH="8bb7ecb" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/config/version.m4_gpl b/config/version.m4_gpl index 4d8ef74d60..ab0e29e00b 100644 --- a/config/version.m4_gpl +++ b/config/version.m4_gpl @@ -1,10 +1,10 @@ -AC_INIT(Yambo, 4.3.0 r.108 (based on r.15246 h.8ba288e), yambo@yambo-code.org) +AC_INIT(Yambo, 4.3.0 r.108 (based on r.15254 h.8bb7ecb), yambo@yambo-code.org) SVERSION="4" SSUBVERSION="3" SPATCHLEVEL="0" SREVISION="108" -BASE_REV="15246" -SHASH="8ba288e" +BASE_REV="15254" +SHASH="8bb7ecb" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 56642f9b79..c3ccec0e81 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 4.3.0 r.15246 h.8ba288e. +# Generated by GNU Autoconf 2.69 for Yambo 4.3.0 r.15254 h.8bb7ecb. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='4.3.0 r.15246 h.8ba288e' -PACKAGE_STRING='Yambo 4.3.0 r.15246 h.8ba288e' +PACKAGE_VERSION='4.3.0 r.15254 h.8bb7ecb' +PACKAGE_STRING='Yambo 4.3.0 r.15254 h.8bb7ecb' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1484,7 +1484,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 4.3.0 r.15246 h.8ba288e to adapt to many kinds of systems. +\`configure' configures Yambo 4.3.0 r.15254 h.8bb7ecb to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1550,7 +1550,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 4.3.0 r.15246 h.8ba288e:";; + short | recursive ) echo "Configuration of Yambo 4.3.0 r.15254 h.8bb7ecb:";; esac cat <<\_ACEOF @@ -1737,7 +1737,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 4.3.0 r.15246 h.8ba288e +Yambo configure 4.3.0 r.15254 h.8bb7ecb generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2416,7 +2416,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 4.3.0 r.15246 h.8ba288e, which was +It was created by Yambo $as_me 4.3.0 r.15254 h.8bb7ecb, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2767,8 +2767,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="4" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="15246" -SHASH="8ba288e" +SREVISION="15254" +SHASH="8bb7ecb" @@ -13570,7 +13570,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 4.3.0 r.15246 h.8ba288e, which was +This file was extended by Yambo $as_me 4.3.0 r.15254 h.8bb7ecb, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13632,7 +13632,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 4.3.0 r.15246 h.8ba288e +Yambo config.status 4.3.0 r.15254 h.8bb7ecb configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/include/version.inc b/include/version.inc index d832f08dc5..bf99e209c7 100644 --- a/include/version.inc +++ b/include/version.inc @@ -1,6 +1,6 @@ code_version(1)=4 code_version(2)=3 code_version(3)=0 -code_hash='8ba288e' -code_revision=15246 +code_hash='8bb7ecb' +code_revision=15254 code_GPL_revision=108 From ed8ffde03845f1cc04ae57a5f5c59b525e2dad3f Mon Sep 17 00:00:00 2001 From: Andrea Marini Date: Fri, 6 Mar 2020 09:45:58 +0100 Subject: [PATCH 006/110] Automatic commit: configure regenerated after merge --- config/version.m4 | 6 ++-- config/version.m4_gpl | 6 ++-- configure | 64 +++++++++++++++++++++---------------------- 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/config/version.m4 b/config/version.m4 index 99ce8c11c4..b757618a4f 100644 --- a/config/version.m4 +++ b/config/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 4.5.0 r.17893 h.8df11f37f, yambo@yambo-code.org) +AC_INIT(Yambo, 4.5.0 r.17906 h.9e86f62a8, yambo@yambo-code.org) SVERSION="4" SSUBVERSION="5" SPATCHLEVEL="0" -SREVISION="17893" -SHASH="8df11f37f" +SREVISION="17906" +SHASH="9e86f62a8" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/config/version.m4_gpl b/config/version.m4_gpl index 2ffeffaba5..bfe67894c7 100644 --- a/config/version.m4_gpl +++ b/config/version.m4_gpl @@ -1,10 +1,10 @@ -AC_INIT(Yambo, 4.4.0 r.108 (based on r.17893 h.8df11f37f), yambo@yambo-code.org) +AC_INIT(Yambo, 4.4.0 r.108 (based on r.17906 h.9e86f62a8), yambo@yambo-code.org) SVERSION="4" SSUBVERSION="5" SPATCHLEVEL="0" SREVISION="108" -BASE_REV="17893" -SHASH="8df11f37f" +BASE_REV="17906" +SHASH="9e86f62a8" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 325b5503c6..ef4ad9b5ef 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 4.5.0 r.17893 h.8df11f37f. +# Generated by GNU Autoconf 2.69 for Yambo 4.5.0 r.17906 h.9e86f62a8. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='4.5.0 r.17893 h.8df11f37f' -PACKAGE_STRING='Yambo 4.5.0 r.17893 h.8df11f37f' +PACKAGE_VERSION='4.5.0 r.17906 h.9e86f62a8' +PACKAGE_STRING='Yambo 4.5.0 r.17906 h.9e86f62a8' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1522,7 +1522,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 4.5.0 r.17893 h.8df11f37f to adapt to many kinds of systems. +\`configure' configures Yambo 4.5.0 r.17906 h.9e86f62a8 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1588,7 +1588,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 4.5.0 r.17893 h.8df11f37f:";; + short | recursive ) echo "Configuration of Yambo 4.5.0 r.17906 h.9e86f62a8:";; esac cat <<\_ACEOF @@ -1792,7 +1792,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 4.5.0 r.17893 h.8df11f37f +Yambo configure 4.5.0 r.17906 h.9e86f62a8 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2471,7 +2471,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 4.5.0 r.17893 h.8df11f37f, which was +It was created by Yambo $as_me 4.5.0 r.17906 h.9e86f62a8, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2822,8 +2822,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="4" SSUBVERSION="5" SPATCHLEVEL="0" -SREVISION="17893" -SHASH="8df11f37f" +SREVISION="17906" +SHASH="9e86f62a8" @@ -2873,7 +2873,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # YAMBO SPECIFIC # # -# Copyright (C) 2000-2019 the YAMBO team +# Copyright (C) 2000-2020 the YAMBO team # http://www.yambo-code.org # # Authors (see AUTHORS file for details): DS @@ -4301,7 +4301,7 @@ fi # # Copyright (C) 2002 M. Marques, A. Castro, A. Rubio, G. Bertsch # -# Copyright (C) 2000-2019 the YAMBO team +# Copyright (C) 2000-2020 the YAMBO team # http://www.yambo-code.org # # Authors (see AUTHORS file for details): AM @@ -4357,7 +4357,7 @@ fi # -# Copyright (C) 2000-2019 the YAMBO team +# Copyright (C) 2000-2020 the YAMBO team # http://www.yambo-code.org # # Authors (see AUTHORS file for details): AM @@ -4382,7 +4382,7 @@ fi # -# Copyright (C) 2000-2019 the YAMBO team +# Copyright (C) 2000-2020 the YAMBO team # http://www.yambo-code.org # # Authors (see AUTHORS file for details): AM @@ -4466,7 +4466,7 @@ fi # -# Copyright (C) 2000-2019 the YAMBO team +# Copyright (C) 2000-2020 the YAMBO team # http://www.yambo-code.org # # Authors (see AUTHORS file for details): AM @@ -4491,7 +4491,7 @@ fi # -# Copyright (C) 2000-2019 the YAMBO team +# Copyright (C) 2000-2020 the YAMBO team # http://www.yambo-code.org # # Authors (see AUTHORS file for details): AM @@ -4516,7 +4516,7 @@ fi # -# Copyright (C) 2000-2019 the YAMBO team +# Copyright (C) 2000-2020 the YAMBO team # http://www.yambo-code.org # # Authors (see AUTHORS file for details): AM @@ -4548,7 +4548,7 @@ fi # Original version Available from the GNU Autoconf Macro Archive at: # http://autoconf-archive.cryp.to/macros-by-category.html # -# Copyright (C) 2000-2019 the YAMBO team +# Copyright (C) 2000-2020 the YAMBO team # http://www.yambo-code.org # # Authors (see AUTHORS file for details): AM, DS @@ -4572,7 +4572,7 @@ fi # # -# Copyright (C) 2000-2016 the YAMBO team +# Copyright (C) 2000-2020 the YAMBO team # http://www.yambo-code.org # # Authors (see AUTHORS file for details): AF @@ -4597,7 +4597,7 @@ fi # -# Copyright (C) 2000-2018 the YAMBO team +# Copyright (C) 2000-2020 the YAMBO team # http://www.yambo-code.org # # Authors (see AUTHORS file for details): AM @@ -4625,7 +4625,7 @@ fi # Report # # -# Copyright (C) 2000-2019 the YAMBO team +# Copyright (C) 2000-2020 the YAMBO team # http://www.yambo-code.org # # Authors (see AUTHORS file for details): AM @@ -8394,7 +8394,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Scripts # # -# Copyright (C) 2000-2019 the YAMBO team +# Copyright (C) 2000-2020 the YAMBO team # http://www.yambo-code.org # # Authors (see AUTHORS file for details): AM @@ -8425,7 +8425,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Original version Available from the GNU Autoconf Macro Archive at: # http://autoconf-archive.cryp.to/macros-by-category.html # -# Copyright (C) 2000-2019 the YAMBO team +# Copyright (C) 2000-2020 the YAMBO team # http://www.yambo-code.org # # Authors (see AUTHORS file for details): AM, DS @@ -9413,7 +9413,7 @@ url_ydb=https://github.com/yambo-code/ydb.git # from http://www.arsc.edu/support/news/HPCnews/HPCnews249.shtml # -# Copyright (C) 2000-2019 the YAMBO team +# Copyright (C) 2000-2020 the YAMBO team # http://www.yambo-code.org # # Authors (see AUTHORS file for details): AM, AF, DS @@ -9459,7 +9459,7 @@ url_ydb=https://github.com/yambo-code/ydb.git # -# Copyright (C) 2000-2019 the YAMBO team +# Copyright (C) 2000-2020 the YAMBO team # http://www.yambo-code.org # # Authors (see AUTHORS file for details): AM, AF @@ -9484,7 +9484,7 @@ url_ydb=https://github.com/yambo-code/ydb.git # -# Copyright (C) 2000-2019 the YAMBO team +# Copyright (C) 2000-2020 the YAMBO team # http://www.yambo-code.org # # Authors (see AUTHORS file for details): DS @@ -9509,7 +9509,7 @@ url_ydb=https://github.com/yambo-code/ydb.git # -# Copyright (C) 2000-2019 the YAMBO team +# Copyright (C) 2000-2020 the YAMBO team # http://www.yambo-code.org # # Authors (see AUTHORS file for details): AF @@ -9534,7 +9534,7 @@ url_ydb=https://github.com/yambo-code/ydb.git # -# Copyright (C) 2000-2019 the YAMBO team +# Copyright (C) 2000-2020 the YAMBO team # http://www.yambo-code.org # # Authors (see AUTHORS file for details): AF @@ -9559,7 +9559,7 @@ url_ydb=https://github.com/yambo-code/ydb.git # -# Copyright (C) 2000-2019 the YAMBO team +# Copyright (C) 2000-2020 the YAMBO team # http://www.yambo-code.org # # Authors (see AUTHORS file for details): AM @@ -9585,7 +9585,7 @@ url_ydb=https://github.com/yambo-code/ydb.git # -# Copyright (C) 2000-2019 the YAMBO team +# Copyright (C) 2000-2020 the YAMBO team # http://www.yambo-code.org # # Authors (see AUTHORS file for details): AM @@ -14690,7 +14690,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 4.5.0 r.17893 h.8df11f37f, which was +This file was extended by Yambo $as_me 4.5.0 r.17906 h.9e86f62a8, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14752,7 +14752,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 4.5.0 r.17893 h.8df11f37f +Yambo config.status 4.5.0 r.17906 h.9e86f62a8 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -15474,7 +15474,7 @@ fi # Folders # # -# Copyright (C) 2000-2019 the YAMBO team +# Copyright (C) 2000-2020 the YAMBO team # http://www.yambo-code.org # # Authors (see AUTHORS file for details): DS AM From b5aa39eba4410431cae3e98641fc7ee4aad97832 Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Fri, 3 Jul 2020 19:31:17 +0200 Subject: [PATCH 007/110] definition and initialization RL ("g") comm for SE + starting io_X modifications --- src/interface/INIT_load.F | 2 +- src/io/io_X.F | 8 +++--- src/modules/mod_parallel.F | 4 +++ src/parallel/PARALLEL_global_Self_Energy.F | 31 +++++++++++++++------- src/parallel/PARALLEL_global_defaults.F | 2 +- src/qp/QP_ppa_cohsex.F | 2 +- 6 files changed, 34 insertions(+), 15 deletions(-) diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 89efe9db5a..8488316675 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -767,7 +767,7 @@ subroutine CPU_structure_load() if (i_s==2) possible_fields='(q,g,k,c,v)' ! X_and_IO if (i_s==3) possible_fields='(q,g,k,c,v)' ! X if (i_s==4) possible_fields='(k,eh,t)' ! BS - if (i_s==5) possible_fields='(q,qp,b)' ! SE + if (i_s==5) possible_fields='(q,g,qp,b)' ! SE if (i_s==6) possible_fields='(k,b,q,qp)' ! RT if (i_s==7) possible_fields='(p,d) ' ! SLK if (i_s==8) possible_fields='(w,k) ' ! NL diff --git a/src/io/io_X.F b/src/io/io_X.F index e846cf8968..6e0271bc8f 100644 --- a/src/io/io_X.F +++ b/src/io/io_X.F @@ -212,12 +212,14 @@ integer function io_X(X,Xw,ID) call io_variable_bulk(ID,1,C3=X_par(1)%blc(:,:,:Xw%n_freqs),IPOS=(/1,X_par(1)%rows(1),X_par(1)%cols(1),1/)) ! else if(read_is_on(ID)) then -#endif +!#endif ! - if (.not.allocated(X_mat).and.read_is_on(ID)) call X_alloc('X',(/X%ng,X%ng,Xw%n_freqs/)) + !if (.not.allocated(X_mat).and.read_is_on(ID)) call X_alloc('X',(/X%ng,X%ng,Xw%n_freqs/)) call def_variable_bulk(ID,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP) - call io_variable_bulk(ID,1,C3=X_mat(:,:,:Xw%n_freqs),IPOS=(/1,1,1,1/)) + !call io_variable_bulk(ID,1,C3=X_mat(:,:,:Xw%n_freqs),IPOS=(/1,1,1,1/)) + call io_variable_bulk(ID,1,C3=X_par(1)%blc(:,:,:Xw%n_freqs),IPOS=(/1,X_par(1)%rows(1),X_par(1)%cols(1),1/)) !!MB ! +#endif #if defined _PAR_IO endif #endif diff --git a/src/modules/mod_parallel.F b/src/modules/mod_parallel.F index 89fed3319b..8bd134fa79 100644 --- a/src/modules/mod_parallel.F +++ b/src/modules/mod_parallel.F @@ -402,6 +402,10 @@ module parallel_m type(MPI_comm),SAVE :: PAR_COM_freqs_A2A type(MPI_comm),SAVE :: PAR_COM_freqs_INDEX ! + ! ... SE + type(MPI_comm),SAVE :: PAR_COM_SE_WORLD_RL_resolved + type(MPI_comm),SAVE :: PAR_COM_SE_WORLD + ! ! ... and dimensions (used for automatic cpu distribution) !========================================================= integer :: PAR_K_range = 0 diff --git a/src/parallel/PARALLEL_global_Self_Energy.F b/src/parallel/PARALLEL_global_Self_Energy.F index 5960b01f95..a26292a9ba 100644 --- a/src/parallel/PARALLEL_global_Self_Energy.F +++ b/src/parallel/PARALLEL_global_Self_Energy.F @@ -33,8 +33,9 @@ subroutine PARALLEL_global_Self_Energy(E,Xk,q) use parallel_m, ONLY:HEAD_QP_cpu,HEAD_b_cpu,master_cpu,n_WF_bands_to_load,COMM_copy,& & PAR_Q_bz_range,PAR_Q_ibz_range,PAR_n_bands,PAR_build_index,ncpu ! COMMUNICATORS - use parallel_m, ONLY:PAR_COM_QP_INDEX,PAR_COM_Q_INDEX,PAR_COM_QP_A2A,PAR_COM_G_b_INDEX, & -& PAR_COM_Q_A2A + use parallel_m, ONLY:PAR_COM_QP_INDEX,PAR_COM_Q_INDEX,PAR_COM_RL_INDEX,PAR_COM_G_b_INDEX,& +& PAR_COM_QP_A2A,PAR_COM_Q_A2A,PAR_COM_RL_A2A,PAR_COM_SE_WORLD,& +& PAR_COM_SE_WORLD_RL_resolved ! IND use parallel_m, ONLY:PAR_IND_QP,PAR_IND_Q_ibz,PAR_IND_G_b,PAR_IND_Q_bz,PAR_IND_Xk_ibz,PAR_IND_G_k ! INDEX @@ -80,13 +81,25 @@ subroutine PARALLEL_global_Self_Energy(E,Xk,q) integer :: i_k,nb_mat #endif ! - CALL PARALLEL_structure(3,(/"q ","qp","b "/)) + CALL PARALLEL_structure(4,(/"q ","g ","qp","b "/)) ! - call PARALLEL_assign_chains_and_COMMs(3,COMM_index_1=PAR_COM_Q_INDEX,& -& COMM_index_2=PAR_COM_QP_INDEX,& -& COMM_index_3=PAR_COM_G_b_INDEX,& + + call PARALLEL_assign_chains_and_COMMs(4,COMM_index_1=PAR_COM_Q_INDEX,& +& COMM_index_2=PAR_COM_RL_INDEX,& +& COMM_index_3=PAR_COM_QP_INDEX,& +& COMM_index_4=PAR_COM_G_b_INDEX,& & COMM_A2A_1=PAR_COM_Q_A2A,& -& COMM_A2A_2=PAR_COM_QP_A2A) +& COMM_A2A_2=PAR_COM_RL_A2A,& +& COMM_A2A_3=PAR_COM_QP_A2A) + ! + ! COMMs setup + ! + call COMM_copy(PAR_COM_Q_A2A,PAR_COM_SE_WORLD) + call COMM_copy(PAR_COM_Q_A2A,PAR_COM_SE_WORLD_RL_resolved) + ! + ! + if (PAR_COM_RL_INDEX%n_CPU>1) call COMM_copy(PAR_COM_RL_A2A,PAR_COM_SE_WORLD_RL_resolved) + ! ! ! The routine PARALLEL_assign_chains_and_COMMs cannot define COMMUNICATORS for internal ! A2A when there is no internal distribution @@ -278,13 +291,13 @@ subroutine PARALLEL_global_Self_Energy(E,Xk,q) if (l_eval_collisions.and.io_COLLs) then call IO_and_Messaging_switch("+io_out",CONDITION=PAR_COM_QP_A2A%CPU_id==0.and.PAR_COM_Q_INDEX%CPU_id==0) else - call IO_and_Messaging_switch("+io_out",CONDITION=master_cpu) + call IO_and_Messaging_switch("+io_out",CONDITION=PAR_COM_SE_WORLD%CPU_id==0) endif else call IO_and_Messaging_switch("+io_out",CONDITION=.TRUE.) endif ! - call IO_and_Messaging_switch("+output",CONDITION=master_cpu) + call IO_and_Messaging_switch("+output",CONDITION=PAR_COM_SE_WORLD%CPU_id==0) ! call OPENMP_set_threads(n_threads_in=n_threads_SE) ! diff --git a/src/parallel/PARALLEL_global_defaults.F b/src/parallel/PARALLEL_global_defaults.F index 50c7d5cf7f..86bf016ee6 100644 --- a/src/parallel/PARALLEL_global_defaults.F +++ b/src/parallel/PARALLEL_global_defaults.F @@ -83,7 +83,7 @@ subroutine PARALLEL_global_defaults(ENVIRONMENT) CPU_structure(i_PAR_structure)%ROLE(2)="d" CPU_structure(i_PAR_structure)%CPU(2)=1 case("Self_Energy") - call GIMME_a_parallel_proposal(3,(/" b","qp"," q"/)) + call GIMME_a_parallel_proposal(4,(/" b","qp"," g"," q"/)) case("Response_T_space") call GIMME_a_parallel_proposal(2,(/"eh"," k"/)) end select diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 2c17c924b2..476a6fafae 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -69,7 +69,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! type(levels) ::E type(bz_samp)::Xk,k,q - type(X_t) ::X + type(X_t) ::X type(QP_t) ::qp type(w_samp) ::Xw integer ::GW_iter From 8636da336d363ae62b25098818a61180a6131271 Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Wed, 8 Jul 2020 10:18:26 +0200 Subject: [PATCH 008/110] introducing X_par in qp_ppa_cohsex --- src/common/pgipar1XQrolt | 0 src/common/pgipar2Yy1LOK | 0 src/io/io_X.F | 510 ++++++++++++++++++++------------------- src/qp/QP_ppa_cohsex.F | 4 +- 4 files changed, 259 insertions(+), 255 deletions(-) create mode 100644 src/common/pgipar1XQrolt create mode 100644 src/common/pgipar2Yy1LOK diff --git a/src/common/pgipar1XQrolt b/src/common/pgipar1XQrolt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/common/pgipar2Yy1LOK b/src/common/pgipar2Yy1LOK new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/io/io_X.F b/src/io/io_X.F index 6e0271bc8f..4219af326e 100644 --- a/src/io/io_X.F +++ b/src/io/io_X.F @@ -22,13 +22,13 @@ ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! integer function io_X(X,Xw,ID) - ! - use pars, ONLY:SP,schlen - use units, ONLY:HA2EV - use R_lattice, ONLY:g_vec - use X_m, ONLY:X_t,X_mat,X_RLcomp_ig,X_desc,X_alloc - use frequency, ONLY:w_samp - use IO_m, ONLY:io_connect,io_disconnect,io_sec,io_com,& +! +use pars, ONLY:SP,schlen +use units, ONLY:HA2EV +use R_lattice, ONLY:g_vec +use X_m, ONLY:X_t,X_mat,X_RLcomp_ig,X_desc,X_alloc +use frequency, ONLY:w_samp +use IO_m, ONLY:io_connect,io_disconnect,io_sec,io_com,& & io_elemental,io_status,io_bulk,& & read_is_on,write_is_on,io_header,& & ver_is_gt_or_eq,io_serial_number,serial_number,& @@ -36,262 +36,266 @@ integer function io_X(X,Xw,ID) & io_fragment,IO_OUTDATED_DB,frag_RESPONSE,& & IO_NO_DATABASE,io_mode,DUMP,& & def_variable_bulk,io_variable_bulk,def_variable_elemental,io_variable_elemental - use stderr, ONLY:intc - use timing_m, ONLY:timing - use parallel_m, ONLY:PAR_COM_X_WORLD +use stderr, ONLY:intc +use timing_m, ONLY:timing +use parallel_m, ONLY:PAR_COM_X_WORLD #if defined _PAR_IO - use X_m, ONLY:X_par +use X_m, ONLY:X_par #endif - ! +! #include - ! - type(X_t) :: X - type(w_samp):: Xw - integer :: ID - ! - !Work Space - ! - integer ::sec_size,i1,iq,i_err,io_com_save,io_err - logical ::different_db_RL_order,perform_IO - character (schlen) ::ch,db_desc - character (2) ::local_XC_KIND - real(SP), allocatable :: RL_vecs_disk(:,:) - complex(SP),allocatable :: X_on_disk(:,:) - integer, external :: variables_X - ! - if (io_RESPONSE) call timing('io_X',OPR='start') - ! - if (.not.io_RESPONSE) then - io_X=IO_NOT_ALLOWED - call io_disconnect(ID,FORCE=.TRUE.) - return - endif - ! - ! I assume that he RL ordering used to build X is not different - ! from the one in DB1 - ! - different_db_RL_order=.false. - ! - if (X%whoami==1) db_desc='Xx' - if (X%whoami==2) db_desc='em1s' - if (X%whoami==3) db_desc='em1d' - if (X%whoami==4) db_desc='pp' - ! +! +type(X_t) :: X +type(w_samp):: Xw +integer :: ID +! +!Work Space +! +integer ::sec_size,i1,iq,i_err,io_com_save,io_err +logical ::different_db_RL_order,perform_IO +character (schlen) ::ch,db_desc +character (2) ::local_XC_KIND +real(SP), allocatable :: RL_vecs_disk(:,:) +complex(SP),allocatable :: X_on_disk(:,:) +integer, external :: variables_X +! +if (io_RESPONSE) call timing('io_X',OPR='start') +! +if (.not.io_RESPONSE) then + io_X=IO_NOT_ALLOWED + call io_disconnect(ID,FORCE=.TRUE.) + return +endif +! +! I assume that he RL ordering used to build X is not different +! from the one in DB1 +! +different_db_RL_order=.false. +! +if (X%whoami==1) db_desc='Xx' +if (X%whoami==2) db_desc='em1s' +if (X%whoami==3) db_desc='em1d' +if (X%whoami==4) db_desc='pp' +! #if defined _PAR_IO - perform_IO=PAR_COM_X_WORLD%CPU_id==0.or.read_is_on(ID) +perform_IO=PAR_COM_X_WORLD%CPU_id==0.or.read_is_on(ID) #else - perform_IO=.true. +perform_IO=.true. #endif - ! - if(perform_IO) then - io_X=io_connect(desc=trim(db_desc),type=2,ID=ID,FORCE_READ_MODE=(.not.any((/io_sec(ID,:)==1/))).and.frag_RESPONSE) - if (io_X/=0) goto 1 - endif - ! - if (any((/io_sec(ID,:)==1/)).and.perform_IO) then - ! - ! Header - ! - if (X%whoami==1) local_XC_KIND="Xx" - if (X%whoami==2) local_XC_KIND="Xs" - if (X%whoami==3) local_XC_KIND="Xd" - if (X%whoami==4) local_XC_KIND="Xp" - io_X=io_header(ID,QPTS=.true.,R_LATT=.true.,WF=.true.,T_EL=.true.,XC_KIND=local_XC_KIND,& +! +if(perform_IO) then + io_X=io_connect(desc=trim(db_desc),type=2,ID=ID,FORCE_READ_MODE=(.not.any((/io_sec(ID,:)==1/))).and.frag_RESPONSE) + if (io_X/=0) goto 1 +endif +! +if (any((/io_sec(ID,:)==1/)).and.perform_IO) then + ! + ! Header + ! + if (X%whoami==1) local_XC_KIND="Xx" + if (X%whoami==2) local_XC_KIND="Xs" + if (X%whoami==3) local_XC_KIND="Xd" + if (X%whoami==4) local_XC_KIND="Xp" + io_X=io_header(ID,QPTS=.true.,R_LATT=.true.,WF=.true.,T_EL=.true.,XC_KIND=local_XC_KIND,& & CUTOFF=.true.,GAUGE=.TRUE.,FRAG=frag_RESPONSE) - if (io_X/=0) goto 1 - ! - if (.not.ver_is_gt_or_eq(ID,revision=308)) then - io_X=IO_OUTDATED_DB - goto 1 - endif - ! - ! Global Descriptions - !===================== - ! - io_X=variables_X(ID,X_desc,X) - if (io_X/=0) goto 1 - ! - ! When the SN is different and I am importing this DB - ! from a different calculation I check the RL vectors - ! - YAMBO_ALLOC(RL_vecs_disk,(X%ng_db,3)) - ! - if (write_is_on(ID)) RL_vecs_disk(:,:)=g_vec(:X%ng_db,:) - ! - call io_bulk(ID,VAR='X_RL_vecs',VAR_SZ=shape(RL_vecs_disk)) - call io_bulk(ID,R2=RL_vecs_disk) - ! - if (io_serial_number(ID)/=serial_number.and.read_is_on(ID).and.allocated(g_vec)) then - YAMBO_FREE(X_RLcomp_ig) - YAMBO_ALLOC(X_RLcomp_ig,(X%ng)) - i_err = X_RLcomp_table() - if ( i_err < 0 ) io_status(ID) = IO_INCOMPATIBLE_VAR - if ( i_err > 0 ) different_db_RL_order=.true. - endif - YAMBO_FREE(RL_vecs_disk) - ! - ! Close & Menu lower line - ! - if (.not.any((/io_sec(ID,:)==2/))) then - call io_elemental(ID,VAR="",VAR_SZ=0,MENU=1) - io_X=io_status(ID) - if (io_X/=0) goto 1 - else - call io_elemental(ID,VAR="",VAR_SZ=0,MENU=0) - endif - endif - ! - do i1=1,size(io_sec(ID,:)) - if (io_sec(ID,i1)==0) cycle - iq=io_sec(ID,i1)/2 - enddo - ! - if (iq==0) goto 1 - ! - call io_fragment(ID,i_fragment=iq,ierr=io_err,COMM=PAR_COM_X_WORLD%COMM,cpu_id=PAR_COM_X_WORLD%CPU_id) - ! - ! type(X_t) ::X(4) x s d p - ! - if (any((/io_sec(ID,:)==2*iq/)) ) then - ! - sec_size=6 - ! - if (X%whoami==4) sec_size=1 - 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) - if (iq>2 .and. trim(db_desc)/="em1d") io_com(ID)=NONE - call def_variable_elemental(ID,trim(ch),sec_size,SP,1,par_io_kind='independent') - ! - if (perform_IO) then - if (X%whoami==4) then - call io_variable_elemental(ID,UNIT=HA2EV,VAR="PPA Im energy",TERMINATOR="ev", R0=X%ppaE, CHECK=.true.,OP=(/"=="/)) - endif - if (X%whoami/=4) then - call io_variable_elemental(ID, VAR="Current Q-pt index ",I0=iq) - call io_variable_elemental(ID,UNIT=HA2EV,VAR="X energy range",TERMINATOR="ev ",R1=Xw%er,WARN =.true.,OP=(/"==","=="/)) - call io_variable_elemental(ID,UNIT=HA2EV,VAR="X damping range",TERMINATOR="ev",R1=Xw%dr,CHECK=.true.,OP=(/"==","=="/)) - call io_variable_elemental(ID, VAR="Number of frequencies ",I0=Xw%n_freqs,CHECK=.true.,OP=(/"=="/)) - endif - ! - endif - ! - call def_variable_elemental(ID,"",0,0,1) - io_X=io_status(ID) - ! - io_com(ID)=io_com_save - ! - if (io_X/=0) goto 1 - ! - endif - ! - if (any((/io_sec(ID,:)==2*iq+1/))) then - ! - ! Xw%p - ! - if (read_is_on(ID)) then - YAMBO_FREE(Xw%p) - YAMBO_ALLOC(Xw%p,(Xw%n_freqs)) - endif - ! - ch="FREQ_sec_iq"//trim(intc(iq)) - call def_variable_bulk(ID,trim(ch),1,(/2,Xw%n_freqs/),SP,par_io_kind='independent') - if(perform_IO) call io_variable_bulk(ID,1,C1=Xw%p) - ! - ! X_mat @iq - ! - ch="X_Q_"//trim(intc(iq)) - ! + if (io_X/=0) goto 1 + ! + if (.not.ver_is_gt_or_eq(ID,revision=308)) then + io_X=IO_OUTDATED_DB + goto 1 + endif + ! + ! Global Descriptions + !===================== + ! + io_X=variables_X(ID,X_desc,X) + if (io_X/=0) goto 1 + ! + ! When the SN is different and I am importing this DB + ! from a different calculation I check the RL vectors + ! + YAMBO_ALLOC(RL_vecs_disk,(X%ng_db,3)) + ! + if (write_is_on(ID)) RL_vecs_disk(:,:)=g_vec(:X%ng_db,:) + ! + call io_bulk(ID,VAR='X_RL_vecs',VAR_SZ=shape(RL_vecs_disk)) + call io_bulk(ID,R2=RL_vecs_disk) + ! + if (io_serial_number(ID)/=serial_number.and.read_is_on(ID).and.allocated(g_vec)) then + YAMBO_FREE(X_RLcomp_ig) + YAMBO_ALLOC(X_RLcomp_ig,(X%ng)) + i_err = X_RLcomp_table() + if ( i_err < 0 ) io_status(ID) = IO_INCOMPATIBLE_VAR + if ( i_err > 0 ) different_db_RL_order=.true. + endif + YAMBO_FREE(RL_vecs_disk) + ! + ! Close & Menu lower line + ! + if (.not.any((/io_sec(ID,:)==2/))) then + call io_elemental(ID,VAR="",VAR_SZ=0,MENU=1) + io_X=io_status(ID) + if (io_X/=0) goto 1 + else + call io_elemental(ID,VAR="",VAR_SZ=0,MENU=0) + endif +endif +! +do i1=1,size(io_sec(ID,:)) + if (io_sec(ID,i1)==0) cycle + iq=io_sec(ID,i1)/2 +enddo +! +if (iq==0) goto 1 +! +call io_fragment(ID,i_fragment=iq,ierr=io_err,COMM=PAR_COM_X_WORLD%COMM,cpu_id=PAR_COM_X_WORLD%CPU_id) +! +! type(X_t) ::X(4) x s d p +! +if (any((/io_sec(ID,:)==2*iq/)) ) then + ! + sec_size=6 + ! + if (X%whoami==4) sec_size=1 + 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) + if (iq>2 .and. trim(db_desc)/="em1d") io_com(ID)=NONE + call def_variable_elemental(ID,trim(ch),sec_size,SP,1,par_io_kind='independent') + ! + if (perform_IO) then + if (X%whoami==4) then + call io_variable_elemental(ID,UNIT=HA2EV,VAR="PPA Im energy",TERMINATOR="ev", R0=X%ppaE, CHECK=.true.,OP=(/"=="/)) + endif + if (X%whoami/=4) then + call io_variable_elemental(ID, VAR="Current Q-pt index ",I0=iq) + call io_variable_elemental(ID,UNIT=HA2EV,VAR="X energy range",TERMINATOR="ev ",R1=Xw%er,WARN =.true.,OP=(/"==","=="/)) + call io_variable_elemental(ID,UNIT=HA2EV,VAR="X damping range",TERMINATOR="ev",R1=Xw%dr,CHECK=.true.,OP=(/"==","=="/)) + call io_variable_elemental(ID, VAR="Number of frequencies ",I0=Xw%n_freqs,CHECK=.true.,OP=(/"=="/)) + endif + ! + endif + ! + call def_variable_elemental(ID,"",0,0,1) + io_X=io_status(ID) + ! + io_com(ID)=io_com_save + ! + if (io_X/=0) goto 1 + ! +endif +! +if (any((/io_sec(ID,:)==2*iq+1/))) then + ! + ! Xw%p + ! + if (read_is_on(ID)) then + YAMBO_FREE(Xw%p) + YAMBO_ALLOC(Xw%p,(Xw%n_freqs)) + endif + ! + ch="FREQ_sec_iq"//trim(intc(iq)) + call def_variable_bulk(ID,trim(ch),1,(/2,Xw%n_freqs/),SP,par_io_kind='independent') + if(perform_IO) call io_variable_bulk(ID,1,C1=Xw%p) + ! + ! X_mat @iq + ! + ch="X_Q_"//trim(intc(iq)) + ! #if defined _PAR_IO - if(write_is_on(ID)) then - ! - call def_variable_bulk(ID,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP,par_io_kind='collective') - call io_variable_bulk(ID,1,C3=X_par(1)%blc(:,:,:Xw%n_freqs),IPOS=(/1,X_par(1)%rows(1),X_par(1)%cols(1),1/)) - ! - else if(read_is_on(ID)) then + if(write_is_on(ID)) then + ! + call def_variable_bulk(ID,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP,par_io_kind='collective') + call io_variable_bulk(ID,1,C3=X_par(1)%blc(:,:,:Xw%n_freqs),IPOS=(/1,X_par(1)%rows(1),X_par(1)%cols(1),1/)) + ! + else if(read_is_on(ID)) then !#endif - ! - !if (.not.allocated(X_mat).and.read_is_on(ID)) call X_alloc('X',(/X%ng,X%ng,Xw%n_freqs/)) - call def_variable_bulk(ID,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP) - !call io_variable_bulk(ID,1,C3=X_mat(:,:,:Xw%n_freqs),IPOS=(/1,1,1,1/)) - call io_variable_bulk(ID,1,C3=X_par(1)%blc(:,:,:Xw%n_freqs),IPOS=(/1,X_par(1)%rows(1),X_par(1)%cols(1),1/)) !!MB - ! -#endif + ! +! if (.not.allocated(X_mat).and.read_is_on(ID)) call X_alloc('X',(/X%ng,X%ng,Xw%n_freqs/)) +! call def_variable_bulk(ID,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP) +! call io_variable_bulk(ID,1,C3=X_mat(:,:,:Xw%n_freqs),IPOS=(/1,1,1,1/)) + ! + if (.not.allocated(X_par(1)).and.read_is_on(ID)) then + YAMBO_ALLOC(X_par(1)%blc,(X_par(1)%rows(1):X_par(1)%rows(2),X_par(1)%cols(1):X_par(1)%cols(2),Xw%n_freqs)) + endif + call def_variable_bulk(ID,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP,par_io_kind='collective') + call io_variable_bulk(ID,1,C3=X_par(1)%blc(:,:,:Xw%n_freqs),IPOS=(/1,X_par(1)%rows(1),X_par(1)%cols(1),1/)) +#endif #if defined _PAR_IO - endif + endif #endif - ! - if (read_is_on(ID) .and. different_db_RL_order) then - YAMBO_ALLOC(X_on_disk,(X%ng,X%ng)) - do i1=1,Xw%n_freqs - X_on_disk=X_mat(:,:,i1) - X_mat(X_RLcomp_ig(:),X_RLcomp_ig(:),i1)=X_on_disk - enddo - YAMBO_FREE(X_on_disk) - endif - ! - endif - ! - ! Sections 1 & 2 are used in VERIFY mode. - ! Now that the menu is closed I can return with io_X/=0 if there is a restart point - ! - if (io_mode(ID)/=DUMP) then - io_X=IO_NO_DATABASE - if (io_err==0) io_X=iq - endif - ! + ! + if (read_is_on(ID) .and. different_db_RL_order) then + YAMBO_ALLOC(X_on_disk,(X%ng,X%ng)) + do i1=1,Xw%n_freqs + X_on_disk=X_mat(:,:,i1) + X_mat(X_RLcomp_ig(:),X_RLcomp_ig(:),i1)=X_on_disk + enddo + YAMBO_FREE(X_on_disk) + endif + ! +endif +! +! Sections 1 & 2 are used in VERIFY mode. +! Now that the menu is closed I can return with io_X/=0 if there is a restart point +! +if (io_mode(ID)/=DUMP) then + io_X=IO_NO_DATABASE + if (io_err==0) io_X=iq +endif +! 1 call io_disconnect(ID) - ! - if (io_RESPONSE) call timing('io_X',OPR='stop') - ! - contains - ! - integer function X_RLcomp_table() - !-------------------------------- - ! - ! X has been written using a different RL vectors ordering. - ! X_RLcomp_ig is defined in such a way that - ! - ! X_( X_RLcomp_ig(i), X_RLcomp_ig(j) ) = X_on_disk_(i,j) - ! - use vec_operate, ONLY:v_is_zero - use R_lattice, ONLY:ng_in_shell,n_g_shells - use zeros, ONLY:define_zeros - ! - integer :: is,ig1,ig2,g_limits(2) - real(SP):: v(3),local_zero(3) - ! - X_RLcomp_table=0 - X_RLcomp_ig=0 - ! - do is=1,n_g_shells - if (ng_in_shell(is) > X%ng) then - if (any(X_RLcomp_ig==0)) X_RLcomp_table=-1 - return - endif - ! - g_limits=1 - if (is > 1 ) g_limits = (/ ng_in_shell(is-1), ng_in_shell(is) /) - ! - call define_zeros(vector_=g_vec,zero_=local_zero) - ! - g_loop: do ig1=g_limits(1),g_limits(2) - do ig2=g_limits(1),g_limits(2) - ! - v=RL_vecs_disk(ig1,:)-g_vec(ig2,:) - ! - if (v_is_zero(v,zero_=local_zero)) then - X_RLcomp_ig(ig1)=ig2 - cycle g_loop - endif - ! - enddo - enddo g_loop - enddo - ! - end function +! +if (io_RESPONSE) call timing('io_X',OPR='stop') +! +contains + ! + integer function X_RLcomp_table() + !-------------------------------- + ! + ! X has been written using a different RL vectors ordering. + ! X_RLcomp_ig is defined in such a way that + ! + ! X_( X_RLcomp_ig(i), X_RLcomp_ig(j) ) = X_on_disk_(i,j) + ! + use vec_operate, ONLY:v_is_zero + use R_lattice, ONLY:ng_in_shell,n_g_shells + use zeros, ONLY:define_zeros + ! + integer :: is,ig1,ig2,g_limits(2) + real(SP):: v(3),local_zero(3) + ! + X_RLcomp_table=0 + X_RLcomp_ig=0 + ! + do is=1,n_g_shells + if (ng_in_shell(is) > X%ng) then + if (any(X_RLcomp_ig==0)) X_RLcomp_table=-1 + return + endif ! -end function + g_limits=1 + if (is > 1 ) g_limits = (/ ng_in_shell(is-1), ng_in_shell(is) /) + ! + call define_zeros(vector_=g_vec,zero_=local_zero) + ! + g_loop: do ig1=g_limits(1),g_limits(2) + do ig2=g_limits(1),g_limits(2) + ! + v=RL_vecs_disk(ig1,:)-g_vec(ig2,:) + ! + if (v_is_zero(v,zero_=local_zero)) then + X_RLcomp_ig(ig1)=ig2 + cycle g_loop + endif + ! + enddo + enddo g_loop + enddo + ! + end function + ! +end function \ No newline at end of file diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 476a6fafae..1fcb885f04 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -43,7 +43,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) use QP_m, ONLY:QP_t,QP_n_G_bands,QP_dSc_steps,QP_table,l_update_W,& & QP_Sc,QP_n_states,QP_G_damp,QP_table,QP_dSc_delta,& & COHSEX_use_empties,l_GW_terminator,GW_terminator_Kind,QP_states_simmetrize - use X_m, ONLY:X_alloc,X_mat,X_mat_d,X_t + use X_m, ONLY:X_alloc,X_mat,X_mat_d,X_t,X_par use wave_func, ONLY:WF use R_lattice, ONLY:qindx_S,bz_samp,G_m_G,nqibz use D_lattice, ONLY:nsym,i_time_rev,i_space_inv,mag_syms @@ -191,7 +191,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! ! Plasmon-Pole/Static interaction DB I/O ! - call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1,2/),MODE=VERIFY,ID=ID) + 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.and.io_RESPONSE) call error('Incomplete and/or broken PPA/Static diel. fun. database') ! From c45c5ac65bbe5abb9293e13841fa7a93547cd093 Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Wed, 8 Jul 2020 12:25:18 +0200 Subject: [PATCH 009/110] intermediate step-not to deallocate X_par --- src/pol_function/X_dielectric_matrix.F | 8 ++++++-- src/qp/QP_ppa_cohsex.F | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/pol_function/X_dielectric_matrix.F b/src/pol_function/X_dielectric_matrix.F index 8229333d10..7069d73a57 100644 --- a/src/pol_function/X_dielectric_matrix.F +++ b/src/pol_function/X_dielectric_matrix.F @@ -26,7 +26,7 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) ! Calculates and stores on file the dielectric matrix. ! use pars, ONLY:SP,cZERO - use drivers, ONLY:l_alda_fxc,l_gw0,l_life + use drivers, ONLY:l_alda_fxc,l_gw0,l_life,l_ppa use DIPOLES, ONLY:DIPOLE_t,DIP_alloc use X_m, ONLY:X_t,X_alloc,self_detect_E_range,X_poles,l_recalculate_X,& & l_X_terminator,X_terminator_Kind,X_mat,X_par,X_par_lower_triangle,& @@ -291,7 +291,9 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) ! ! CLEAN (2) ! - if (io_RESPONSE) call X_PARALLEL_alloc(X_par(iq_mem),0,0,"CLEAN") + if (.not.l_ppa) then + if (io_RESPONSE) call X_PARALLEL_alloc(X_par(iq_mem),0,0,"CLEAN") + endif YAMBO_FREE(X_par_lower_triangle%blc) call MATRIX_reset(X_par_lower_triangle) ! @@ -310,8 +312,10 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) #if !defined _PAR_IO YAMBO_FREE(X_mat) #endif + if (.not.l_ppa) then deallocate(X_par) endif + endif if (allocated(FXC)) then YAMBO_FREE(FXC) endif diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 1fcb885f04..2583edbbe1 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -149,6 +149,9 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! call k_expand(k) ! + if (allocated(X_par)) then + call msg('r','X_par é allocata ') + endif ! WF distributed & load !======================= ! From 07bfcefbaf91883ee4f52f0bac87ed9477297711 Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Thu, 9 Jul 2020 12:07:49 +0200 Subject: [PATCH 010/110] introducing par_IO reading --- src/io/io_X.F | 11 ++++------- src/parallel/PARALLEL_global_Self_Energy.F | 4 +++- src/pol_function/X_dielectric_matrix.F | 19 +++++++++++-------- src/qp/QP_ppa_cohsex.F | 3 --- 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/io/io_X.F b/src/io/io_X.F index 4219af326e..3ab6117fc7 100644 --- a/src/io/io_X.F +++ b/src/io/io_X.F @@ -212,20 +212,17 @@ integer function io_X(X,Xw,ID) call io_variable_bulk(ID,1,C3=X_par(1)%blc(:,:,:Xw%n_freqs),IPOS=(/1,X_par(1)%rows(1),X_par(1)%cols(1),1/)) ! else if(read_is_on(ID)) then -!#endif - ! -! if (.not.allocated(X_mat).and.read_is_on(ID)) call X_alloc('X',(/X%ng,X%ng,Xw%n_freqs/)) -! call def_variable_bulk(ID,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP) -! call io_variable_bulk(ID,1,C3=X_mat(:,:,:Xw%n_freqs),IPOS=(/1,1,1,1/)) ! if (.not.allocated(X_par(1)).and.read_is_on(ID)) then YAMBO_ALLOC(X_par(1)%blc,(X_par(1)%rows(1):X_par(1)%rows(2),X_par(1)%cols(1):X_par(1)%cols(2),Xw%n_freqs)) endif call def_variable_bulk(ID,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP,par_io_kind='collective') call io_variable_bulk(ID,1,C3=X_par(1)%blc(:,:,:Xw%n_freqs),IPOS=(/1,X_par(1)%rows(1),X_par(1)%cols(1),1/)) -#endif -#if defined _PAR_IO endif +#else + if (.not.allocated(X_mat).and.read_is_on(ID)) call X_alloc('X',(/X%ng,X%ng,Xw%n_freqs/)) + call def_variable_bulk(ID,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP) + call io_variable_bulk(ID,1,C3=X_mat(:,:,:Xw%n_freqs),IPOS=(/1,1,1,1/)) #endif ! if (read_is_on(ID) .and. different_db_RL_order) then diff --git a/src/parallel/PARALLEL_global_Self_Energy.F b/src/parallel/PARALLEL_global_Self_Energy.F index a26292a9ba..ee5f7f02ae 100644 --- a/src/parallel/PARALLEL_global_Self_Energy.F +++ b/src/parallel/PARALLEL_global_Self_Energy.F @@ -91,7 +91,9 @@ subroutine PARALLEL_global_Self_Energy(E,Xk,q) & COMM_A2A_1=PAR_COM_Q_A2A,& & COMM_A2A_2=PAR_COM_RL_A2A,& & COMM_A2A_3=PAR_COM_QP_A2A) - ! + + +! ! COMMs setup ! call COMM_copy(PAR_COM_Q_A2A,PAR_COM_SE_WORLD) diff --git a/src/pol_function/X_dielectric_matrix.F b/src/pol_function/X_dielectric_matrix.F index 7069d73a57..6042453a65 100644 --- a/src/pol_function/X_dielectric_matrix.F +++ b/src/pol_function/X_dielectric_matrix.F @@ -26,7 +26,7 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) ! Calculates and stores on file the dielectric matrix. ! use pars, ONLY:SP,cZERO - use drivers, ONLY:l_alda_fxc,l_gw0,l_life,l_ppa + use drivers, ONLY:l_alda_fxc,l_gw0,l_life use DIPOLES, ONLY:DIPOLE_t,DIP_alloc use X_m, ONLY:X_t,X_alloc,self_detect_E_range,X_poles,l_recalculate_X,& & l_X_terminator,X_terminator_Kind,X_mat,X_par,X_par_lower_triangle,& @@ -234,6 +234,7 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) ! Allocation ! iq_mem=PAR_Q_ibz_index(iq) + print*,'iq_mem= ',iq_mem if (io_RESPONSE) iq_mem=1 call X_PARALLEL_alloc(X_par(iq_mem),X%ng,Xw%n_freqs,"XUP") ! @@ -290,10 +291,14 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) endif ! ! CLEAN (2) - ! - if (.not.l_ppa) then - if (io_RESPONSE) call X_PARALLEL_alloc(X_par(iq_mem),0,0,"CLEAN") - endif + ! + print*,iq, iq_mem + print*, X_par(iq_mem)%rows(1) + print*, X_par(iq_mem)%rows(2) + print*,' ' + print*,' ' + + if (io_RESPONSE) call X_PARALLEL_alloc(X_par(iq_mem),0,0,"CLEAN") YAMBO_FREE(X_par_lower_triangle%blc) call MATRIX_reset(X_par_lower_triangle) ! @@ -312,10 +317,8 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) #if !defined _PAR_IO YAMBO_FREE(X_mat) #endif - if (.not.l_ppa) then deallocate(X_par) - endif - endif + endif if (allocated(FXC)) then YAMBO_FREE(FXC) endif diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 2583edbbe1..1fcb885f04 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -149,9 +149,6 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! call k_expand(k) ! - if (allocated(X_par)) then - call msg('r','X_par é allocata ') - endif ! WF distributed & load !======================= ! From b41d478ee3484eb4cfaf112c5e9c8b19692c55d2 Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Thu, 9 Jul 2020 12:14:41 +0200 Subject: [PATCH 011/110] deleting the if else on write and read --- src/io/io_X.F | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/io/io_X.F b/src/io/io_X.F index 3ab6117fc7..de62b18a8d 100644 --- a/src/io/io_X.F +++ b/src/io/io_X.F @@ -206,19 +206,11 @@ integer function io_X(X,Xw,ID) ch="X_Q_"//trim(intc(iq)) ! #if defined _PAR_IO - if(write_is_on(ID)) then - ! - call def_variable_bulk(ID,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP,par_io_kind='collective') - call io_variable_bulk(ID,1,C3=X_par(1)%blc(:,:,:Xw%n_freqs),IPOS=(/1,X_par(1)%rows(1),X_par(1)%cols(1),1/)) - ! - else if(read_is_on(ID)) then - ! if (.not.allocated(X_par(1)).and.read_is_on(ID)) then YAMBO_ALLOC(X_par(1)%blc,(X_par(1)%rows(1):X_par(1)%rows(2),X_par(1)%cols(1):X_par(1)%cols(2),Xw%n_freqs)) endif call def_variable_bulk(ID,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP,par_io_kind='collective') call io_variable_bulk(ID,1,C3=X_par(1)%blc(:,:,:Xw%n_freqs),IPOS=(/1,X_par(1)%rows(1),X_par(1)%cols(1),1/)) - endif #else if (.not.allocated(X_mat).and.read_is_on(ID)) call X_alloc('X',(/X%ng,X%ng,Xw%n_freqs/)) call def_variable_bulk(ID,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP) From bf51c836cda8cc7dc655dac6393e17265410149a Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Thu, 9 Jul 2020 14:43:21 +0200 Subject: [PATCH 012/110] bug X_par allocation --- src/io/io_X.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io/io_X.F b/src/io/io_X.F index de62b18a8d..8fff92cc90 100644 --- a/src/io/io_X.F +++ b/src/io/io_X.F @@ -206,7 +206,7 @@ integer function io_X(X,Xw,ID) ch="X_Q_"//trim(intc(iq)) ! #if defined _PAR_IO - if (.not.allocated(X_par(1)).and.read_is_on(ID)) then + if (.not.allocated(X_par).and.read_is_on(ID)) then YAMBO_ALLOC(X_par(1)%blc,(X_par(1)%rows(1):X_par(1)%rows(2),X_par(1)%cols(1):X_par(1)%cols(2),Xw%n_freqs)) endif call def_variable_bulk(ID,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP,par_io_kind='collective') From c436510ea29683e714c37cc8849436385970045c Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Fri, 10 Jul 2020 13:58:00 +0200 Subject: [PATCH 013/110] PAR_n_G_vectors also for SE --- src/parallel/PARALLEL_global_dimensions.F | 1 + 1 file changed, 1 insertion(+) diff --git a/src/parallel/PARALLEL_global_dimensions.F b/src/parallel/PARALLEL_global_dimensions.F index 4c116ce881..ed0739b4f1 100644 --- a/src/parallel/PARALLEL_global_dimensions.F +++ b/src/parallel/PARALLEL_global_dimensions.F @@ -99,6 +99,7 @@ subroutine PARALLEL_global_dimensions(E,Xk,q,ENVIRONMENT) if (ENVIRONMENT=="Response_G_space") PAR_Q_ibz_range=(/PAR_X_iq(1),PAR_X_iq(2)/) if (ENVIRONMENT=="Real_Time" ) PAR_Q_bz_range=(/1,nqbz/) if (ENVIRONMENT=="Self_Energy" ) then + PAR_n_G_vectors= X_ng #if defined _SC if (l_sc_run.and.& & any( (/P_collisions%N,COH_collisions%N,HXC_collisions%N/)> 0)) & From 4676d4d75156654975eeaf67628901fbedd33829 Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Tue, 14 Jul 2020 16:09:49 +0200 Subject: [PATCH 014/110] X_mat_d allocation only where needed (bse/K_screened_interation) --- src/bse/K_screened_interaction.F | 2 ++ src/modules/mod_X.F | 5 ----- src/pol_function/X_dielectric_matrix.F | 6 ------ 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/bse/K_screened_interaction.F b/src/bse/K_screened_interaction.F index 56a7bae262..5030a40d82 100644 --- a/src/bse/K_screened_interaction.F +++ b/src/bse/K_screened_interaction.F @@ -144,6 +144,8 @@ subroutine K_screened_interaction(X,Xw,q,io_X_err) ! #ifdef _CUDA ! device <- host transfer + allocate(X_mat_d, source=X_mat) + ! X_mat_d=X_mat ! ! CUDA Fortran workarounds diff --git a/src/modules/mod_X.F b/src/modules/mod_X.F index 1744499fc1..542fb38fbe 100644 --- a/src/modules/mod_X.F +++ b/src/modules/mod_X.F @@ -116,7 +116,6 @@ module X_m integer :: X_rows(2) = 0 integer :: X_cols(2) = 0 complex(SP), allocatable :: X_mat(:,:,:) - complex(SP), allocatable DEV_ATTR :: X_mat_d(:,:,:) ! type X_t integer :: whoami ! 1:Xo 2:em1s 3:em1d 4:pp @@ -173,9 +172,6 @@ subroutine X_alloc(what,d) if (allocated(X_mat)) return YAMBO_ALLOC(X_mat,(d(1),d(2),d(3))) X_mat=cZERO -#ifdef _CUDA - allocate(X_mat_d, source=X_mat) -#endif end select else select case(what) @@ -192,7 +188,6 @@ subroutine X_alloc(what,d) ! and the matrix itself ! YAMBO_FREE(X_mat) - YAMBO_FREE(X_mat_d) ! end select endif diff --git a/src/pol_function/X_dielectric_matrix.F b/src/pol_function/X_dielectric_matrix.F index 6042453a65..0160b29bdc 100644 --- a/src/pol_function/X_dielectric_matrix.F +++ b/src/pol_function/X_dielectric_matrix.F @@ -292,12 +292,6 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) ! ! CLEAN (2) ! - print*,iq, iq_mem - print*, X_par(iq_mem)%rows(1) - print*, X_par(iq_mem)%rows(2) - print*,' ' - print*,' ' - if (io_RESPONSE) call X_PARALLEL_alloc(X_par(iq_mem),0,0,"CLEAN") YAMBO_FREE(X_par_lower_triangle%blc) call MATRIX_reset(X_par_lower_triangle) From 0af23bd134bef7211e96807b413c0770e1fb9ce0 Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Tue, 14 Jul 2020 16:18:02 +0200 Subject: [PATCH 015/110] restoring par_io only for writing --- src/io/io_X.F | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/io/io_X.F b/src/io/io_X.F index 8fff92cc90..7d9d020fed 100644 --- a/src/io/io_X.F +++ b/src/io/io_X.F @@ -206,15 +206,20 @@ integer function io_X(X,Xw,ID) ch="X_Q_"//trim(intc(iq)) ! #if defined _PAR_IO - if (.not.allocated(X_par).and.read_is_on(ID)) then - YAMBO_ALLOC(X_par(1)%blc,(X_par(1)%rows(1):X_par(1)%rows(2),X_par(1)%cols(1):X_par(1)%cols(2),Xw%n_freqs)) - endif + if(write_is_on(ID)) then + ! call def_variable_bulk(ID,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP,par_io_kind='collective') call io_variable_bulk(ID,1,C3=X_par(1)%blc(:,:,:Xw%n_freqs),IPOS=(/1,X_par(1)%rows(1),X_par(1)%cols(1),1/)) -#else + ! + else if(read_is_on(ID)) then +#endif + ! if (.not.allocated(X_mat).and.read_is_on(ID)) call X_alloc('X',(/X%ng,X%ng,Xw%n_freqs/)) call def_variable_bulk(ID,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP) call io_variable_bulk(ID,1,C3=X_mat(:,:,:Xw%n_freqs),IPOS=(/1,1,1,1/)) + ! +#if defined _PAR_IO + endif #endif ! if (read_is_on(ID) .and. different_db_RL_order) then From f54f64bbb4dc35bfdb942f22155044501fadfabd Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Tue, 14 Jul 2020 16:23:57 +0200 Subject: [PATCH 016/110] X_mat_d declared in X_m --- src/modules/mod_X.F | 1 + src/pol_function/X_dielectric_matrix.F | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/mod_X.F b/src/modules/mod_X.F index 542fb38fbe..4e8658ee25 100644 --- a/src/modules/mod_X.F +++ b/src/modules/mod_X.F @@ -116,6 +116,7 @@ module X_m integer :: X_rows(2) = 0 integer :: X_cols(2) = 0 complex(SP), allocatable :: X_mat(:,:,:) + complex(SP), allocatable DEV_ATTR :: X_mat_d(:,:,:) ! type X_t integer :: whoami ! 1:Xo 2:em1s 3:em1d 4:pp diff --git a/src/pol_function/X_dielectric_matrix.F b/src/pol_function/X_dielectric_matrix.F index 0160b29bdc..f78237d19c 100644 --- a/src/pol_function/X_dielectric_matrix.F +++ b/src/pol_function/X_dielectric_matrix.F @@ -234,7 +234,6 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) ! Allocation ! iq_mem=PAR_Q_ibz_index(iq) - print*,'iq_mem= ',iq_mem if (io_RESPONSE) iq_mem=1 call X_PARALLEL_alloc(X_par(iq_mem),X%ng,Xw%n_freqs,"XUP") ! From 41d2ab97d67c323e583a2383cfb469a035b2df0d Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Wed, 15 Jul 2020 11:36:05 +0200 Subject: [PATCH 017/110] temporary X_par_alloc in qp --- src/qp/QP_ppa_cohsex.F | 76 +++++++++++++++++++-------- src/qp/X_PARALLEL_alloc.F | 106 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+), 22 deletions(-) create mode 100644 src/qp/X_PARALLEL_alloc.F diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 1fcb885f04..3b31a58f53 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -34,8 +34,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) use com, ONLY:msg use drivers, ONLY:l_ppa,l_cohsex,l_sc_srpa,l_sc_sex,l_sc_coh,l_sc_run,l_rt_carriers_in_use use parallel_m, ONLY:PP_redux_wait,PAR_IND_Xk_ibz,PAR_IND_G_b,PAR_IND_QP,& -& 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 +& PAR_IND_Q_ibz,PAR_IND_Q_ibz_ID,PAR_IND_QP_ID,PAR_nQ_ibz,PAR_COM_SE_WORLD,& +& PAR_Q_ibz_index,n_WF_bands_to_load,HEAD_QP_cpu,PAR_COM_SE_WORLD_RL_resolved use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc use functions, ONLY:bose_f use IO_m, ONLY:io_control,manage_action,OP_RD_CL,REP,VERIFY,NONE,OP_RD,RD_CL_IF_END,& @@ -78,6 +78,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! 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 ::iw,iw_X_mat complex(SP), allocatable ::W_(:),dc(:),eet_factor(:,:) type(elemental_collision),target ::isc,iscp character(schlen)::ch,SECTION_name,W_name @@ -202,6 +203,16 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! ALLOCATION !------------ ! + if (.not.allocated(X_par)) then + ! + if (io_RESPONSE) then + allocate(X_par(1)) + else + allocate(X_par(PAR_nQ_ibz)) + endif + ! + endif + ! if (l_sc_coh.or.l_sc_sex.or.l_cohsex.or.l_sc_srpa) then if (io_RESPONSE) call X_alloc('X',(/X%ng,X%ng,1/)) allocate(dc(2)) @@ -313,7 +324,26 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) X_is_TR_rotated=.true. endif ! - if (have_cuda) call dev_memcpy(X_mat_d, X_mat) + !!if (have_cuda) call dev_memcpy(X_mat_d, X_mat) + ! + ! + !mapping of X_par from X_mat + if (io_RESPONSE) iq_mem=1 + call X_PARALLEL_alloc(X_par(iq_mem),X%ng,Xw%n_freqs,"X") + ! + do iw=1,Xw%n_freqs + ! + X_par(iq_mem)%I=iw + ! + if ( io_RESPONSE) iw_X_mat=iw + if (.not.io_RESPONSE) iw_X_mat=(iq_mem-1)*Xw%n_freqs+iw + ! + X_par(iq_mem)%blc(:,:,iw)=X_mat(X_par(iq_mem)%rows(1):X_par(iq_mem)%rows(2),& +& X_par(iq_mem)%cols(1):X_par(iq_mem)%cols(2),iw_X_mat) + enddo + ! + if (have_cuda) call dev_memcpy(X_par(iq_mem)%blc_d, X_par(iq_mem)%blc) + ! ! QP_loop: do i_qp=i_qp_to_start,QP_n_states ! @@ -388,17 +418,17 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! if (X_is_TR_rotated) then !$omp parallel do default(shared), private(ig1,ig2), reduction(+:dp_dummy) - do ig2=1,X%ng - do ig1=1,X%ng - dp_dummy=dp_dummy+cmplx(2._SP*pi*isc%rhotw(G_m_G(ig2,ig1))*X_mat(ig1,ig2,X_range(1)),kind=DP) + do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) + do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) + dp_dummy=dp_dummy+cmplx(2._SP*pi*isc%rhotw(G_m_G(ig2,ig1))*X_par(iq_mem)%blc(ig1,ig2,X_range(1)),kind=DP) enddo enddo !$omp end parallel do else !$omp parallel do default(shared), private(ig1,ig2), reduction(+:dp_dummy) - do ig2=1,X%ng - do ig1=1,X%ng - dp_dummy=dp_dummy+cmplx(2._SP*pi*isc%rhotw(G_m_G(ig1,ig2))*X_mat(ig1,ig2,X_range(1)),kind=DP) + do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) + do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) + dp_dummy=dp_dummy+cmplx(2._SP*pi*isc%rhotw(G_m_G(ig1,ig2))*X_par(iq_mem)%blc(ig1,ig2,X_range(1)),kind=DP) enddo enddo !$omp end parallel do @@ -488,11 +518,11 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) dp_dummy_i = 0.0_DP ! !$cuf kernel do(2) - do ig2=1,Xng - do ig1=1,Xng + do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) + do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) ! - PPA_E= real(XppaE/X_mat_d(ig1,ig2,Xr2),kind=SP) - PPA_R=-X_mat_d(ig1,ig2,Xr1)/2._SP*PPA_E*isc_gamp_d(ig1,ig2) + PPA_E= real(XppaE/X_par(iq_mem)%blc_d(ig1,ig2,Xr2),kind=SP) + PPA_R=-X_par(iq_mem)%blc_d(ig1,ig2,Xr1)/2._SP*PPA_E*isc_gamp_d(ig1,ig2) ! inline bose_f function bose_PPA_E=0. @@ -526,11 +556,11 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! dp_dummy = 0.0_DP !$omp parallel do default(shared), private(ig1,ig2,PPA_E,PPA_R,ctmp), reduction(+:dp_dummy) - do ig2=1,X%ng - do ig1=1,X%ng + do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) + do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) ! - PPA_E= real(X%ppaE/X_mat(ig1,ig2,X_range(2)),kind=SP) - PPA_R=-X_mat(ig1,ig2,X_range(1))/2._SP*PPA_E*isc%gamp(ig1,ig2) + PPA_E= real(X%ppaE/X_par(iq_mem)%blc(ig1,ig2,X_range(2)),kind=SP) + PPA_R=-X_par(iq_mem)%blc(ig1,ig2,X_range(1))/2._SP*PPA_E*isc%gamp(ig1,ig2) ! ctmp = -4._SP/spin_occ*pi*isc%rhotw(ig1)*conjg(iscp%rhotw(ig2))*(-PPA_R)*& & ( (spin_occ-f_kmq+bose_f(PPA_E))/(W_(i_w)-E_kmq-PPA_E)+& @@ -551,7 +581,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! else if (l_sc_sex.or.l_cohsex.or.(l_sc_coh.and.COHSEX_use_empties)) then ! - call M_by_V('N', X%ng, X_mat(:,:,X_range(1)), conjg(iscp%rhotw), local_rhotw) + call M_by_V('N', X%ng, X_par(iq_mem)%blc(:,:,X_range(1)), conjg(iscp%rhotw), local_rhotw) ! pre_factor=0.0_SP !$omp parallel do default(shared), private(ig1), reduction(+:pre_factor) @@ -586,11 +616,11 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) dp_dummy=0.0_DP ! !$omp parallel do default(shared), private(ig1,ig2,PPA_E,PPA_R), reduction(+:dp_dummy) - do ig2=1,X%ng - do ig1=1,X%ng + do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) + do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) ! - PPA_E=X%ppaE/real(X_mat(ig1,ig2,X_range(2))) - PPA_R=-X_mat(ig1,ig2,X_range(1))/2._SP*PPA_E*isc%gamp(ig1,ig2) + PPA_E=X%ppaE/real(X_par(iq_mem)%blc(ig1,ig2,X_range(2))) + PPA_R=-X_par(iq_mem)%blc(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),& @@ -609,6 +639,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) enddo QP_loop ! enddo Q_loop + ! + call PP_redux_wait(QP_Sc(:,:),COMM=PAR_COM_SE_WORLD%COMM) ! call live_timing() ! diff --git a/src/qp/X_PARALLEL_alloc.F b/src/qp/X_PARALLEL_alloc.F new file mode 100644 index 0000000000..40861be79c --- /dev/null +++ b/src/qp/X_PARALLEL_alloc.F @@ -0,0 +1,106 @@ +! +! Copyright (C) 2000-2020 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 X_PARALLEL_alloc(X_par,NG,NW,mode) + ! + use pars, ONLY:cZERO + use parallel_m, ONLY:COMM_copy,PAR_COM_RL_INDEX,PAR_COM_RL_A2A + use matrix, ONLY:MATRIX_reset,PAR_matrix + use X_m, ONLY:X_par_lower_triangle,X_rows,X_cols,& +& X_FILL_UP_matrix_only,X_lower_triangle_matrix_in_use + use interfaces, ONLY:PARALLEL_live_message + use cuda_m, ONLY:have_cuda + ! +#include + ! + type(PAR_matrix) :: X_par + integer :: NG,NW + character(*) :: mode + ! + ! Work Space + ! + logical :: l_XUP,l_PAR,l_CPU_ONLY + ! + ! Reset... + ! + call MATRIX_reset(X_par) + ! + ! Type of allocation.... + ! + !l_XUP =mode=="XUP" + !l_PAR =mode=="X" + l_XUP = index(mode,"XUP")>0 + l_PAR = index(mode,"X")>0.and.index(mode,"XUP")==0 + l_CPU_ONLY = index(mode,"CPU_ONLY")>0 + ! + ! Clean-up + ! + if (mode=="CLEAN") then + YAMBO_FREE(X_par%blc) + YAMBO_FREE(X_par%blc_d) + call MATRIX_reset(X_par) + return + endif + ! + ! 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 ) + endif + ! + X_rows = X_par%rows + X_cols = X_par%cols + ! + if (l_XUP.and..not.X_FILL_UP_matrix_only.and.X_par%INTER_comm%n_CPU>1) then + ! + call MATRIX_reset(X_par_lower_triangle) + X_lower_triangle_matrix_in_use=.TRUE. + X_par_lower_triangle%kind ="XDN" + X_par_lower_triangle%rows =X_par%cols + X_par_lower_triangle%cols =X_par%rows + X_par_lower_triangle%nrows=X_par%ncols + X_par_lower_triangle%ncols=X_par%nrows + ! + YAMBO_ALLOC(X_par_lower_triangle%blc,(X_par%cols(1):X_par%cols(2),X_par%rows(1):X_par%rows(2),NW)) + X_par_lower_triangle%blc=cZERO + if (have_cuda.and..not.l_CPU_ONLY) then + YAMBO_ALLOC(X_par_lower_triangle%blc_d,(X_par%cols(1):X_par%cols(2),X_par%rows(1):X_par%rows(2),NW)) + X_par_lower_triangle%blc_d=cZERO + endif + ! + call COMM_copy(PAR_COM_RL_A2A, X_par_lower_triangle%INTRA_comm) + call COMM_copy(PAR_COM_RL_INDEX, X_par_lower_triangle%INTER_comm) + endif + ! + 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_cuda.and..not.l_CPU_ONLY) then + YAMBO_ALLOC(X_par%blc_d,(X_par%rows(1):X_par%rows(2),X_par%cols(1):X_par%cols(2),NW)) + X_par%blc_d=cZERO + endif + ! + call PARALLEL_live_message("RL vectors(X)",LOADED=X_par%ncols*X_par%nrows,TOTAL=NG**2,NCPU=X_par%INTER_comm%n_CPU) + ! +end subroutine From 951b817df092447e16d318dd4351057683416728 Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Wed, 15 Jul 2020 12:16:49 +0200 Subject: [PATCH 018/110] working - still X_parallel_alloc in qp folder also some print to be deleted but for now useful --- src/pol_function/X_dielectric_matrix.F | 4 ++++ src/qp/QP_ppa_cohsex.F | 21 ++++++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/pol_function/X_dielectric_matrix.F b/src/pol_function/X_dielectric_matrix.F index f78237d19c..a869953a4e 100644 --- a/src/pol_function/X_dielectric_matrix.F +++ b/src/pol_function/X_dielectric_matrix.F @@ -237,6 +237,10 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) if (io_RESPONSE) iq_mem=1 call X_PARALLEL_alloc(X_par(iq_mem),X%ng,Xw%n_freqs,"XUP") ! + print*,'X',iq_mem + print*, X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) + print*, X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) + call X_irredux(iq,X_par(iq_mem),Xen,Xk,Xw,X,Dip) ! ! When X%whoami == 1 X is Xo (ACFDT). diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 3b31a58f53..87464633b6 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -338,10 +338,13 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) if ( io_RESPONSE) iw_X_mat=iw if (.not.io_RESPONSE) iw_X_mat=(iq_mem-1)*Xw%n_freqs+iw ! - X_par(iq_mem)%blc(:,:,iw)=X_mat(X_par(iq_mem)%rows(1):X_par(iq_mem)%rows(2),& -& X_par(iq_mem)%cols(1):X_par(iq_mem)%cols(2),iw_X_mat) + X_par(iq_mem)%blc(:,:,iw)=X_mat(X_par(iq_mem)%rows(1):X_par(iq_mem)%rows(2)+1,& +& X_par(iq_mem)%cols(1):X_par(iq_mem)%cols(2)+1,iw_X_mat) enddo ! + print*,'qp',iq_mem + print*, X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2)+1 + print*, X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2)+1 if (have_cuda) call dev_memcpy(X_par(iq_mem)%blc_d, X_par(iq_mem)%blc) ! ! @@ -395,16 +398,16 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) if ( HEAD_QP_cpu ) then if (X_is_TR_rotated) then !$omp parallel do default(shared), private(ig1,ig2) - do ig2=1,X%ng - do ig1=1,X%ng + do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) + do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) eet_factor(ig1,ig2)=isc%rhotw(G_m_G(ig2,ig1)) enddo enddo !$omp end parallel do else !$omp parallel do default(shared), private(ig1,ig2) - do ig2=1,X%ng - do ig1=1,X%ng + do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) + do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) eet_factor(ig1,ig2)=isc%rhotw(G_m_G(ig1,ig2)) enddo enddo @@ -486,8 +489,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! if(l_GW_terminator) then !$omp parallel do default(shared), private(ig1,ig2) - do ig2=1,X%ng - do ig1=1,X%ng + do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) + do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) eet_factor(ig1,ig2)=eet_factor(ig1,ig2)-isc%rhotw(ig1)*conjg(iscp%rhotw(ig2)) enddo enddo @@ -585,7 +588,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! pre_factor=0.0_SP !$omp parallel do default(shared), private(ig1), reduction(+:pre_factor) - do ig1=1,X%ng + do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) pre_factor=pre_factor+isc%rhotw(ig1)*local_rhotw(ig1) enddo !$omp end parallel do From fef69282fed191103391160edd8eb6f1dbdd86a5 Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Wed, 15 Jul 2020 18:22:13 +0200 Subject: [PATCH 019/110] bug fix --- src/qp/QP_ppa_cohsex.F | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 87464633b6..8ca45d2f15 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -338,8 +338,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) if ( io_RESPONSE) iw_X_mat=iw if (.not.io_RESPONSE) iw_X_mat=(iq_mem-1)*Xw%n_freqs+iw ! - X_par(iq_mem)%blc(:,:,iw)=X_mat(X_par(iq_mem)%rows(1):X_par(iq_mem)%rows(2)+1,& -& X_par(iq_mem)%cols(1):X_par(iq_mem)%cols(2)+1,iw_X_mat) + X_par(iq_mem)%blc(:,:,iw)=X_mat(X_par(iq_mem)%rows(1):X_par(iq_mem)%rows(2),& +& X_par(iq_mem)%cols(1):X_par(iq_mem)%cols(2),iw_X_mat) enddo ! print*,'qp',iq_mem From cbf7f0e601c4558af28f7c32a73f1fb912a952c8 Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Thu, 16 Jul 2020 17:05:02 +0200 Subject: [PATCH 020/110] bug fix --- src/qp/QP_ppa_cohsex.F | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 8ca45d2f15..a17b69253d 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -343,8 +343,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) enddo ! print*,'qp',iq_mem - print*, X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2)+1 - print*, X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2)+1 + print*, X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) + print*, X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) if (have_cuda) call dev_memcpy(X_par(iq_mem)%blc_d, X_par(iq_mem)%blc) ! ! @@ -642,8 +642,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) enddo QP_loop ! enddo Q_loop - ! - call PP_redux_wait(QP_Sc(:,:),COMM=PAR_COM_SE_WORLD%COMM) + ! + call PP_redux_wait(QP_Sc,COMM=PAR_COM_SE_WORLD%COMM) ! call live_timing() ! From 5562ae4e223473a9cada6b48e3c8d7f529953382 Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Thu, 16 Jul 2020 18:36:17 +0200 Subject: [PATCH 021/110] just one redux wait in qp --- src/pol_function/X_dielectric_matrix.F | 5 ++++- src/qp/QP_ppa_cohsex.F | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/pol_function/X_dielectric_matrix.F b/src/pol_function/X_dielectric_matrix.F index a869953a4e..c3393f3b03 100644 --- a/src/pol_function/X_dielectric_matrix.F +++ b/src/pol_function/X_dielectric_matrix.F @@ -34,7 +34,7 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) use frequency, ONLY:w_samp use R_lattice, ONLY:bz_samp,nqibz use electrons, ONLY:levels - use parallel_m, ONLY:PP_redux_wait,PAR_IND_Q_ibz,PAR_Q_ibz_index,PAR_nQ_ibz,& + use parallel_m, ONLY:PP_redux_wait,PAR_IND_Q_ibz,PAR_Q_ibz_index,PAR_nQ_ibz,myid,& & PAR_IND_Xk_ibz,PAR_IND_CON_BANDS_X,PAR_IND_VAL_BANDS_X,PAR_COM_X_WORLD,& & PAR_COM_X_WORLD_RL_resolved use wave_func, ONLY:WF_buffered_IO,WF,WF_buffer @@ -237,9 +237,12 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) if (io_RESPONSE) iq_mem=1 call X_PARALLEL_alloc(X_par(iq_mem),X%ng,Xw%n_freqs,"XUP") ! + !MB! print*,'X',iq_mem + print*,'id= ',myid print*, X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) print*, X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) + print*,' ' call X_irredux(iq,X_par(iq_mem),Xen,Xk,Xw,X,Dip) ! diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index a17b69253d..99782e2ad4 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -33,7 +33,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) use LIVE_t, ONLY:live_timing use com, ONLY:msg use drivers, ONLY:l_ppa,l_cohsex,l_sc_srpa,l_sc_sex,l_sc_coh,l_sc_run,l_rt_carriers_in_use - use parallel_m, ONLY:PP_redux_wait,PAR_IND_Xk_ibz,PAR_IND_G_b,PAR_IND_QP,& + use parallel_m, ONLY:PP_redux_wait,PAR_IND_Xk_ibz,PAR_IND_G_b,PAR_IND_QP,myid,& & PAR_IND_Q_ibz,PAR_IND_Q_ibz_ID,PAR_IND_QP_ID,PAR_nQ_ibz,PAR_COM_SE_WORLD,& & PAR_Q_ibz_index,n_WF_bands_to_load,HEAD_QP_cpu,PAR_COM_SE_WORLD_RL_resolved use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc @@ -342,9 +342,12 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) & X_par(iq_mem)%cols(1):X_par(iq_mem)%cols(2),iw_X_mat) enddo ! + !MB! print*,'qp',iq_mem + print*,'id= ',myid print*, X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) print*, X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) + print*,' ' if (have_cuda) call dev_memcpy(X_par(iq_mem)%blc_d, X_par(iq_mem)%blc) ! ! @@ -643,8 +646,6 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! enddo Q_loop ! - call PP_redux_wait(QP_Sc,COMM=PAR_COM_SE_WORLD%COMM) - ! call live_timing() ! ! CLEAN From a31a0158fd9834d2fa71bae968dc16898301c816 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Fri, 17 Jul 2020 12:04:21 +0200 Subject: [PATCH 022/110] G-parallelism of SE fixed; preliminary tests are ok on CPUs --- src/modules/mod_wrapper.F | 30 ++++++++++++++++------- src/pol_function/X_dielectric_matrix.F | 7 ------ src/qp/QP_ppa_cohsex.F | 6 ----- src/qp/XCo_Hartree_Fock.F | 33 +++++++++++++++++++------- 4 files changed, 46 insertions(+), 30 deletions(-) diff --git a/src/modules/mod_wrapper.F b/src/modules/mod_wrapper.F index 15895f8ec6..4e1679d5d1 100644 --- a/src/modules/mod_wrapper.F +++ b/src/modules/mod_wrapper.F @@ -29,7 +29,7 @@ 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,DP,cI #ifdef _CUDA use cublas #endif @@ -391,29 +391,43 @@ end function Vstar_dot_V_c2_gpu ! DOT PRODUCTS: Vstar_dot_VV !============== ! - complex(SP) function Vstar_dot_VV_c1_cpu(N,CX,CY,CZ) + complex(SP) function Vstar_dot_VV_c1_cpu(N,CX,CY,CZ,bounds) implicit none integer, intent(in) :: N complex(SP),intent(in) :: CX(N),CY(N),CZ(N) + integer, optional, intent(in) :: bounds(2) + ! + integer :: bounds_(2),N_ + complex(DP), external :: zdotc + complex(SP), external :: cdotc + ! + bounds_(:)=(/1,N/) + if (present(bounds)) bounds_=bounds + N_=bounds_(2)-bounds_(1)+1 + ! #if defined _DOUBLE - complex(SP)::zdotc - Vstar_dot_VV_c1_cpu=ZDOTC(N,CX,1,CY*CZ,1) + Vstar_dot_VV_c1_cpu=ZDOTC(N_,CX(bounds_(1):),1,CY(bounds_(1):)*CZ(bounds_(1):),1) #else - complex(SP)::cdotc - Vstar_dot_VV_c1_cpu=CDOTC(N,CX,1,CY*CZ,1) + Vstar_dot_VV_c1_cpu=CDOTC(N_,CX(bounds_(1):),1,CY(bounds_(1):)*CZ(bounds_(1):),1) #endif end function Vstar_dot_VV_c1_cpu ! #ifdef _CUDA - complex(SP) function Vstar_dot_VV_c1_gpu(N,CX,CY,CZ) + complex(SP) function Vstar_dot_VV_c1_gpu(N,CX,CY,CZ,bounds) implicit none integer, intent(in) :: N complex(SP), device, intent(in) :: CX(N),CY(N),CZ(N) + integer, optional, intent(in) :: bounds(2) + ! + integer :: bounds_(2) integer :: i ! + bounds_(:)=(/1,N/) + if (present(bounds)) bounds_=bounds + ! Vstar_dot_VV_c1_gpu=0.0_SP !$cuf kernel do(1) <<<*,*>>> - do i = 1, N + do i = bounds_(1),bounds_(2) Vstar_dot_VV_c1_gpu=Vstar_dot_VV_c1_gpu+conjg(CX(i))*CY(i)*CZ(i) enddo end function Vstar_dot_VV_c1_gpu diff --git a/src/pol_function/X_dielectric_matrix.F b/src/pol_function/X_dielectric_matrix.F index c3393f3b03..942468615a 100644 --- a/src/pol_function/X_dielectric_matrix.F +++ b/src/pol_function/X_dielectric_matrix.F @@ -237,13 +237,6 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) if (io_RESPONSE) iq_mem=1 call X_PARALLEL_alloc(X_par(iq_mem),X%ng,Xw%n_freqs,"XUP") ! - !MB! - print*,'X',iq_mem - print*,'id= ',myid - print*, X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) - print*, X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) - print*,' ' - call X_irredux(iq,X_par(iq_mem),Xen,Xk,Xw,X,Dip) ! ! When X%whoami == 1 X is Xo (ACFDT). diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 99782e2ad4..081ab0a3a0 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -342,12 +342,6 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) & X_par(iq_mem)%cols(1):X_par(iq_mem)%cols(2),iw_X_mat) enddo ! - !MB! - print*,'qp',iq_mem - print*,'id= ',myid - print*, X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) - print*, X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) - print*,' ' if (have_cuda) call dev_memcpy(X_par(iq_mem)%blc_d, X_par(iq_mem)%blc) ! ! diff --git a/src/qp/XCo_Hartree_Fock.F b/src/qp/XCo_Hartree_Fock.F index c4953d9455..28375c1b70 100644 --- a/src/qp/XCo_Hartree_Fock.F +++ b/src/qp/XCo_Hartree_Fock.F @@ -31,7 +31,8 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) use LIVE_t, ONLY:live_timing use stderr, ONLY:intc use electrons, ONLY:levels,spin_occ,spin - use parallel_m, ONLY:PP_redux_wait,PAR_IND_Xk_ibz,PAR_IND_QP,& + use parallel_m, ONLY:PP_redux_wait,myid,PP_indexes,PP_indexes_reset,& +& PAR_IND_Xk_ibz,PAR_IND_QP,PAR_COM_RL_INDEX,& & PAR_IND_QP_ID,PAR_IND_Q_ibz,PAR_IND_G_b,& & PAR_IND_Q_ibz_ID,n_WF_bands_to_load use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc @@ -44,7 +45,8 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) use timing_m, ONLY:timing use openmp, ONLY:OPENMP_update,master_thread,n_threads_SE use wave_func, ONLY:WF,WF_buffer,WF_buffered_IO - use interfaces, ONLY:PARALLEL_global_indexes,PARALLEL_WF_distribute,PARALLEL_WF_index,WF_load,QP_state_print + use interfaces, ONLY:PARALLEL_global_indexes,PARALLEL_WF_distribute,PARALLEL_WF_index,& +& WF_load,QP_state_print,PARALLEL_index use wrapper, ONLY:Vstar_dot_VV use global_XC, ONLY:WF_exx_screening use pseudo, ONLY:becp, pp_is_uspp @@ -60,15 +62,17 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) ! !Work Space ! - type(elemental_collision), target::isc,iscp - integer ::iq,iq_ibz,is_ibz,ib,ibp,jb,i_qp,Sx_lower_band,Sx_upper_band,n_lt_bands,n_lt_steps - complex(DP) ::DP_Sx, DP_Sx_l - complex(SP),allocatable ::local_rhotw(:) - character(schlen) ::ch,mode_ + type(elemental_collision), target :: isc,iscp + complex(SP), allocatable :: local_rhotw(:) + integer :: iq,iq_ibz,is_ibz,ib,ibp,jb,i_qp,Sx_lower_band,Sx_upper_band,n_lt_bands,n_lt_steps + integer :: ig_first,ig_last + complex(DP) :: DP_Sx, DP_Sx_l + character(schlen) :: ch,mode_ + type(PP_indexes) :: px ! !QP list ! - integer :: ikibz,i_sp_pol + integer :: ikibz,i_sp_pol ! ! Resets & basis setup @@ -112,6 +116,13 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) ! endif ! + ! G-parallelism + ! + call PP_indexes_reset(px) + call PARALLEL_index(px,(/QP_ng_Sx/),COMM=PAR_COM_RL_INDEX,CONSECUTIVE=.true.) + ig_first=px%first_of_1D(PAR_COM_RL_INDEX%cpu_id+1) + ig_last=px%last_of_1D(PAR_COM_RL_INDEX%cpu_id+1) + ! call timing('HF',OPR='start') ! ch='EXS' @@ -244,8 +255,11 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) call dev_memcpy(DEV_VAR(iscp%rhotw),DEV_VAR(isc%rhotw)) endif ! + ! here isc%ngrho == QP_ng_Sx + ! DP_Sx_l=Vstar_dot_VV(isc%ngrho,DEV_VAR(iscp%rhotw),& -& DEV_VAR(isc%rhotw),DEV_VAR(isc%gamp)(:,1)) +& DEV_VAR(isc%rhotw),DEV_VAR(isc%gamp)(:,1),& +& BOUNDS=(/ig_first,ig_last/)) DP_Sx=DP_Sx + DP_Sx_l * ( -4._SP/spin_occ*pi*E%f(jb,isc%os(2),isc%os(4)) ) ! if (master_thread.and.is_ibz==1.and.n_lt_steps>0) call live_timing(steps=1) @@ -274,6 +288,7 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) call elemental_collision_free(isc) call elemental_collision_free(iscp) YAMBO_FREE(local_rhotw) + call PP_indexes_reset(px) ! call timing('HF',OPR='stop') call timing('HF(REDUX)',OPR='start') From 70da2c3f216c5a6732ec380ca1882de62e8e2caa Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Fri, 17 Jul 2020 12:57:46 +0200 Subject: [PATCH 023/110] g-parallelism of SE ported to GPUs. Tests working. --- src/qp/QP_ppa_cohsex.F | 138 ++++++++++++++++++++++------------------- 1 file changed, 74 insertions(+), 64 deletions(-) diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 081ab0a3a0..a5b6c2e4fa 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -76,25 +76,28 @@ 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 ::iw,iw_X_mat + 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 :: iw,iw_X_mat + integer :: X_rows1,X_rows2,X_cols1,X_cols2 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 - 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 + type(elemental_collision),target :: isc,iscp + character(schlen):: ch,SECTION_name,W_name + logical :: X_is_TR_rotated,l_X_alloc + 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 + ! + complex(SP), pointer DEV_ATTR :: isc_rhotw_p(:) + complex(SP), pointer DEV_ATTR :: iscp_rhotw_p(:) + complex(SP), pointer DEV_ATTR :: isc_gamp_p(:,:) + complex(SP), pointer DEV_ATTR :: X_blc_p(:,:,:) ! #ifdef _CUDA - integer :: Xng, Xr1, Xr2 - real(SP) :: XppaE, bose_PPA_E - real(DP) :: dp_dummy_r, dp_dummy_i - complex(SP) :: W_i_w - complex(SP), pointer, device :: isc_rhotw_d(:) - complex(SP), pointer, device :: iscp_rhotw_d(:) - complex(SP), pointer, device :: isc_gamp_d(:,:) + integer :: Xng, Xr1, Xr2 + real(SP) :: XppaE, bose_PPA_E + real(DP) :: dp_dummy_r, dp_dummy_i + complex(SP) :: W_i_w #endif integer, external ::io_X complex(SP), external ::QP_ppa_EET_terminator @@ -187,6 +190,11 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) 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") + ! + isc_gamp_p => DEV_VAR(isc%gamp) + isc_rhotw_p => DEV_VAR(isc%rhotw) + iscp_rhotw_p => DEV_VAR(iscp%rhotw) + ! call timing('GW(ppa)',OPR='start') ! @@ -324,13 +332,19 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) X_is_TR_rotated=.true. endif ! - !!if (have_cuda) call dev_memcpy(X_mat_d, X_mat) ! + ! mapping of X_par from X_mat ! - !mapping of X_par from X_mat if (io_RESPONSE) iq_mem=1 call X_PARALLEL_alloc(X_par(iq_mem),X%ng,Xw%n_freqs,"X") ! + X_blc_p=> DEV_VAR(X_par(iq_mem)%blc) + ! + X_rows1=X_par(iq_mem)%rows(1) + X_rows2=X_par(iq_mem)%rows(2) + X_cols1=X_par(iq_mem)%cols(1) + X_cols2=X_par(iq_mem)%cols(2) + ! do iw=1,Xw%n_freqs ! X_par(iq_mem)%I=iw @@ -338,8 +352,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) if ( io_RESPONSE) iw_X_mat=iw if (.not.io_RESPONSE) iw_X_mat=(iq_mem-1)*Xw%n_freqs+iw ! - X_par(iq_mem)%blc(:,:,iw)=X_mat(X_par(iq_mem)%rows(1):X_par(iq_mem)%rows(2),& -& X_par(iq_mem)%cols(1):X_par(iq_mem)%cols(2),iw_X_mat) + X_par(iq_mem)%blc(:,:,iw)=X_mat(X_rows1:X_rows2,X_cols1:X_cols2,iw_X_mat) enddo ! if (have_cuda) call dev_memcpy(X_par(iq_mem)%blc_d, X_par(iq_mem)%blc) @@ -394,21 +407,21 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! if ( HEAD_QP_cpu ) then if (X_is_TR_rotated) then - !$omp parallel do default(shared), private(ig1,ig2) - do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) - do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) - eet_factor(ig1,ig2)=isc%rhotw(G_m_G(ig2,ig1)) - enddo - enddo - !$omp end parallel do + !$omp parallel do default(shared), private(ig1,ig2) + do ig2=X_cols1,X_cols2 + do ig1=X_rows1,X_rows2 + eet_factor(ig1,ig2)=isc%rhotw(G_m_G(ig2,ig1)) + enddo + enddo + ! else - !$omp parallel do default(shared), private(ig1,ig2) - do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) - do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) - eet_factor(ig1,ig2)=isc%rhotw(G_m_G(ig1,ig2)) - enddo - enddo - !$omp end parallel do + !$omp parallel do default(shared), private(ig1,ig2) + do ig2=X_cols1,X_cols2 + do ig1=X_rows1,X_rows2 + eet_factor(ig1,ig2)=isc%rhotw(G_m_G(ig1,ig2)) + enddo + enddo + ! endif endif ! @@ -418,20 +431,21 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! if (X_is_TR_rotated) then !$omp parallel do default(shared), private(ig1,ig2), reduction(+:dp_dummy) - do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) - do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) - dp_dummy=dp_dummy+cmplx(2._SP*pi*isc%rhotw(G_m_G(ig2,ig1))*X_par(iq_mem)%blc(ig1,ig2,X_range(1)),kind=DP) - enddo + do ig2=X_cols1,X_cols2 + do ig1=X_rows1,X_rows2 + dp_dummy=dp_dummy+cmplx(2._SP*pi*isc%rhotw(G_m_G(ig2,ig1))* & +& X_par(iq_mem)%blc(ig1,ig2,X_range(1)),kind=DP) + enddo enddo - !$omp end parallel do else !$omp parallel do default(shared), private(ig1,ig2), reduction(+:dp_dummy) - do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) - do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) - dp_dummy=dp_dummy+cmplx(2._SP*pi*isc%rhotw(G_m_G(ig1,ig2))*X_par(iq_mem)%blc(ig1,ig2,X_range(1)),kind=DP) - enddo + do ig2=X_cols1,X_cols2 + do ig1=X_rows1,X_rows2 + dp_dummy=dp_dummy+cmplx(2._SP*pi*isc%rhotw(G_m_G(ig1,ig2))*& +& X_par(iq_mem)%blc(ig1,ig2,X_range(1)),kind=DP) enddo - !$omp end parallel do + enddo + ! endif ! dc(1) = cmplx(dp_dummy,kind=SP) @@ -486,12 +500,12 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! if(l_GW_terminator) then !$omp parallel do default(shared), private(ig1,ig2) - do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) - do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) - eet_factor(ig1,ig2)=eet_factor(ig1,ig2)-isc%rhotw(ig1)*conjg(iscp%rhotw(ig2)) - enddo + do ig2=X_cols1,X_cols2 + do ig1=X_rows1,X_rows2 + eet_factor(ig1,ig2)=eet_factor(ig1,ig2)-isc%rhotw(ig1)*conjg(iscp%rhotw(ig2)) enddo - !$omp end parallel do + enddo + ! endif ! 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 @@ -505,10 +519,6 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) Xr1 = X_range(1) Xr2 = X_range(2) - isc_gamp_d => isc%gamp_d - isc_rhotw_d => isc%rhotw_d - iscp_rhotw_d => iscp%rhotw_d - do i_w=1,QP_dSc_steps W_i_w = W_(i_w) ! @@ -518,12 +528,12 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) dp_dummy_i = 0.0_DP ! !$cuf kernel do(2) - do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) - do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) + do ig2=X_cols1,X_cols2 + do ig1=X_rows1,X_rows2 + ! + PPA_E= real(XppaE/X_blc_p(ig1,ig2,Xr2),kind=SP) + PPA_R=-X_blc_p(ig1,ig2,Xr1)/2._SP*PPA_E*isc_gamp_p(ig1,ig2) ! - PPA_E= real(XppaE/X_par(iq_mem)%blc_d(ig1,ig2,Xr2),kind=SP) - PPA_R=-X_par(iq_mem)%blc_d(ig1,ig2,Xr1)/2._SP*PPA_E*isc_gamp_d(ig1,ig2) - ! inline bose_f function bose_PPA_E=0. if (PPA_E<0.) bose_PPA_E=-spin_occ @@ -536,7 +546,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) endif endif ! - ctmp = -4._SP/spin_occ*pi*isc_rhotw_d(ig1)*conjg(iscp_rhotw_d(ig2))*(-PPA_R)*& + ctmp = -4._SP/spin_occ*pi*isc_rhotw_p(ig1)*conjg(iscp_rhotw_p(ig2))*(-PPA_R)*& & ( (spin_occ-f_kmq+bose_PPA_E)/(W_i_w-E_kmq-PPA_E)+& & (f_kmq+bose_PPA_E)/(conjg(W_i_w)-E_kmq+PPA_E)) ! @@ -556,8 +566,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! dp_dummy = 0.0_DP !$omp parallel do default(shared), private(ig1,ig2,PPA_E,PPA_R,ctmp), reduction(+:dp_dummy) - do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) - do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) + do ig2=X_cols1,X_cols2 + do ig1=X_rows1,X_rows2 ! PPA_E= real(X%ppaE/X_par(iq_mem)%blc(ig1,ig2,X_range(2)),kind=SP) PPA_R=-X_par(iq_mem)%blc(ig1,ig2,X_range(1))/2._SP*PPA_E*isc%gamp(ig1,ig2) @@ -585,7 +595,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! pre_factor=0.0_SP !$omp parallel do default(shared), private(ig1), reduction(+:pre_factor) - do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) + do ig1=X_rows1,X_rows2 pre_factor=pre_factor+isc%rhotw(ig1)*local_rhotw(ig1) enddo !$omp end parallel do @@ -616,8 +626,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) dp_dummy=0.0_DP ! !$omp parallel do default(shared), private(ig1,ig2,PPA_E,PPA_R), reduction(+:dp_dummy) - do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) - do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) + do ig2=X_cols1,X_cols2 + do ig1=X_rows1,X_rows2 ! PPA_E=X%ppaE/real(X_par(iq_mem)%blc(ig1,ig2,X_range(2))) PPA_R=-X_par(iq_mem)%blc(ig1,ig2,X_range(1))/2._SP*PPA_E*isc%gamp(ig1,ig2) From 086ed147a6ecdadd41b81d2eaf7df33685eec4d8 Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Thu, 30 Jul 2020 11:38:40 +0200 Subject: [PATCH 024/110] temporary modification of size evaluation -- to be changed --- include/headers/common/memory.h | 8 ++++++-- src/modules/mod_memory.F | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/headers/common/memory.h b/include/headers/common/memory.h index 6516691fbe..1962cd017d 100644 --- a/include/headers/common/memory.h +++ b/include/headers/common/memory.h @@ -24,7 +24,10 @@ */ use memory, ONLY:MEM_err,MEM_msg,MEM_count,MEM_global_mesg,IPL implicit none - + + integer(IPL) :: Sz + integer :: i + #if defined _MPI /* MPI only part */ @@ -163,7 +166,8 @@ #define YAMBO_FREE(x) \ if (.not.allocated(x)) &NEWLINE& call MEM_free(QUOTES x QUOTES,int(-1,KIND=IPL))NEWLINE \ - if ( allocated(x)) &NEWLINE& call MEM_free(QUOTES x QUOTES,size(x,KIND=IPL))NEWLINE \ + if ( allocated(x)) then &NEWLINE& Sz=1 &NEWLINE& \ + do i = 1,size(shape(x)); Sz = Sz*shape(i); enddo &NEWLINE& call MEM_free(QUOTES x QUOTES,Sz)NEWLINE \ if ( allocated(x)) &NEWLINE& deallocate(x) #define YAMBO_FREE_P(x) \ if (.not.associated(x)) &NEWLINE& call MEM_free(QUOTES x QUOTES,int(-1,KIND=IPL))NEWLINE \ diff --git a/src/modules/mod_memory.F b/src/modules/mod_memory.F index 4781fec85b..e92d33e1a4 100644 --- a/src/modules/mod_memory.F +++ b/src/modules/mod_memory.F @@ -330,7 +330,9 @@ subroutine MEM_c2(name,c) subroutine MEM_c3(name,c) character(*)::name complex(SP) ::c(:,:,:) - call MEM_manager_alloc(name,size(c,KIND=IPL),2*kind(c(1,1,1)),HOST_) + integer(IPL) ::Sz + Sz = size(c,1,KIND=IPL)*size(c,2,KIND=IPL)*size(c,3,KIND=IPL) + call MEM_manager_alloc(name,Sz,2*kind(c(1,1,1)),HOST_) end subroutine subroutine MEM_c4(name,c) character(*)::name From 34687c50bc57d78532df2aef8839f8dd8b24a6bc Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Fri, 31 Jul 2020 10:21:45 +0200 Subject: [PATCH 025/110] fix the matrix sizing if too large --- include/headers/common/memory.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/headers/common/memory.h b/include/headers/common/memory.h index 1962cd017d..31ee59b74a 100644 --- a/include/headers/common/memory.h +++ b/include/headers/common/memory.h @@ -166,8 +166,8 @@ #define YAMBO_FREE(x) \ if (.not.allocated(x)) &NEWLINE& call MEM_free(QUOTES x QUOTES,int(-1,KIND=IPL))NEWLINE \ - if ( allocated(x)) then &NEWLINE& Sz=1 &NEWLINE& \ - do i = 1,size(shape(x)); Sz = Sz*shape(i); enddo &NEWLINE& call MEM_free(QUOTES x QUOTES,Sz)NEWLINE \ + if ( allocated(x)) then NEWLINE Sz=1 NEWLINE \ + do i = 1,size(shape(x)); Sz = Sz*size(x,i,KIND=IPL); enddo NEWLINE call MEM_free(QUOTES x QUOTES,Sz)NEWLINE endif NEWLINE \ if ( allocated(x)) &NEWLINE& deallocate(x) #define YAMBO_FREE_P(x) \ if (.not.associated(x)) &NEWLINE& call MEM_free(QUOTES x QUOTES,int(-1,KIND=IPL))NEWLINE \ From c0dc705099f7f65e5ae92f8f7dc651445ad3daec Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Thu, 22 Oct 2020 12:00:24 +0200 Subject: [PATCH 026/110] cleaning from prints --- lib/qe_pseudo/stoW4kD8 | 0 src/modules/mod_cuda.F | 1 - src/modules/pgipar1ZyGlEf | 0 src/modules/pgipar2bwSQPS | 0 src/pol_function/X_dielectric_matrix.F | 9 ++++++--- src/pol_function/pgipar1b7VYnw | 0 6 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 lib/qe_pseudo/stoW4kD8 create mode 100644 src/modules/pgipar1ZyGlEf create mode 100644 src/modules/pgipar2bwSQPS create mode 100644 src/pol_function/pgipar1b7VYnw diff --git a/lib/qe_pseudo/stoW4kD8 b/lib/qe_pseudo/stoW4kD8 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/modules/mod_cuda.F b/src/modules/mod_cuda.F index 70f72fd050..4c223c16ce 100644 --- a/src/modules/mod_cuda.F +++ b/src/modules/mod_cuda.F @@ -115,7 +115,6 @@ function cuda_getstat() result(ierr) #ifdef _CUDA ierr = CudaDeviceSynchronize() ierr = CudaGetLastError() - !write(*,*) CudaGetLastMessage(ierr) #endif return end function diff --git a/src/modules/pgipar1ZyGlEf b/src/modules/pgipar1ZyGlEf new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/modules/pgipar2bwSQPS b/src/modules/pgipar2bwSQPS new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/pol_function/X_dielectric_matrix.F b/src/pol_function/X_dielectric_matrix.F index 942468615a..3b372d8135 100644 --- a/src/pol_function/X_dielectric_matrix.F +++ b/src/pol_function/X_dielectric_matrix.F @@ -45,6 +45,7 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) & PARALLEL_WF_index,WF_load,WF_free use QP_m, ONLY:QP_n_W_freqs_redux use matrix, ONLY:MATRIX_reset + use cuda_m ! #include ! @@ -57,7 +58,7 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) ! ! Work Space ! - integer :: iq,Xdb,i_err,X_MEM_n_freqs,io_X_done(nqibz),iw,iq_mem,n_poles,iw_X_mat + integer :: n,iq,Xdb,i_err,X_MEM_n_freqs,io_X_done(nqibz),iw,iq_mem,n_poles,iw_X_mat real(SP) :: minmax_ehe(2) integer, external :: io_X,X_eh_setup character(1) :: sec_mode @@ -263,8 +264,10 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) & X_par(iq_mem)%cols(1):X_par(iq_mem)%cols(2),iw_X_mat)=X_par(iq_mem)%blc(:,:,iw) endif ! - call PP_redux_wait(X_mat(:,:,iw_X_mat),COMM=PAR_COM_X_WORLD%COMM) - ! + do n = 1,X%ng + call PP_redux_wait(X_mat(:,n,iw_X_mat),COMM=PAR_COM_X_WORLD%COMM) + enddo + ! enddo ! #if defined _PAR_IO diff --git a/src/pol_function/pgipar1b7VYnw b/src/pol_function/pgipar1b7VYnw new file mode 100644 index 0000000000..e69de29bb2 From 89407d40854fdbb52b5ed183c6c823c1d82f5b27 Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Thu, 22 Oct 2020 14:35:06 +0200 Subject: [PATCH 027/110] removing X_PARALLEL_alloc file from qp folder, not necessary --- src/qp/X_PARALLEL_alloc.F | 106 -------------------------------------- 1 file changed, 106 deletions(-) delete mode 100644 src/qp/X_PARALLEL_alloc.F diff --git a/src/qp/X_PARALLEL_alloc.F b/src/qp/X_PARALLEL_alloc.F deleted file mode 100644 index 40861be79c..0000000000 --- a/src/qp/X_PARALLEL_alloc.F +++ /dev/null @@ -1,106 +0,0 @@ -! -! Copyright (C) 2000-2020 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 X_PARALLEL_alloc(X_par,NG,NW,mode) - ! - use pars, ONLY:cZERO - use parallel_m, ONLY:COMM_copy,PAR_COM_RL_INDEX,PAR_COM_RL_A2A - use matrix, ONLY:MATRIX_reset,PAR_matrix - use X_m, ONLY:X_par_lower_triangle,X_rows,X_cols,& -& X_FILL_UP_matrix_only,X_lower_triangle_matrix_in_use - use interfaces, ONLY:PARALLEL_live_message - use cuda_m, ONLY:have_cuda - ! -#include - ! - type(PAR_matrix) :: X_par - integer :: NG,NW - character(*) :: mode - ! - ! Work Space - ! - logical :: l_XUP,l_PAR,l_CPU_ONLY - ! - ! Reset... - ! - call MATRIX_reset(X_par) - ! - ! Type of allocation.... - ! - !l_XUP =mode=="XUP" - !l_PAR =mode=="X" - l_XUP = index(mode,"XUP")>0 - l_PAR = index(mode,"X")>0.and.index(mode,"XUP")==0 - l_CPU_ONLY = index(mode,"CPU_ONLY")>0 - ! - ! Clean-up - ! - if (mode=="CLEAN") then - YAMBO_FREE(X_par%blc) - YAMBO_FREE(X_par%blc_d) - call MATRIX_reset(X_par) - return - endif - ! - ! 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 ) - endif - ! - X_rows = X_par%rows - X_cols = X_par%cols - ! - if (l_XUP.and..not.X_FILL_UP_matrix_only.and.X_par%INTER_comm%n_CPU>1) then - ! - call MATRIX_reset(X_par_lower_triangle) - X_lower_triangle_matrix_in_use=.TRUE. - X_par_lower_triangle%kind ="XDN" - X_par_lower_triangle%rows =X_par%cols - X_par_lower_triangle%cols =X_par%rows - X_par_lower_triangle%nrows=X_par%ncols - X_par_lower_triangle%ncols=X_par%nrows - ! - YAMBO_ALLOC(X_par_lower_triangle%blc,(X_par%cols(1):X_par%cols(2),X_par%rows(1):X_par%rows(2),NW)) - X_par_lower_triangle%blc=cZERO - if (have_cuda.and..not.l_CPU_ONLY) then - YAMBO_ALLOC(X_par_lower_triangle%blc_d,(X_par%cols(1):X_par%cols(2),X_par%rows(1):X_par%rows(2),NW)) - X_par_lower_triangle%blc_d=cZERO - endif - ! - call COMM_copy(PAR_COM_RL_A2A, X_par_lower_triangle%INTRA_comm) - call COMM_copy(PAR_COM_RL_INDEX, X_par_lower_triangle%INTER_comm) - endif - ! - 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_cuda.and..not.l_CPU_ONLY) then - YAMBO_ALLOC(X_par%blc_d,(X_par%rows(1):X_par%rows(2),X_par%cols(1):X_par%cols(2),NW)) - X_par%blc_d=cZERO - endif - ! - call PARALLEL_live_message("RL vectors(X)",LOADED=X_par%ncols*X_par%nrows,TOTAL=NG**2,NCPU=X_par%INTER_comm%n_CPU) - ! -end subroutine From d055097ba3052e9ad22ebb5a27812398cad5ca5d Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Wed, 11 Nov 2020 09:52:09 +0100 Subject: [PATCH 028/110] compilation bug fixed; handling of size(x,KIND=IPL) in memory.h and mod_memory.F still to be properly addressed --- include/headers/common/memory.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/headers/common/memory.h b/include/headers/common/memory.h index 0231fde012..847a7ff6fd 100644 --- a/include/headers/common/memory.h +++ b/include/headers/common/memory.h @@ -25,8 +25,8 @@ use memory, ONLY:MEM_err,MEM_msg,MEM_count,MEM_global_mesg,IPL implicit none - integer(IPL) :: Sz - integer :: i + integer(IPL) :: Sz_mem__ + integer :: i_mem__ #if defined _MPI @@ -166,8 +166,10 @@ #define YAMBO_FREE(x) \ if (.not.allocated(x)) &NEWLINE& call MEM_free(QUOTES x QUOTES,int(-1,KIND=IPL))NEWLINE \ - if ( allocated(x)) then NEWLINE Sz=1 NEWLINE \ - do i = 1,size(shape(x)); Sz = Sz*size(x,i,KIND=IPL); enddo NEWLINE call MEM_free(QUOTES x QUOTES,Sz)NEWLINE endif NEWLINE \ + if ( allocated(x)) then NEWLINE Sz_mem__ =1 NEWLINE \ + do i_mem__ = 1,size(shape(x)) NEWLINE Sz_mem__ = Sz_mem__*size(x,i_mem__,KIND=IPL) NEWLINE enddo NEWLINE \ + call MEM_free(QUOTES x QUOTES,Sz_mem__ )NEWLINE \ + endif NEWLINE \ if ( allocated(x)) &NEWLINE& deallocate(x) #define YAMBO_FREE_P(x) \ if (.not.associated(x)) &NEWLINE& call MEM_free(QUOTES x QUOTES,int(-1,KIND=IPL))NEWLINE \ From 278844624d9bec00b09b97e07eaed3d4ac22fc30 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Wed, 11 Nov 2020 23:50:57 +0100 Subject: [PATCH 029/110] fixed problem in HF when using parallel linear algebra (eg 8 mpi, 4 LA, def_par). Basically the hf outut was written by multiple cpus, because of a wrong condition in the initialzation of IO (related to a wrong communicator) --- src/parallel/PARALLEL_global_Self_Energy.F | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/parallel/PARALLEL_global_Self_Energy.F b/src/parallel/PARALLEL_global_Self_Energy.F index ee5f7f02ae..f36f9ccc6b 100644 --- a/src/parallel/PARALLEL_global_Self_Energy.F +++ b/src/parallel/PARALLEL_global_Self_Energy.F @@ -83,7 +83,6 @@ subroutine PARALLEL_global_Self_Energy(E,Xk,q) ! CALL PARALLEL_structure(4,(/"q ","g ","qp","b "/)) ! - call PARALLEL_assign_chains_and_COMMs(4,COMM_index_1=PAR_COM_Q_INDEX,& & COMM_index_2=PAR_COM_RL_INDEX,& & COMM_index_3=PAR_COM_QP_INDEX,& @@ -91,9 +90,7 @@ subroutine PARALLEL_global_Self_Energy(E,Xk,q) & COMM_A2A_1=PAR_COM_Q_A2A,& & COMM_A2A_2=PAR_COM_RL_A2A,& & COMM_A2A_3=PAR_COM_QP_A2A) - - -! + ! ! COMMs setup ! call COMM_copy(PAR_COM_Q_A2A,PAR_COM_SE_WORLD) @@ -291,15 +288,15 @@ subroutine PARALLEL_global_Self_Energy(E,Xk,q) ! if (ncpu>1) then if (l_eval_collisions.and.io_COLLs) then - call IO_and_Messaging_switch("+io_out",CONDITION=PAR_COM_QP_A2A%CPU_id==0.and.PAR_COM_Q_INDEX%CPU_id==0) + call IO_and_Messaging_switch("+io_out",CONDITION=PAR_COM_QP_A2A%CPU_id==0.and.PAR_COM_Q_INDEX%CPU_id==0) else - call IO_and_Messaging_switch("+io_out",CONDITION=PAR_COM_SE_WORLD%CPU_id==0) + call IO_and_Messaging_switch("+io_out",CONDITION=master_cpu) endif else call IO_and_Messaging_switch("+io_out",CONDITION=.TRUE.) endif ! - call IO_and_Messaging_switch("+output",CONDITION=PAR_COM_SE_WORLD%CPU_id==0) + call IO_and_Messaging_switch("+output",CONDITION=master_cpu) ! call OPENMP_set_threads(n_threads_in=n_threads_SE) ! From f0de1e97eb6160608d05aee6349792a4df66ca2a Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Wed, 11 Nov 2020 23:56:43 +0100 Subject: [PATCH 030/110] same problem as from previous commit (linear algebra in sigma) fixed also for COHSEX and LIFETIMES/REAL_AXIS --- src/qp/QP_ppa_cohsex.F | 4 +-- src/qp/QP_real_axis.F | 61 +++++++++++++++++++++++++++++------------- 2 files changed, 44 insertions(+), 21 deletions(-) diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index a5b6c2e4fa..c007f47fc9 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -591,14 +591,14 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! else if (l_sc_sex.or.l_cohsex.or.(l_sc_coh.and.COHSEX_use_empties)) then ! - call M_by_V('N', X%ng, X_par(iq_mem)%blc(:,:,X_range(1)), conjg(iscp%rhotw), local_rhotw) + call M_by_V('N', X%ng, X_mat(:,:,X_range(1)), conjg(iscp%rhotw), local_rhotw) ! pre_factor=0.0_SP + ! !$omp parallel do default(shared), private(ig1), reduction(+:pre_factor) do ig1=X_rows1,X_rows2 pre_factor=pre_factor+isc%rhotw(ig1)*local_rhotw(ig1) enddo - !$omp end parallel do ! ! SEX diff --git a/src/qp/QP_real_axis.F b/src/qp/QP_real_axis.F index e5a4afeda3..2026063f67 100644 --- a/src/qp/QP_real_axis.F +++ b/src/qp/QP_real_axis.F @@ -41,6 +41,7 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) & PAR_nG_bands,PAR_nQ_bz use interfaces, ONLY:PARALLEL_global_indexes,PARALLEL_WF_index,WF_load,WF_free,& & PARALLEL_WF_distribute,QP_state_print + use matrix_operate,ONLY:mat_transpose use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc use wave_func, ONLY:WF use DIPOLES, ONLY:DIPOLE_t @@ -49,7 +50,7 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) use QP_m, ONLY:QP_t,QP_n_G_bands,QP_dSc_steps,QP_Sc,QP_n_states,QP_G_damp,QP_table,QP_dSc_delta,& & QP_W,QP_solver,QP_W_er,QP_W_dr,QP_n_W_freqs,QP_Sc_steps,& & QP_n_W_freqs_redux,e2et,h2ht - use X_m, ONLY:X_alloc,X_mat,X_t + use X_m, ONLY:X_alloc,X_mat,X_t,X_par use functions, ONLY:bose_decay use R_lattice, ONLY:qindx_S,bz_samp,nqibz use D_lattice, ONLY:nsym,i_space_inv,i_time_rev,mag_syms @@ -70,10 +71,11 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) ! WorkSpace ! 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,& -& 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 - complex(SP) :: lrhotw(X%ng),X_mat_ws(X%ng,X%ng),W_dummy + 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,& +& 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 real(SP) ::life_Fe,life_Fh integer, allocatable::life_W_table(:,:) integer, external ::io_X,io_QP_and_GF,X_dielectric_matrix,QP_life_transitions @@ -365,13 +367,28 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) endif ! if (iqs>nsym/(i_time_rev+1) .and. (i_space_inv==0.or.mag_syms) .and..not.X_is_TR_rotated) then - X_is_TR_rotated=.true. + ! do i3=X_range(1),X_range(2) - forall(i1=1:X%ng,i2=1:X%ng) X_mat_ws(i2,i1)=X_mat(i1,i2,i3) - X_mat(:,:,i3)=X_mat_ws(:,:) + call mat_transpose(X_mat(:,:,i3)) enddo + 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_PARALLEL_alloc(X_par(1),X%ng,Xw%n_freqs,"X") + ! + ! Useful when GPU porting will be introduced + ! X_blc_p=> DEV_VAR(X_par%blc) + ! + X_rows1=X_par(1)%rows(1) + X_rows2=X_par(1)%rows(2) + X_cols1=X_par(1)%cols(1) + X_cols2=X_par(1)%cols(2) + ! + ! qp_loop: do i_qp=1,QP_n_states ! i_qp_mem=PAR_QP_index(i_qp) @@ -435,8 +452,9 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) ! i2=life_W_table(iqibz,QP_n_W_freqs) ! - do i3=1,X%ng - lrhotw(i3)=V_dot_V_omp(X%ng,scattering_main%rhotw,X_mat(:,i3,i2+X_range(1)-1)) + do i3=X_cols1,X_cols2 + lrhotw(i3)=V_dot_V_omp(X_rows2-X_rows1+1,scattering_main%rhotw(X_rows1:X_rows2),& +& X_mat(X_rows1:X_rows2,i3,i2+X_range(1)-1)) enddo ! ! To compensate the Tel/w divergence of the Bose function at finite @@ -447,7 +465,8 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) ! qp%E(i_qp)=qp%E(i_qp)-2._SP*cI*pi*& & (life_Fe+life_Fh)*bose_decay( real(X_life_W(iqibz)%p(i2)) )*& -& Vstar_dot_V_omp(X%ng,scattering_prime%rhotw,lrhotw) +& Vstar_dot_V_omp(X_cols2-X_cols1+1,scattering_prime%rhotw(X_cols1:X_cols2),& +& lrhotw(X_cols1:X_cols2)) ! else ! .not.l_life ! @@ -455,23 +474,27 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) ! do i2=1,QP_n_W_freqs W_dummy=cZERO -!$omp parallel do default(shared), private(i3,i4), reduction(+:W_dummy), collapse(2) - do i3=1,X%ng - do i4=1,X%ng - W_dummy=W_dummy+scattering_main%rhotw(i3)*X_mat(i3,i4,i2+X_range(1)-1)*conjg(scattering_prime%rhotw(i4)) + ! + !$omp parallel do default(shared), private(i3,i4), reduction(+:W_dummy), collapse(2) + do i4=X_cols1,X_cols2 + do i3=X_rows1,X_rows2 + W_dummy=W_dummy+scattering_main%rhotw(i3)*X_mat(i3,i4,i2+X_range(1)-1)*& +& conjg(scattering_prime%rhotw(i4)) enddo enddo -!$omp end parallel do + ! QP_W(i_qp_mem,i_q_W_mem,i_b_mem,i2)=-4._SP/spin_occ*W_dummy enddo #else do i2=1,QP_n_W_freqs ! - do i3=1,X%ng - lrhotw(i3)=V_dot_V(X%ng,scattering_main%rhotw,X_mat(:,i3,i2+X_range(1)-1)) + do i3=X_cols1,X_cols2 + lrhotw(i3)=V_dot_V(X_rows2-X_rows1+1,scattering_main%rhotw(X_rows1:X_rows2),& +& X_mat(X_rows1:X_rows2,i3,i2+X_range(1)-1)) enddo ! - W_dummy=Vstar_dot_V_omp(X%ng,scattering_prime%rhotw,lrhotw) + W_dummy=Vstar_dot_V_omp(X_cols2-X_cols1+1,scattering_prime%rhotw(X_cols1:X_cols2),& +& lrhotw(X_cols1:X_cols2)) ! QP_W(i_qp_mem,i_q_W_mem,i_b_mem,i2)=-4._SP/spin_occ*W_dummy ! From e6406ec62a5386eb2dcdb8da4735c47e9770c66c Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Thu, 12 Nov 2020 15:07:36 +0100 Subject: [PATCH 031/110] cleanup and bug fixed (X_par not deallocated in QP_ppa_cohsex, shiwing up as a bug in GW-SELF). --- src/pol_function/X_dielectric_matrix.F | 15 ++++++--------- src/qp/QP_ppa_cohsex.F | 18 +++++++++++------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/pol_function/X_dielectric_matrix.F b/src/pol_function/X_dielectric_matrix.F index 3b372d8135..8229333d10 100644 --- a/src/pol_function/X_dielectric_matrix.F +++ b/src/pol_function/X_dielectric_matrix.F @@ -34,7 +34,7 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) use frequency, ONLY:w_samp use R_lattice, ONLY:bz_samp,nqibz use electrons, ONLY:levels - use parallel_m, ONLY:PP_redux_wait,PAR_IND_Q_ibz,PAR_Q_ibz_index,PAR_nQ_ibz,myid,& + use parallel_m, ONLY:PP_redux_wait,PAR_IND_Q_ibz,PAR_Q_ibz_index,PAR_nQ_ibz,& & PAR_IND_Xk_ibz,PAR_IND_CON_BANDS_X,PAR_IND_VAL_BANDS_X,PAR_COM_X_WORLD,& & PAR_COM_X_WORLD_RL_resolved use wave_func, ONLY:WF_buffered_IO,WF,WF_buffer @@ -45,7 +45,6 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) & PARALLEL_WF_index,WF_load,WF_free use QP_m, ONLY:QP_n_W_freqs_redux use matrix, ONLY:MATRIX_reset - use cuda_m ! #include ! @@ -58,7 +57,7 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) ! ! Work Space ! - integer :: n,iq,Xdb,i_err,X_MEM_n_freqs,io_X_done(nqibz),iw,iq_mem,n_poles,iw_X_mat + integer :: iq,Xdb,i_err,X_MEM_n_freqs,io_X_done(nqibz),iw,iq_mem,n_poles,iw_X_mat real(SP) :: minmax_ehe(2) integer, external :: io_X,X_eh_setup character(1) :: sec_mode @@ -264,10 +263,8 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) & X_par(iq_mem)%cols(1):X_par(iq_mem)%cols(2),iw_X_mat)=X_par(iq_mem)%blc(:,:,iw) endif ! - do n = 1,X%ng - call PP_redux_wait(X_mat(:,n,iw_X_mat),COMM=PAR_COM_X_WORLD%COMM) - enddo - ! + call PP_redux_wait(X_mat(:,:,iw_X_mat),COMM=PAR_COM_X_WORLD%COMM) + ! enddo ! #if defined _PAR_IO @@ -293,7 +290,7 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) endif ! ! CLEAN (2) - ! + ! if (io_RESPONSE) call X_PARALLEL_alloc(X_par(iq_mem),0,0,"CLEAN") YAMBO_FREE(X_par_lower_triangle%blc) call MATRIX_reset(X_par_lower_triangle) @@ -314,7 +311,7 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) YAMBO_FREE(X_mat) #endif deallocate(X_par) - endif + endif if (allocated(FXC)) then YAMBO_FREE(FXC) endif diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index c007f47fc9..eb0e968b95 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -212,13 +212,13 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) !------------ ! if (.not.allocated(X_par)) then - ! - if (io_RESPONSE) then - allocate(X_par(1)) - else - allocate(X_par(PAR_nQ_ibz)) - endif - ! + ! + if (io_RESPONSE) then + allocate(X_par(1)) + else + allocate(X_par(PAR_nQ_ibz)) + endif + ! endif ! if (l_sc_coh.or.l_sc_sex.or.l_cohsex.or.l_sc_srpa) then @@ -648,6 +648,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! enddo QP_loop ! + if (io_RESPONSE) call X_PARALLEL_alloc(X_par(iq_mem),0,0,"CLEAN") + ! enddo Q_loop ! call live_timing() @@ -661,11 +663,13 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) YAMBO_FREE(eet_factor) endif endif + ! l_X_alloc=.true. #if defined _SC l_X_alloc=l_sc_run.and.io_RESPONSE #endif if(l_X_alloc) call X_alloc('X') + if(allocated(X_par)) deallocate(X_par) ! call timing('GW(ppa)',OPR='stop') ! From e9487a8e329707702351ac483d55a1c08d712e2a Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Thu, 12 Nov 2020 15:54:32 +0100 Subject: [PATCH 032/110] same issue of X_par deallocation fixed also in QP_real_axis.F --- src/qp/QP_real_axis.F | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/qp/QP_real_axis.F b/src/qp/QP_real_axis.F index 2026063f67..11bc534f2e 100644 --- a/src/qp/QP_real_axis.F +++ b/src/qp/QP_real_axis.F @@ -506,6 +506,8 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) enddo bands_loop enddo qp_loop ! + call X_PARALLEL_alloc(X_par(1),0,0,"CLEAN") + ! if (.not.l_life) then ! QP_W_er(iqbz,:)=Xw%er @@ -562,6 +564,8 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) enddo endif ! + if (allocated(X_par)) deallocate(X_par) + ! call X_alloc('X') call WF_free(WF) call elemental_collision_free(scattering_main) From becfd9ed7697bd610a2137727838948e957c669a Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Fri, 13 Nov 2020 11:16:46 +0100 Subject: [PATCH 033/110] extra CUBLAS wrappers added --- src/modules/mod_wrapper.F | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/src/modules/mod_wrapper.F b/src/modules/mod_wrapper.F index 4e1679d5d1..7c12fd8798 100644 --- a/src/modules/mod_wrapper.F +++ b/src/modules/mod_wrapper.F @@ -45,9 +45,9 @@ module wrapper end interface ! interface M_by_V - module procedure mv_cgemv,mv_sgemv,mv_c,mv_r + module procedure mv_cgemv, mv_sgemv, mv_c, mv_r #ifdef _CUDA - module procedure mv_c_gpu + module procedure mv_cgemv_gpu, mv_sgemv_gpu, mv_c_gpu #endif end interface ! @@ -210,6 +210,21 @@ subroutine mv_sgemv(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) #endif end subroutine mv_sgemv ! +#ifdef _CUDA + subroutine mv_sgemv_gpu(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) + real(SP), intent(in) :: ALPHA,BETA + integer, intent(in) :: INCX,INCY,LDA,M,N + character,intent(in) :: TRANS + real(SP), device, intent(in) :: A(LDA,*),X(*) + real(SP), device, intent(out):: Y(*) +#if defined _DOUBLE + call cublasDgemv(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) +#else + call cublasSgemv(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) +#endif + end subroutine mv_sgemv_gpu +#endif + ! subroutine mv_cgemv(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) complex(SP), intent(in) :: ALPHA,BETA integer, intent(in) :: INCX,INCY,LDA,M,N @@ -223,6 +238,21 @@ subroutine mv_cgemv(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) #endif end subroutine mv_cgemv ! +#ifdef _CUDA + subroutine mv_cgemv_gpu(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) + complex(SP), intent(in) :: ALPHA,BETA + integer, intent(in) :: INCX,INCY,LDA,M,N + character, intent(in) :: TRANS + complex(SP), device, intent(in) :: A(LDA,*),X(*) + complex(SP), device, intent(out):: Y(*) +#if defined _DOUBLE + call cublasZgemv(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) +#else + call cublasCgemv(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) +#endif + end subroutine mv_cgemv_gpu +#endif + ! subroutine mv_c(TRANS,msize,A,X,Y) integer, intent(in) :: msize complex(SP), intent(in) :: A(msize,*),X(*) From a64ccf45c951808d77bdc2393d8d7cb85a958a9b Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Tue, 17 Nov 2020 10:22:38 +0100 Subject: [PATCH 034/110] cleanup --- src/Yio/io_utilities.F | 7 ++++++- src/pol_function/X_PARALLEL_alloc.F | 2 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Yio/io_utilities.F b/src/Yio/io_utilities.F index 10d766dd6b..771e778296 100644 --- a/src/Yio/io_utilities.F +++ b/src/Yio/io_utilities.F @@ -218,10 +218,15 @@ function desc_to_varname(desc) ! VARNAME=STRING_remove(VARNAME,".","_") VARNAME=STRING_remove(VARNAME,"=","_") - VARNAME=STRING_remove(VARNAME,"\","_") VARNAME=STRING_remove(VARNAME,"(","_") VARNAME=STRING_remove(VARNAME,")","_") ! +#ifdef _PGI + VARNAME=STRING_remove(VARNAME,"\\","_") +#else + VARNAME=STRING_remove(VARNAME,"\","_") +#endif + ! desc_to_varname=VARNAME ! end function desc_to_varname diff --git a/src/pol_function/X_PARALLEL_alloc.F b/src/pol_function/X_PARALLEL_alloc.F index 40861be79c..4a5ad5994e 100644 --- a/src/pol_function/X_PARALLEL_alloc.F +++ b/src/pol_function/X_PARALLEL_alloc.F @@ -56,8 +56,6 @@ subroutine X_PARALLEL_alloc(X_par,NG,NW,mode) ! Clean-up ! if (mode=="CLEAN") then - YAMBO_FREE(X_par%blc) - YAMBO_FREE(X_par%blc_d) call MATRIX_reset(X_par) return endif From 79a3bc8ea8be07236d2e0c737004ffae1b50a04a Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Tue, 17 Nov 2020 12:45:34 +0100 Subject: [PATCH 035/110] QP_ppa_cohsex cleanup; GPU porting of G-terminator implemented and tested --- include/headers/common/dev_defs.h | 26 ++- include/headers/common/dev_undefs.h | 6 +- include/headers/common/device_macros.h | 13 ++ src/qp/QP_ppa_cohsex.F | 294 ++++++++++++++----------- 4 files changed, 201 insertions(+), 138 deletions(-) diff --git a/include/headers/common/dev_defs.h b/include/headers/common/dev_defs.h index 668d513b6b..3ad04c8ebc 100644 --- a/include/headers/common/dev_defs.h +++ b/include/headers/common/dev_defs.h @@ -22,6 +22,7 @@ MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. */ +#include #ifdef __STDC__ # define CAT(a,b) a##b @@ -50,11 +51,22 @@ #define DEV_ATTR DEV_ATTRIBUTE #define DEV_PIN DEV_PINNED -!#ifdef CUDA -! #define YAMBO_CUDA_OR_OMP(priv_list,nloop) !$cuf kernel do(nloop) <<<*,*>>> -! #define YAMBO_CUDA_OR_OMP_END -!#else -! #define YAMBO_CUDA_OR_OMP(priv_list,nloop) !$omp parallel do default(shared), private(private_list), collapse(nloop) -! #define YAMBO_CUDA_OR_OMP_END !$omp end parallel do -!#endif + +#if defined _OPENACC +# define DEV_ACC $acc +#else +# define DEV_ACC !!!! +#endif + +#if defined _CUDA +# define DEV_CUF $cuf +#else +# define DEV_CUF !!!! +#endif + +#if defined _OPENMP && !defined (_HAVE_DEVICE) +# define DEV_OMP $omp +#else +# define DEV_OMP !!!! +#endif diff --git a/include/headers/common/dev_undefs.h b/include/headers/common/dev_undefs.h index fa2da7e760..bdff24eafb 100644 --- a/include/headers/common/dev_undefs.h +++ b/include/headers/common/dev_undefs.h @@ -35,6 +35,6 @@ #undef DEV_ATTR #undef DEV_PIN -!#undef YAMBO_CUDA_OR_OMP -!#undef YAMBO_CUDA_OR_OMP_END - +#undef DEV_ACC +#undef DEV_OMP +#undef DEV_CUF diff --git a/include/headers/common/device_macros.h b/include/headers/common/device_macros.h index 3d6bdba2ce..277789589d 100644 --- a/include/headers/common/device_macros.h +++ b/include/headers/common/device_macros.h @@ -5,7 +5,20 @@ # endif #endif +#if defined(_OPENACC) +# ifndef __OPENACC +# define __OPENACC +# endif +#endif + +#if defined(_OPENMP5) +# ifndef __OPENMP5 +# define __OPENMP5 +# endif +#endif + #if defined(__CUDA) || defined(__OPENACC) || defined(__OPENMP5) # define __HAVE_DEVICE +# define _HAVE_DEVICE #endif diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index eb0e968b95..13ce692993 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.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 [AF,IM,MB] ! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or @@ -41,11 +41,11 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) use IO_m, ONLY:io_control,manage_action,OP_RD_CL,REP,VERIFY,NONE,OP_RD,RD_CL_IF_END,& & io_RESPONSE,deliver_IO_error_message use QP_m, ONLY:QP_t,QP_n_G_bands,QP_dSc_steps,QP_table,l_update_W,& -& QP_Sc,QP_n_states,QP_G_damp,QP_table,QP_dSc_delta,& +& QP_Sc,QP_n_states,QP_G_damp,QP_table,QP_dSc_delta,GW_terminator_E,& & COHSEX_use_empties,l_GW_terminator,GW_terminator_Kind,QP_states_simmetrize use X_m, ONLY:X_alloc,X_mat,X_mat_d,X_t,X_par use wave_func, ONLY:WF - use R_lattice, ONLY:qindx_S,bz_samp,G_m_G,nqibz + use R_lattice, ONLY:qindx_S,bz_samp,G_m_G,G_m_G_d,nqibz use D_lattice, ONLY:nsym,i_time_rev,i_space_inv,mag_syms use wrapper, ONLY:M_by_V use interfaces, ONLY:PARALLEL_global_indexes,PARALLEL_WF_index,WF_load,WF_free,& @@ -56,7 +56,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) use parallel_m, ONLY:PAR_COM_QP_A2A use SC, ONLY:it_now,it_to_start #endif - use deviceXlib_m, ONLY:dev_memcpy + use deviceXlib_m, ONLY:dev_memcpy,dev_memset use cuda_m, ONLY:have_cuda #ifdef _CUDA use drivers, ONLY:Finite_Tel @@ -77,28 +77,30 @@ 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 +& i_qp_to_start,iq_to_start,is,iq_mem,io_err,ID,IO_ACT,timing_steps integer :: iw,iw_X_mat + integer :: X_range(2),X_range1,X_range2 integer :: X_rows1,X_rows2,X_cols1,X_cols2 - 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 - real(SP) :: eet_cutoff0(n_sp_pol),E_kmq,f_kmq,eet_cutoff1(n_sp_pol),PPA_E + 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 complex(SP) :: PPA_R,local_rhotw(X%ng),pre_factor + complex(SP) :: W_i,lW,QP_ppa_EET + real(DP) :: dp_dummy_r,dp_dummy_i complex(DP) :: dp_dummy,ctmp ! + complex(SP), allocatable :: W_(:),dc(:) + complex(SP), allocatable DEV_ATTR :: eet_factor(:,:) + 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(:,:) complex(SP), pointer DEV_ATTR :: X_blc_p(:,:,:) ! -#ifdef _CUDA - integer :: Xng, Xr1, Xr2 - real(SP) :: XppaE, bose_PPA_E - real(DP) :: dp_dummy_r, dp_dummy_i - complex(SP) :: W_i_w -#endif integer, external ::io_X complex(SP), external ::QP_ppa_EET_terminator ! @@ -223,11 +225,11 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! if (l_sc_coh.or.l_sc_sex.or.l_cohsex.or.l_sc_srpa) then if (io_RESPONSE) call X_alloc('X',(/X%ng,X%ng,1/)) - allocate(dc(2)) + YAMBO_ALLOC(dc,(2)) else if (io_RESPONSE) call X_alloc('X',(/X%ng,X%ng,2/)) - allocate(W_(QP_dSc_steps)) - allocate(dc(QP_dSc_steps),stat=alloc_err) + YAMBO_ALLOC(W_,(QP_dSc_steps)) + YAMBO_ALLOC(dc,(QP_dSc_steps)) if(l_GW_terminator) then YAMBO_ALLOC(eet_factor,(X%ng,X%ng)) endif @@ -264,6 +266,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) X_range=(/1,Xw%n_freqs/) if (.not.io_RESPONSE) X_range=(/Xw%n_freqs*(iq_mem-1)+1,iq_mem*Xw%n_freqs/) ! + ! GAMP + ! call DEV_SUB(scatter_Gamp)(isc,'c') if (have_cuda) call dev_memcpy(isc%gamp,isc%gamp_d) ! @@ -290,21 +294,29 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) if (l_sc_run .and. it_now==it_to_start.or.io_RESPONSE) then #endif ! - !$omp parallel do default(shared), private(ig1,ig2) - do ig2=1,X%ng + if (l_ppa) then + ! + !$omp parallel do default(shared), private(ig1,ig2) + do ig2=1,X%ng do ig1=1,X%ng - if (l_ppa) then - if (real(X_mat(ig1,ig2,X_range(1))/X_mat(ig1,ig2,X_range(2)))<=1._SP) then - X_mat(ig1,ig2,X_range(2))=X%ppaE - else - X_mat(ig1,ig2,X_range(2))=sqrt(X_mat(ig1,ig2,X_range(1))/X_mat(ig1,ig2,X_range(2))-1) - endif + if (real(X_mat(ig1,ig2,X_range(1))/X_mat(ig1,ig2,X_range(2)))<=1._SP) then + X_mat(ig1,ig2,X_range(2))=X%ppaE else - X_mat(ig1,ig2,X_range(1))=X_mat(ig1,ig2,X_range(1))*isc%gamp(ig1,ig2) + X_mat(ig1,ig2,X_range(2))=sqrt(X_mat(ig1,ig2,X_range(1))/X_mat(ig1,ig2,X_range(2))-1) endif enddo - enddo - !$omp end parallel do + enddo + ! + else + ! + !$omp parallel do default(shared), private(ig1,ig2) + do ig2=1,X%ng + do ig1=1,X%ng + X_mat(ig1,ig2,X_range(1))=X_mat(ig1,ig2,X_range(1))*isc%gamp(ig1,ig2) + enddo + enddo + ! + endif ! #if defined _SC endif @@ -331,7 +343,13 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) if (l_ppa) call mat_transpose(X_mat(:,:,X_range(2))) X_is_TR_rotated=.true. endif + + ! + ! defs useful to deal with cuf kernels ! + X_ppaE =X%ppaE + X_range1=X_range(1) + X_range2=X_range(2) ! ! mapping of X_par from X_mat ! @@ -346,13 +364,10 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) X_cols2=X_par(iq_mem)%cols(2) ! do iw=1,Xw%n_freqs - ! - X_par(iq_mem)%I=iw - ! - if ( io_RESPONSE) iw_X_mat=iw - if (.not.io_RESPONSE) iw_X_mat=(iq_mem-1)*Xw%n_freqs+iw - ! - X_par(iq_mem)%blc(:,:,iw)=X_mat(X_rows1:X_rows2,X_cols1:X_cols2,iw_X_mat) + if ( io_RESPONSE) iw_X_mat=iw + if (.not.io_RESPONSE) iw_X_mat=(iq_mem-1)*Xw%n_freqs+iw + ! + X_par(iq_mem)%blc(:,:,iw)=X_mat(X_rows1:X_rows2,X_cols1:X_cols2,iw_X_mat) enddo ! if (have_cuda) call dev_memcpy(X_par(iq_mem)%blc_d, X_par(iq_mem)%blc) @@ -397,28 +412,37 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) if (have_cuda) call dev_memcpy(isc%rhotw,isc%rhotw_d) ! if (l_GW_terminator) then + ! do is=1,n_sp_pol - eet_cutoff0(is)=minval(E%E(E%nbf+1,:,is)) - eet_cutoff1(is)=minval(E%E(QP_n_G_bands(2),:,is)) + eet_cutoff0_sp(is)=minval(E%E(E%nbf+1,:,is)) + eet_cutoff1_sp(is)=minval(E%E(QP_n_G_bands(2),:,is)) enddo - eet_cutoff0(1)=minval(eet_cutoff0(:)) - eet_cutoff1(1)=minval(eet_cutoff1(:)) - eet_factor=cZERO + eet_cutoff0=minval(eet_cutoff0_sp(:)) + eet_cutoff1=minval(eet_cutoff1_sp(:)) + ! + ! eet_factor=cZERO + call dev_memset(eet_factor,cZERO) ! if ( HEAD_QP_cpu ) then if (X_is_TR_rotated) then - !$omp parallel do default(shared), private(ig1,ig2) + ! + !DEV_CUF kernel do(2) + !DEV_OMP parallel do default(shared), private(ig1,ig2), collaspe(2) + ! do ig2=X_cols1,X_cols2 do ig1=X_rows1,X_rows2 - eet_factor(ig1,ig2)=isc%rhotw(G_m_G(ig2,ig1)) + eet_factor(ig1,ig2)=isc_rhotw_p(DEV_VAR(G_m_G)(ig2,ig1)) enddo enddo ! else - !$omp parallel do default(shared), private(ig1,ig2) + ! + !DEV_CUF kernel do(2) + !DEV_OMP parallel do default(shared), private(ig1,ig2), collaspe(2) + ! do ig2=X_cols1,X_cols2 do ig1=X_rows1,X_rows2 - eet_factor(ig1,ig2)=isc%rhotw(G_m_G(ig1,ig2)) + eet_factor(ig1,ig2)=isc_rhotw_p(DEV_VAR(G_m_G)(ig1,ig2)) enddo enddo ! @@ -430,19 +454,22 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) dp_dummy = 0.0_DP ! if (X_is_TR_rotated) then - !$omp parallel do default(shared), private(ig1,ig2), reduction(+:dp_dummy) + ! + !$omp parallel do default(shared), private(ig1,ig2), reduction(+:dp_dummy), collapse(2) do ig2=X_cols1,X_cols2 do ig1=X_rows1,X_rows2 dp_dummy=dp_dummy+cmplx(2._SP*pi*isc%rhotw(G_m_G(ig2,ig1))* & -& X_par(iq_mem)%blc(ig1,ig2,X_range(1)),kind=DP) +& X_par(iq_mem)%blc(ig1,ig2,X_range1),kind=DP) enddo enddo + ! else - !$omp parallel do default(shared), private(ig1,ig2), reduction(+:dp_dummy) + ! + !$omp parallel do default(shared), private(ig1,ig2), reduction(+:dp_dummy), collapse(2) do ig2=X_cols1,X_cols2 do ig1=X_rows1,X_rows2 dp_dummy=dp_dummy+cmplx(2._SP*pi*isc%rhotw(G_m_G(ig1,ig2))*& -& X_par(iq_mem)%blc(ig1,ig2,X_range(1)),kind=DP) +& X_par(iq_mem)%blc(ig1,ig2,X_range1),kind=DP) enddo enddo ! @@ -499,10 +526,13 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) if (l_ppa) then ! if(l_GW_terminator) then - !$omp parallel do default(shared), private(ig1,ig2) + ! + !DEV_CUF kernel do(2) + !DEV_OMP parallel do default(shared), private(ig1,ig2), collapse(2) + ! do ig2=X_cols1,X_cols2 do ig1=X_rows1,X_rows2 - eet_factor(ig1,ig2)=eet_factor(ig1,ig2)-isc%rhotw(ig1)*conjg(iscp%rhotw(ig2)) + eet_factor(ig1,ig2)=eet_factor(ig1,ig2)-isc_rhotw_p(ig1)*conjg(iscp_rhotw_p(ig2)) enddo enddo ! @@ -513,85 +543,73 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) 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)) ! -#ifdef _CUDA - Xng = X%ng - XppaE = X%ppaE - Xr1 = X_range(1) - Xr2 = X_range(2) - + ! do i_w=1,QP_dSc_steps - W_i_w = W_(i_w) + ! + W_i = W_(i_w) ! ! NOTE: Split reduction done here to work around PGI bug with complex - ! CUF reductions. + ! CUF reductions. dp_dummy_r = 0.0_DP dp_dummy_i = 0.0_DP + dp_dummy = 0.0_DP + ! + !DEV_CUF kernel do(2) + !DEV_OMP parallel do default(shared), private(ig1,ig2,PPA_E,PPA_R,ctmp), & + !DEV_OMP & reduction(+:dp_dummy) ! - !$cuf kernel do(2) do ig2=X_cols1,X_cols2 - do ig1=X_rows1,X_rows2 - ! - PPA_E= real(XppaE/X_blc_p(ig1,ig2,Xr2),kind=SP) - PPA_R=-X_blc_p(ig1,ig2,Xr1)/2._SP*PPA_E*isc_gamp_p(ig1,ig2) - ! - ! inline bose_f function - bose_PPA_E=0. - if (PPA_E<0.) bose_PPA_E=-spin_occ - if (Finite_Tel) then - if (abs(PPA_E)>epsilon(1.)) then - if (abs(PPA_E)<=bose_E_cut*Bose_Temp) bose_PPA_E=spin_occ*Bose_Temp/PPA_E - if (abs(PPA_E)> bose_E_cut*Bose_Temp) bose_PPA_E=spin_occ/(exp(PPA_E/Bose_Temp)-1.) - else - bose_PPA_E=spin_occ*Bose_Temp/epsilon(1.) - endif + do ig1=X_rows1,X_rows2 + ! + PPA_E= real(X_ppaE/X_blc_p(ig1,ig2,X_range2),kind=SP) + PPA_R=-X_blc_p(ig1,ig2,X_range1)/2._SP*PPA_E*isc_gamp_p(ig1,ig2) + ! + ! inline bose_f function + bose_PPA_E=0. + if (PPA_E<0.) bose_PPA_E=-spin_occ + if (Finite_Tel) then + if (abs(PPA_E)>epsilon(1.)) then + if (abs(PPA_E)<=bose_E_cut*Bose_Temp) bose_PPA_E=spin_occ*Bose_Temp/PPA_E + if (abs(PPA_E)> bose_E_cut*Bose_Temp) bose_PPA_E=spin_occ/(exp(PPA_E/Bose_Temp)-1.) + else + bose_PPA_E=spin_occ*Bose_Temp/epsilon(1.) endif - ! - ctmp = -4._SP/spin_occ*pi*isc_rhotw_p(ig1)*conjg(iscp_rhotw_p(ig2))*(-PPA_R)*& -& ( (spin_occ-f_kmq+bose_PPA_E)/(W_i_w-E_kmq-PPA_E)+& -& (f_kmq+bose_PPA_E)/(conjg(W_i_w)-E_kmq+PPA_E)) - ! - dp_dummy_r=dp_dummy_r+real(ctmp) ! real(ctmp,DP) - dp_dummy_i=dp_dummy_i+imag(ctmp) - ! - enddo + endif + ! + ctmp = -4._SP/spin_occ*pi*isc_rhotw_p(ig1)*conjg(iscp_rhotw_p(ig2))*(-PPA_R)*& +& ( (spin_occ-f_kmq+bose_PPA_E)/(W_i-E_kmq-PPA_E)+& +& (f_kmq+bose_PPA_E)/(conjg(W_i)-E_kmq+PPA_E)) + ! +! ctmp = -4._SP/spin_occ*pi*isc%rhotw(ig1)*conjg(iscp%rhotw(ig2))*(-PPA_R)*& +!& ( (spin_occ-f_kmq+bose_f(PPA_E))/(W_(i_w)-E_kmq-PPA_E)+& +!& (f_kmq+bose_f(PPA_E))/(conjg(W_(i_w))-E_kmq+PPA_E)) + ! +#ifdef _CUDA + dp_dummy_r=dp_dummy_r+real(ctmp,DP) + dp_dummy_i=dp_dummy_i+imag(ctmp) +#else + dp_dummy=dp_dummy+ctmp +#endif + ! + enddo enddo ! +#ifdef _CUDA dp_dummy%re = dp_dummy_r dp_dummy%im = dp_dummy_i - dc(i_w) = cmplx(dp_dummy,kind=SP) - ! - enddo -#else - do i_w=1,QP_dSc_steps - ! - dp_dummy = 0.0_DP - !$omp parallel do default(shared), private(ig1,ig2,PPA_E,PPA_R,ctmp), reduction(+:dp_dummy) - do ig2=X_cols1,X_cols2 - do ig1=X_rows1,X_rows2 - ! - PPA_E= real(X%ppaE/X_par(iq_mem)%blc(ig1,ig2,X_range(2)),kind=SP) - PPA_R=-X_par(iq_mem)%blc(ig1,ig2,X_range(1))/2._SP*PPA_E*isc%gamp(ig1,ig2) - ! - ctmp = -4._SP/spin_occ*pi*isc%rhotw(ig1)*conjg(iscp%rhotw(ig2))*(-PPA_R)*& -& ( (spin_occ-f_kmq+bose_f(PPA_E))/(W_(i_w)-E_kmq-PPA_E)+& -& (f_kmq+bose_f(PPA_E))/(conjg(W_(i_w))-E_kmq+PPA_E)) - ! - dp_dummy=dp_dummy+ctmp - ! - enddo - enddo - !$omp end parallel do +#endif ! dc(i_w) = cmplx(dp_dummy,kind=SP) ! enddo -#endif ! QP_Sc(i_qp,:QP_dSc_steps)=QP_Sc(i_qp,:QP_dSc_steps)+dc(:QP_dSc_steps) ! else if (l_sc_sex.or.l_cohsex.or.(l_sc_coh.and.COHSEX_use_empties)) then ! - call M_by_V('N', X%ng, X_mat(:,:,X_range(1)), conjg(iscp%rhotw), local_rhotw) + ! performed on the host + ! + call M_by_V('N', X%ng, X_mat(:,:,X_range1), conjg(iscp%rhotw), local_rhotw) ! pre_factor=0.0_SP ! @@ -623,22 +641,46 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! do i_w=1,QP_dSc_steps ! + dp_dummy_r=0.0_DP + dp_dummy_i=0.0_DP dp_dummy=0.0_DP ! - !$omp parallel do default(shared), private(ig1,ig2,PPA_E,PPA_R), reduction(+:dp_dummy) + !DEV_CUF kernel do(2) + !DEV_OMP parallel do default(shared),private(ig1,ig2,PPA_E,PPA_R), & + !DEV_OMP & reduction(+:dp_dummy), collapse(2) + ! do ig2=X_cols1,X_cols2 - do ig1=X_rows1,X_rows2 - ! - PPA_E=X%ppaE/real(X_par(iq_mem)%blc(ig1,ig2,X_range(2))) - PPA_R=-X_par(iq_mem)%blc(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),& -& eet_cutoff0(1),eet_cutoff1(1)),kind=DP) - ! - enddo + do ig1=X_rows1,X_rows2 + ! + PPA_E=X_ppaE/real(X_blc_p(ig1,ig2,X_range2)) + PPA_R=-X_blc_p(ig1,ig2,X_range1)/2._SP*PPA_E*isc_gamp_p(ig1,ig2) + ! +#ifdef _CUDA + eet_energy=eet_cutoff1+GW_terminator_E + lW=W_i + 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),& +& eet_cutoff0,eet_cutoff1) +#endif + ! + ctmp = cmplx(4._SP/spin_occ*pi*PPA_R*eet_factor(ig1,ig2)*QP_ppa_EET, kind=DP) + ! +#ifdef _CUDA + dp_dummy_r=dp_dummy_r+real(ctmp,DP) + dp_dummy_i=dp_dummy_i+imag(ctmp) +#else + dp_dummy=dp_dummy+ctmp +#endif + ! + enddo enddo - !$omp end parallel do + ! +#ifdef _CUDA + dp_dummy%re = dp_dummy_r + dp_dummy%im = dp_dummy_i +#endif ! QP_Sc(i_qp,i_w)=QP_Sc(i_qp,i_w)+cmplx(dp_dummy,kind=SP) ! @@ -648,7 +690,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! enddo QP_loop ! - if (io_RESPONSE) call X_PARALLEL_alloc(X_par(iq_mem),0,0,"CLEAN") + call X_PARALLEL_alloc(X_par(iq_mem),0,0,"CLEAN") ! enddo Q_loop ! @@ -656,13 +698,9 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! ! CLEAN ! - deallocate(dc) - if(l_ppa) then - deallocate(W_) - if (l_GW_terminator) then - YAMBO_FREE(eet_factor) - endif - endif + YAMBO_FREE(dc) + YAMBO_FREE(W_) + YAMBO_FREE(eet_factor) ! l_X_alloc=.true. #if defined _SC From 1be0e66c076494a7ac27be15155239b522009c9e Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Tue, 17 Nov 2020 17:56:32 +0100 Subject: [PATCH 036/110] further rearrangment of allocations. All tests passed. --- src/qp/QP_ppa_cohsex.F | 91 ++++++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 44 deletions(-) diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 13ce692993..69d9168c01 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -43,7 +43,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) use QP_m, ONLY:QP_t,QP_n_G_bands,QP_dSc_steps,QP_table,l_update_W,& & QP_Sc,QP_n_states,QP_G_damp,QP_table,QP_dSc_delta,GW_terminator_E,& & COHSEX_use_empties,l_GW_terminator,GW_terminator_Kind,QP_states_simmetrize - use X_m, ONLY:X_alloc,X_mat,X_mat_d,X_t,X_par + use X_m, ONLY:X_alloc,X_mat,X_t use wave_func, ONLY:WF use R_lattice, ONLY:qindx_S,bz_samp,G_m_G,G_m_G_d,nqibz use D_lattice, ONLY:nsym,i_time_rev,i_space_inv,mag_syms @@ -51,6 +51,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) use interfaces, ONLY:PARALLEL_global_indexes,PARALLEL_WF_index,WF_load,WF_free,& & PARALLEL_WF_distribute,QP_state_print use matrix_operate,ONLY:mat_transpose + use matrix, ONLY:PAR_matrix use timing_m, ONLY:timing #if defined _SC use parallel_m, ONLY:PAR_COM_QP_A2A @@ -79,7 +80,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) 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 :: iw,iw_X_mat - integer :: X_range(2),X_range1,X_range2 + integer :: X_mat_range(2),X_range1,X_range2 integer :: X_rows1,X_rows2,X_cols1,X_cols2 ! character(schlen):: ch,SECTION_name,W_name @@ -95,6 +96,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) complex(SP), allocatable :: W_(:),dc(:) complex(SP), allocatable DEV_ATTR :: eet_factor(:,:) type(elemental_collision), target :: isc,iscp + type(PAR_matrix), target :: X_par_loc ! complex(SP), pointer DEV_ATTR :: isc_rhotw_p(:) complex(SP), pointer DEV_ATTR :: iscp_rhotw_p(:) @@ -196,7 +198,16 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) isc_gamp_p => DEV_VAR(isc%gamp) isc_rhotw_p => DEV_VAR(isc%rhotw) iscp_rhotw_p => DEV_VAR(iscp%rhotw) - + ! + ! Matrix distribution + !====================== + call X_PARALLEL_alloc(X_par_loc,X%ng,Xw%n_freqs,"X") + ! + X_rows1=X_par_loc%rows(1) + X_rows2=X_par_loc%rows(2) + X_cols1=X_par_loc%cols(1) + X_cols2=X_par_loc%cols(2) + X_blc_p=> DEV_VAR(X_par_loc%blc) ! call timing('GW(ppa)',OPR='start') ! @@ -213,15 +224,15 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! ALLOCATION !------------ ! - if (.not.allocated(X_par)) then - ! - if (io_RESPONSE) then - allocate(X_par(1)) - else - allocate(X_par(PAR_nQ_ibz)) - endif - ! - endif +!if (.not.allocated(X_par)) then +! ! +! if (io_RESPONSE) then +! allocate(X_par(1)) +! else +! allocate(X_par(PAR_nQ_ibz)) +! endif +! ! +!endif ! if (l_sc_coh.or.l_sc_sex.or.l_cohsex.or.l_sc_srpa) then if (io_RESPONSE) call X_alloc('X',(/X%ng,X%ng,1/)) @@ -231,7 +242,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) YAMBO_ALLOC(W_,(QP_dSc_steps)) YAMBO_ALLOC(dc,(QP_dSc_steps)) if(l_GW_terminator) then - YAMBO_ALLOC(eet_factor,(X%ng,X%ng)) + YAMBO_ALLOC(eet_factor,(X_rows1:X_rows2,X_cols1:X_cols2)) endif endif ! @@ -252,6 +263,13 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) io_err=io_X(X,Xw,ID) endif ! + ! indexes to be used with X_par_loc (i.e..also when using X_blc_p) + ! X_mat_range(1:2) have to be used with X_mat, instead + ! + X_range1=1 + X_range2=Xw%n_freqs + X_ppaE =X%ppaE + ! Q_loop: do iqbz=iq_to_start,q%nbz ! if (.not.PAR_IND_Q_ibz%element_1D(q%sstar(iqbz,1))) cycle @@ -263,8 +281,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) if (iqibz/=isc%iqref) then ! iq_mem=PAR_Q_ibz_index(iqibz) - X_range=(/1,Xw%n_freqs/) - if (.not.io_RESPONSE) X_range=(/Xw%n_freqs*(iq_mem-1)+1,iq_mem*Xw%n_freqs/) + X_mat_range=(/1,Xw%n_freqs/) + if (.not.io_RESPONSE) X_mat_range=(/Xw%n_freqs*(iq_mem-1)+1,iq_mem*Xw%n_freqs/) ! ! GAMP ! @@ -299,10 +317,10 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) !$omp parallel do default(shared), private(ig1,ig2) do ig2=1,X%ng do ig1=1,X%ng - if (real(X_mat(ig1,ig2,X_range(1))/X_mat(ig1,ig2,X_range(2)))<=1._SP) then - X_mat(ig1,ig2,X_range(2))=X%ppaE + if (real(X_mat(ig1,ig2,X_mat_range(1))/X_mat(ig1,ig2,X_mat_range(2)))<=1._SP) then + X_mat(ig1,ig2,X_mat_range(2))=X%ppaE else - X_mat(ig1,ig2,X_range(2))=sqrt(X_mat(ig1,ig2,X_range(1))/X_mat(ig1,ig2,X_range(2))-1) + X_mat(ig1,ig2,X_mat_range(2))=sqrt(X_mat(ig1,ig2,X_mat_range(1))/X_mat(ig1,ig2,X_mat_range(2))-1) endif enddo enddo @@ -312,7 +330,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) !$omp parallel do default(shared), private(ig1,ig2) do ig2=1,X%ng do ig1=1,X%ng - X_mat(ig1,ig2,X_range(1))=X_mat(ig1,ig2,X_range(1))*isc%gamp(ig1,ig2) + X_mat(ig1,ig2,X_mat_range(1))=X_mat(ig1,ig2,X_mat_range(1))*isc%gamp(ig1,ig2) enddo enddo ! @@ -339,38 +357,24 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! ! Note (AF) that $omp directives are inside mat_transpose ! - call mat_transpose(X_mat(:,:,X_range(1))) - if (l_ppa) call mat_transpose(X_mat(:,:,X_range(2))) + call mat_transpose(X_mat(:,:,X_mat_range(1))) + if (l_ppa) call mat_transpose(X_mat(:,:,X_mat_range(2))) X_is_TR_rotated=.true. endif ! - ! defs useful to deal with cuf kernels - ! - X_ppaE =X%ppaE - X_range1=X_range(1) - X_range2=X_range(2) - ! - ! mapping of X_par from X_mat + ! mapping of X_par_loc from X_mat ! if (io_RESPONSE) iq_mem=1 - call X_PARALLEL_alloc(X_par(iq_mem),X%ng,Xw%n_freqs,"X") - ! - X_blc_p=> DEV_VAR(X_par(iq_mem)%blc) - ! - X_rows1=X_par(iq_mem)%rows(1) - X_rows2=X_par(iq_mem)%rows(2) - X_cols1=X_par(iq_mem)%cols(1) - X_cols2=X_par(iq_mem)%cols(2) ! do iw=1,Xw%n_freqs if ( io_RESPONSE) iw_X_mat=iw if (.not.io_RESPONSE) iw_X_mat=(iq_mem-1)*Xw%n_freqs+iw ! - X_par(iq_mem)%blc(:,:,iw)=X_mat(X_rows1:X_rows2,X_cols1:X_cols2,iw_X_mat) + X_par_loc%blc(:,:,iw)=X_mat(X_rows1:X_rows2,X_cols1:X_cols2,iw_X_mat) enddo ! - if (have_cuda) call dev_memcpy(X_par(iq_mem)%blc_d, X_par(iq_mem)%blc) + if (have_cuda) call dev_memcpy(X_par_loc%blc_d, X_par_loc%blc) ! ! QP_loop: do i_qp=i_qp_to_start,QP_n_states @@ -459,7 +463,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) do ig2=X_cols1,X_cols2 do ig1=X_rows1,X_rows2 dp_dummy=dp_dummy+cmplx(2._SP*pi*isc%rhotw(G_m_G(ig2,ig1))* & -& X_par(iq_mem)%blc(ig1,ig2,X_range1),kind=DP) +& X_par_loc%blc(ig1,ig2,X_range1),kind=DP) enddo enddo ! @@ -469,7 +473,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) do ig2=X_cols1,X_cols2 do ig1=X_rows1,X_rows2 dp_dummy=dp_dummy+cmplx(2._SP*pi*isc%rhotw(G_m_G(ig1,ig2))*& -& X_par(iq_mem)%blc(ig1,ig2,X_range1),kind=DP) +& X_par_loc%blc(ig1,ig2,X_range1),kind=DP) enddo enddo ! @@ -609,7 +613,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! ! performed on the host ! - call M_by_V('N', X%ng, X_mat(:,:,X_range1), conjg(iscp%rhotw), local_rhotw) + call M_by_V('N', X%ng, X_mat(:,:,X_mat_range(1)), conjg(iscp%rhotw), local_rhotw) ! pre_factor=0.0_SP ! @@ -690,8 +694,6 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! enddo QP_loop ! - call X_PARALLEL_alloc(X_par(iq_mem),0,0,"CLEAN") - ! enddo Q_loop ! call live_timing() @@ -707,7 +709,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) l_X_alloc=l_sc_run.and.io_RESPONSE #endif if(l_X_alloc) call X_alloc('X') - if(allocated(X_par)) deallocate(X_par) +! if(allocated(X_par)) deallocate(X_par) + call X_PARALLEL_alloc(X_par_loc,0,0,"CLEAN") ! call timing('GW(ppa)',OPR='stop') ! From 4d4c26abaa36bb6f45cf7494111a037ef0ec551a Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Tue, 17 Nov 2020 18:54:03 +0100 Subject: [PATCH 037/110] compilation fixed --- src/qp/QP_ppa_cohsex.F | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 69d9168c01..3443bf2141 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -59,11 +59,10 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) #endif use deviceXlib_m, ONLY:dev_memcpy,dev_memset use cuda_m, ONLY:have_cuda -#ifdef _CUDA + ! use drivers, ONLY:Finite_Tel use D_lattice, ONLY:Bose_Temp use functions, ONLY:bose_E_cut -#endif ! #include #include @@ -431,7 +430,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) if (X_is_TR_rotated) then ! !DEV_CUF kernel do(2) - !DEV_OMP parallel do default(shared), private(ig1,ig2), collaspe(2) + !DEV_OMP parallel do default(shared), private(ig1,ig2), collapse(2) ! do ig2=X_cols1,X_cols2 do ig1=X_rows1,X_rows2 @@ -442,7 +441,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) else ! !DEV_CUF kernel do(2) - !DEV_OMP parallel do default(shared), private(ig1,ig2), collaspe(2) + !DEV_OMP parallel do default(shared), private(ig1,ig2), collapse(2) ! do ig2=X_cols1,X_cols2 do ig1=X_rows1,X_rows2 From 163bd2fbb51eb94dacf606907000e9fb04803a8f Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Wed, 18 Nov 2020 16:06:08 +0100 Subject: [PATCH 038/110] io_X improved to possibly avoid the use of X_mat when reading data. --- src/io/io_X.F | 77 ++++++++++++++++++++++++++++++++---------- src/modules/mod_X.F | 1 + src/qp/QP_ppa_cohsex.F | 10 ++---- 3 files changed, 62 insertions(+), 26 deletions(-) diff --git a/src/io/io_X.F b/src/io/io_X.F index 7d9d020fed..f55dfb30b7 100644 --- a/src/io/io_X.F +++ b/src/io/io_X.F @@ -26,7 +26,7 @@ integer function io_X(X,Xw,ID) use pars, ONLY:SP,schlen use units, ONLY:HA2EV use R_lattice, ONLY:g_vec -use X_m, ONLY:X_t,X_mat,X_RLcomp_ig,X_desc,X_alloc +use X_m, ONLY:X_t,X_mat,X_par,X_RLcomp_ig,X_desc,X_alloc use frequency, ONLY:w_samp use IO_m, ONLY:io_connect,io_disconnect,io_sec,io_com,& & io_elemental,io_status,io_bulk,& @@ -39,9 +39,6 @@ integer function io_X(X,Xw,ID) use stderr, ONLY:intc use timing_m, ONLY:timing use parallel_m, ONLY:PAR_COM_X_WORLD -#if defined _PAR_IO -use X_m, ONLY:X_par -#endif ! #include ! @@ -51,7 +48,7 @@ integer function io_X(X,Xw,ID) ! !Work Space ! -integer ::sec_size,i1,iq,i_err,io_com_save,io_err +integer ::sec_size,i1,ig1,ig2,iq,i_err,io_com_save,io_err logical ::different_db_RL_order,perform_IO character (schlen) ::ch,db_desc character (2) ::local_XC_KIND @@ -205,29 +202,73 @@ integer function io_X(X,Xw,ID) ! ch="X_Q_"//trim(intc(iq)) ! -#if defined _PAR_IO + ! on write: + ! - serial IO => use X_mat + ! - parallel IO => use X_par + ! + ! on read: (independently of _PAR_IO) + ! - if allocated X_mat => use X_mat + ! - if allocated X_par => use X_par + ! - if nothing allocated use X_mat (backward compatibility) + ! - if both are allocated, but are filled + ! + ! Note that only X_par(1) is used since io_X is called + ! only when io_RESPONSE=.true., implying one q-point + ! at a time is dealt with. + ! if(write_is_on(ID)) then ! +#if defined _PAR_IO call def_variable_bulk(ID,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP,par_io_kind='collective') call io_variable_bulk(ID,1,C3=X_par(1)%blc(:,:,:Xw%n_freqs),IPOS=(/1,X_par(1)%rows(1),X_par(1)%cols(1),1/)) +#else + call def_variable_bulk(ID,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP) + call io_variable_bulk(ID,1,C3=X_mat(:,:,:Xw%n_freqs),IPOS=(/1,1,1,1/)) +#endif ! else if(read_is_on(ID)) then -#endif ! - if (.not.allocated(X_mat).and.read_is_on(ID)) call X_alloc('X',(/X%ng,X%ng,Xw%n_freqs/)) - call def_variable_bulk(ID,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP) - call io_variable_bulk(ID,1,C3=X_mat(:,:,:Xw%n_freqs),IPOS=(/1,1,1,1/)) + if (.not.allocated(X_mat).and..not.allocated(X_par)) call X_alloc('X',(/X%ng,X%ng,Xw%n_freqs/)) + ! + if (allocated(X_mat)) then + call def_variable_bulk(ID,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP) + call io_variable_bulk(ID,1,C3=X_mat(:,:,:Xw%n_freqs),IPOS=(/1,1,1,1/)) + endif + ! + if (allocated(X_par)) then + call def_variable_bulk(ID,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP) + call io_variable_bulk(ID,1,C3=X_par(1)%blc(:,:,:Xw%n_freqs),IPOS=(/1,X_par(1)%rows(1),X_par(1)%cols(1),1/)) + endif ! -#if defined _PAR_IO endif -#endif + ! + ! handle different RL_ordering ! if (read_is_on(ID) .and. different_db_RL_order) then - YAMBO_ALLOC(X_on_disk,(X%ng,X%ng)) - do i1=1,Xw%n_freqs - X_on_disk=X_mat(:,:,i1) - X_mat(X_RLcomp_ig(:),X_RLcomp_ig(:),i1)=X_on_disk - enddo + ! + if (allocated(X_mat)) then + YAMBO_ALLOC(X_on_disk,(X%ng,X%ng)) + do i1=1,Xw%n_freqs + X_on_disk=X_mat(:,:,i1) + X_mat(X_RLcomp_ig(:),X_RLcomp_ig(:),i1)=X_on_disk + enddo + endif + ! + if (allocated(X_par)) 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 + ! + X_on_disk=X_par(1)%blc(:,:,i1) + ! + do ig2=X_par(1)%cols(1),X_par(1)%cols(2) + do ig1=X_par(1)%rows(1),X_par(1)%rows(2) + X_par(1)%blc(X_RLcomp_ig(ig1),X_RLcomp_ig(ig2),i1)=X_on_disk(ig1,ig2) + enddo + enddo + ! + enddo + endif + ! YAMBO_FREE(X_on_disk) endif ! @@ -292,4 +333,4 @@ integer function X_RLcomp_table() ! end function ! -end function \ No newline at end of file +end function diff --git a/src/modules/mod_X.F b/src/modules/mod_X.F index 4e8658ee25..ea3ac736e3 100644 --- a/src/modules/mod_X.F +++ b/src/modules/mod_X.F @@ -189,6 +189,7 @@ subroutine X_alloc(what,d) ! and the matrix itself ! YAMBO_FREE(X_mat) + YAMBO_FREE(X_mat_d) ! end select endif diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 3443bf2141..b29b86883d 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -223,14 +223,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! ALLOCATION !------------ ! -!if (.not.allocated(X_par)) then -! ! -! if (io_RESPONSE) then -! allocate(X_par(1)) -! else -! allocate(X_par(PAR_nQ_ibz)) -! endif -! ! +!if (.not.allocated(X_par).and.io_RESPONSE) then +! allocate(X_par(1)) !endif ! if (l_sc_coh.or.l_sc_sex.or.l_cohsex.or.l_sc_srpa) then From b73125390513d51d1125a3d5bc74bb2476194f5b Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Thu, 3 Dec 2020 15:25:55 +0100 Subject: [PATCH 039/110] logical todo list --- src/common/eval_G_minus_G.F | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/common/eval_G_minus_G.F b/src/common/eval_G_minus_G.F index e934898244..b70f2be86e 100644 --- a/src/common/eval_G_minus_G.F +++ b/src/common/eval_G_minus_G.F @@ -163,6 +163,27 @@ integer function eval_G_minus_G(iG,iGo,COMM) YAMBO_ALLOC(G_m_G,(iG_,iGo_)) G_m_G=0 ! +! * convert to g_vec to integer coords +! relative/crystal coords +! * alloc alternative g_vec_crys array +! * use internal conversion routines, if fast enough +! +! * define a map like ig=imap(i,j,k) +! ig: index of G-vect in the g_vec list, +! i,j,k integer components +! +! imap(:,:,:)=0 +! do ig = 1, Ng +! imap(g_vec_i(1,ig),g_vec_i(2,ig),g_vec_i(3,ig)) = ig +! enddo +! +! * v1 becomes an integert triplet +! * G_m_G(i1,i2) = imap(v1(1),v1(2),v1(3)) +! +! * beware index ordering g_vec(ng,3)... +! surely does not help +! + ! !$omp parallel do default(shared), private(i2,i1,v1), schedule(dynamic) do i2=1,iGo_ ! From 0996c65308de32d84edf8efe99f0a9db4c14f02d Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Thu, 3 Dec 2020 16:08:23 +0100 Subject: [PATCH 040/110] initial (and tentative) pseudoimpl --- src/common/eval_G_minus_G.F | 8 +++++ src/modules/mod_vec_operate.F | 68 +++++++++++++++++++++++++++++++++-- 2 files changed, 74 insertions(+), 2 deletions(-) diff --git a/src/common/eval_G_minus_G.F b/src/common/eval_G_minus_G.F index b70f2be86e..1fd7cb1d79 100644 --- a/src/common/eval_G_minus_G.F +++ b/src/common/eval_G_minus_G.F @@ -168,6 +168,14 @@ integer function eval_G_minus_G(iG,iGo,COMM) ! * alloc alternative g_vec_crys array ! * use internal conversion routines, if fast enough ! +! g_vec looks to be iku, we want to have rlu +! need in principle to call c2a(v_in,v_out,mode="ki2a") +! but a better implementation is given in fft_setup. +! +! it would probably be better to code a dedicated +! iku2rlu, accepting multiple vectors, or to +! extend c2a to acccept multiple vectors at the same time +! ! * define a map like ig=imap(i,j,k) ! ig: index of G-vect in the g_vec list, ! i,j,k integer components diff --git a/src/modules/mod_vec_operate.F b/src/modules/mod_vec_operate.F index 21fe6f9681..580bf6a86e 100644 --- a/src/modules/mod_vec_operate.F +++ b/src/modules/mod_vec_operate.F @@ -35,6 +35,10 @@ module vec_operate module procedure r_cross_product,c_cross_product end interface ! + interface c2a + module procedure c2a_scal, c2a_vec + end interface + ! contains ! integer function min_index(N,v) @@ -186,7 +190,7 @@ subroutine rot_v_xy_plane(t,v_in,v_out) ! end subroutine rot_v_xy_plane ! - subroutine c2a(b_in,v_in,v_out,mode) + subroutine c2a_scal(b_in,v_in,v_out,mode) ! ! mode = 'k/r c2a' 'k/r a2c' (cc <-> rlu) ! mode = 'k/r i2a' 'k/r a2i' (iku <-> rlu) @@ -239,7 +243,67 @@ subroutine c2a(b_in,v_in,v_out,mode) v_in=matmul(mat,u) if (index(mode,'2i')/=0) v_in(:)=v_in(:)/n(:) ! * -> iku endif - end subroutine c2a + end subroutine c2a_scal + ! + subroutine c2a_vec(b_in,nvec,v_in,v_out,mode) + ! + ! mode = 'k/r c2a' 'k/r a2c' (cc <-> rlu) + ! mode = 'k/r i2a' 'k/r a2i' (iku <-> rlu) + ! mode = 'k/r i2c' 'k/r c2i' (cc <-> iku) + ! + use D_lattice, ONLY:alat,a + use R_lattice, ONLY:b + use matrix_operate, ONLY:m3inv + integer :: nvec + real(SP) :: v_in(nvec,3) + real(SP), optional:: b_in(3,3),v_out(nvec,3) + character(4)::mode + ! + ! Work Space + ! + integer :: i + real(SP):: a_here(3,3),mat(3,3),n(3,3),n_m1(3,3),u(nvec,3) + ! + ! Define local unit cell vectors + ! + if (index(mode,'r')/=0) then + a_here=a + if (present(b_in)) a_here=b_in + else + a_here=b + if (present(b_in)) a_here=b_in + endif + ! + ! Scale factor if input vector is in iku + ! + do i =1, 3 + if (index(mode,'r')/=0) n(i,i)=alat(i) + if (index(mode,'k')/=0) n(i,i)=2._SP*pi/alat(i) + if (index(mode,'2i')/=0) n_m1(i,i)=1._SP/n(i,i) + enddo + ! + ! u is rlu or cc (no iku) + ! + u=v_in + if (index(mode,'i2')/=0) u(1:nvec,1:3)=matmul(v_in(:,:),n(:,:)) ! iku -> cc + ! + ! i2c/c2i + mat=reshape((/1._SP,0._SP,0._SP,0._SP,1._SP,0._SP,0._SP,0._SP,1._SP/),(/3,3/)) + ! + ! a2c/a2i + if (index(mode,'a2c')/=0.or.index(mode,'a2i')/=0) mat=transpose(a_here) + ! + ! c2a/i2a + if (index(mode,'c2a')/=0.or.index(mode,'i2a')/=0) call m3inv(transpose(a_here),mat) + ! + if (present(v_out)) then + v_out=transpose(matmul(mat,transpose(u))) + if (index(mode,'2i')/=0) v_out(1:nvec,1:3)=matmul(v_out(1:nvec,1:3),n_m1) ! * -> iku + else + v_in=transpose(matmul(mat,transpose(u))) + if (index(mode,'2i')/=0) v_in(1:nvec,1:3)=matmul(v_in(1:nvec,1:3),n_m1) ! * -> iku + endif + end subroutine c2a_vec ! subroutine define_b_and_DL_vol() ! From 6ab361b509319db7b639c14d97db8e2d6703df84 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Thu, 3 Dec 2020 16:14:32 +0100 Subject: [PATCH 041/110] small changes, cleanup --- src/common/eval_G_minus_G.F | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/common/eval_G_minus_G.F b/src/common/eval_G_minus_G.F index 1fd7cb1d79..d52d1b7e60 100644 --- a/src/common/eval_G_minus_G.F +++ b/src/common/eval_G_minus_G.F @@ -33,10 +33,7 @@ integer function eval_G_minus_G(iG,iGo,COMM) use pars, ONLY:SP use vec_operate, ONLY:iku_v_norm use parallel_m, ONLY:MPI_comm,PP_redux_wait,PP_indexes,PP_indexes_reset,myid - use R_lattice, ONLY:G_m_G,g_vec,ng_in_shell,n_g_shells,E_of_shell -#ifdef _CUDA - use R_lattice, ONLY:G_m_G_d -#endif + use R_lattice, ONLY:G_m_G,G_m_G_d,g_vec,ng_in_shell,n_g_shells,E_of_shell use interfaces, ONLY:PARALLEL_index,PARALLEL_live_message use timing_m, ONLY:timing #include @@ -216,7 +213,7 @@ integer function eval_G_minus_G(iG,iGo,COMM) ! #ifdef _CUDA YAMBO_FREE(G_m_G_d) - allocate(G_m_G_d,source=G_m_G) + YAMBO_ALLOC_SOURCE(G_m_G_d,G_m_G) #endif ! call timing("eval_G_minus_G",opr="stop") From ce710b67a655fbe7aa8746dde5919d7df0214843 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Fri, 4 Dec 2020 17:22:43 +0100 Subject: [PATCH 042/110] MATRIX_duplicate fixed; MATRIX_transpose added --- src/matrices/.objects | 2 +- src/matrices/MATRIX_duplicate.F | 41 +++++++++++---------- src/matrices/MATRIX_transpose.F | 64 +++++++++++++++++++++++++++++++++ src/modules/mod_interfaces.F | 9 ++++- 4 files changed, 96 insertions(+), 20 deletions(-) create mode 100644 src/matrices/MATRIX_transpose.F diff --git a/src/matrices/.objects b/src/matrices/.objects index 13873af80f..13ae9ec6f0 100644 --- a/src/matrices/.objects +++ b/src/matrices/.objects @@ -2,4 +2,4 @@ SLK_objs = SLK_matrix_init.o #endif objs = $(SLK_objs) MATRIX_init.o MATRIX_duplicate.o MATRIX_transfer_side_crop.o \ - MATRIX_BSE_to_PAR.o MATRIX_PAR_to_from_PAR.o MATRIX_transfer.o + MATRIX_BSE_to_PAR.o MATRIX_PAR_to_from_PAR.o MATRIX_transfer.o MATRIX_transpose.o diff --git a/src/matrices/MATRIX_duplicate.F b/src/matrices/MATRIX_duplicate.F index f5615b76ca..4b116d1e7d 100644 --- a/src/matrices/MATRIX_duplicate.F +++ b/src/matrices/MATRIX_duplicate.F @@ -32,25 +32,31 @@ subroutine MATRIX_duplicate( operation, M_in, INDEX_in, M_out ) ! character(*) :: operation type(PAR_matrix), optional :: M_in - type(PAR_matrix) :: M_out integer , optional :: INDEX_in + type(PAR_matrix) :: M_out ! ! Work Space ! integer :: i_row,i_col,i_r,i_c,i_b,Nb_i(2),Nb_o(2) real(SP) :: pre_factor + logical :: do_Transpose,do_Conjg ! call MATRIX_reset(M_out) ! - if (operation=="free") then - YAMBO_FREE(M_out%blc) - return - endif + ! deallocation is done by MATRIX_reset + if (operation=="free") return + ! + if (.not.present(M_in)) call error("[MATRIX] M_in required and not present") + ! + do_Transpose=index(operation,"T")>0 + do_Conjg=index(operation,"C")>0 + ! ! M_out%kind = M_in%kind M_out%I = M_in%I - M_out%N = M_in%N - M_out%desc = M_in%desc + M_out%N = M_in%N + M_out%Nb = M_in%Nb + M_out%desc = M_in%desc M_out%lwork = M_in%lwork M_out%lrwork = M_in%lrwork M_out%liwork = M_in%liwork @@ -66,7 +72,7 @@ subroutine MATRIX_duplicate( operation, M_in, INDEX_in, M_out ) M_out%BLCncols = M_in%BLCncols M_out%BLCrows = M_in%BLCrows M_out%BLCcols = M_in%BLCcols - if (operation=="+TC".or.operation=="+T") then + if (do_Transpose) then M_out%rows = M_in%cols M_out%cols = M_in%rows M_out%nrows = M_in%ncols @@ -77,6 +83,8 @@ subroutine MATRIX_duplicate( operation, M_in, INDEX_in, M_out ) M_out%BLCncols = M_in%BLCnrows endif ! + ! redefine Nb, if needed + ! Nb_i=(/1, M_in%Nb /) Nb_o=(/1, M_out%Nb/) if (present(INDEX_in)) then @@ -86,6 +94,8 @@ subroutine MATRIX_duplicate( operation, M_in, INDEX_in, M_out ) endif M_out%Nb = Nb_o(2)-Nb_o(1)+1 ! + ! allocation + ! YAMBO_ALLOC(M_out%blc,(M_out%BLCrows(1):M_out%BLCrows(2),M_out%cols(1):M_out%BLCcols(2),Nb_o(1):Nb_o(2))) M_out%blc=cZERO ! @@ -97,10 +107,8 @@ subroutine MATRIX_duplicate( operation, M_in, INDEX_in, M_out ) pre_factor=1._SP if (index(operation,"-")>0 ) pre_factor=-1._SP ! -#if defined _OPENMP - !$omp parallel default(shared), private(i_row,i_col,i_r,i_c,i_b) - !$omp do -#endif + !$omp parallel do default(shared), private(i_row,i_col,i_r,i_c,i_b), & + !$omp & collapse(2) do i_row=M_in%rows(1),M_in%rows(2) do i_col=M_in%cols(1),M_in%cols(2) do i_b=Nb_i(1),Nb_i(2) @@ -108,12 +116,12 @@ subroutine MATRIX_duplicate( operation, M_in, INDEX_in, M_out ) i_r=i_row i_c=i_col ! - if (index(operation,"T")>0) then + if (do_Transpose) then i_r=i_col i_c=i_row endif ! - if (index(operation,"C")>0 ) then + if (do_Conjg) then M_out%blc(i_r,i_c,i_b+Nb_o(1)-Nb_i(1))=pre_factor*conjg(M_in%blc(i_row,i_col,i_b)) else M_out%blc(i_r,i_c,i_b+Nb_o(1)-Nb_i(1))=pre_factor*M_in%blc(i_row,i_col,i_b) @@ -122,9 +130,6 @@ subroutine MATRIX_duplicate( operation, M_in, INDEX_in, M_out ) enddo enddo enddo -#if defined _OPENMP - !$omp enddo - !$omp end parallel -#endif + !$omp end parallel do ! end subroutine diff --git a/src/matrices/MATRIX_transpose.F b/src/matrices/MATRIX_transpose.F new file mode 100644 index 0000000000..62215597d3 --- /dev/null +++ b/src/matrices/MATRIX_transpose.F @@ -0,0 +1,64 @@ +! +! Copyright (C) 2000-2020 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 MATRIX_transpose( operation, M_in, M_out ) + ! + ! performs the transpose (or transpose conjugate) of a distributed + ! matrix. + ! + ! operation = "T" | "TC" + ! + ! M_in is overwritten in output unless M_out is present + ! + use interfaces, ONLY:MATRIX_duplicate + use matrix, ONLY:PAR_matrix,MATRIX_reset +#include + ! + character(*) :: operation + type(PAR_matrix), optional :: M_in + type(PAR_matrix) :: M_out + ! + ! Work Space + ! + type(PAR_matrix) :: M_tmp + ! + ! note that here the parallel distribution is changed + ! is order to minimize (i.e. avoid) data transfer + ! + if (trim(operation)/="T".and.trim(operation)/="TC") & +& call error("[MATRIX] invalid operation in MATRIX_transpose") + ! + call MATRIX_reset(M_tmp) + ! + if (present(M_in)) then + call MATRIX_duplicate(operation, M_in=M_in, M_out=M_tmp) + else + call MATRIX_duplicate(operation, M_in=M_out, M_out=M_tmp) + endif + ! + call MATRIX_reset(M_out) + call MATRIX_duplicate("+1", M_in=M_tmp, M_out=M_out) + ! + call MATRIX_reset(M_tmp) + ! +end subroutine diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index fa571979cd..52666515dd 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -51,8 +51,15 @@ subroutine MATRIX_duplicate( operation, M_in, INDEX_in, M_out ) use matrix, ONLY:PAR_matrix character(*) :: operation type(PAR_matrix), optional :: M_in - type(PAR_matrix) :: M_out integer , optional :: INDEX_in + type(PAR_matrix) :: M_out + end subroutine + ! + subroutine MATRIX_transpose( operation, M_in, M_out ) + use matrix, ONLY:PAR_matrix,MATRIX_reset + character(*) :: operation + type(PAR_matrix), optional :: M_in + type(PAR_matrix) :: M_out end subroutine ! subroutine MATRIX_transfer( M_in, M_bse, M, M_out, INDEX_in, INDEX_out, SND, RCV, COMM, COMM_name) From 877d96fd6c7afd5be803cb8e16d52cf3f15ce311 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Fri, 4 Dec 2020 17:23:57 +0100 Subject: [PATCH 043/110] bug fixed in covariant dipoles with g parallelism --- src/dipoles/DIPOLE_IO.F | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dipoles/DIPOLE_IO.F b/src/dipoles/DIPOLE_IO.F index 7a6569b666..b46c526022 100644 --- a/src/dipoles/DIPOLE_IO.F +++ b/src/dipoles/DIPOLE_IO.F @@ -84,6 +84,7 @@ subroutine DIPOLE_IO(Xk,Xen,Dip,check_read_or_write,io_err,PAR_K_scheme_kind) 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 + ! ! Master node bcast matrix dimensions for the other cores ! @@ -171,9 +172,9 @@ subroutine DIPOLE_IO(Xk,Xen,Dip,check_read_or_write,io_err,PAR_K_scheme_kind) #if !defined _PAR_IO if (i_cpu/=PAR_COM_X_WORLD%CPU_id+1) cycle #endif - do ik=1,Xk%nbz + do ik=1,Xk%nibz i_fragment=ik+(i_sp_pol-1)*Xk%nibz - if ((.not.PAR_K_scheme%IND_bz%element_1D(ik)).and.writing) cycle + if ((.not.PAR_K_scheme%IND_ibz%element_1D(ik)).and.writing) cycle if ((.not.PAR_K_scheme%COM_ibz_A2A%CPU_id==0).and.writing) cycle #if !defined _PAR_IO IO_ACT_NOW=manage_action(IO_ACTION,i_fragment,1,Xk%nibz*n_sp_pol,PAR_K_scheme%IND_ibz) From 1fa6a4d05012107dded171511a00224708fa5f34 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Fri, 4 Dec 2020 17:28:09 +0100 Subject: [PATCH 044/110] use of X_mat in QP_ppa_cohsex removed. G-parallism is working for PPA and Terminators. Not yet for COHSEX. --- src/io/io_X.F | 7 ++- src/modules/mod_IO.F | 4 +- src/qp/QP_ppa_cohsex.F | 107 +++++++++++++++++++++-------------------- 3 files changed, 63 insertions(+), 55 deletions(-) diff --git a/src/io/io_X.F b/src/io/io_X.F index f55dfb30b7..502a99036c 100644 --- a/src/io/io_X.F +++ b/src/io/io_X.F @@ -228,7 +228,12 @@ integer function io_X(X,Xw,ID) ! else if(read_is_on(ID)) then ! - if (.not.allocated(X_mat).and..not.allocated(X_par)) call X_alloc('X',(/X%ng,X%ng,Xw%n_freqs/)) + if (.not.allocated(X_par)) then + if (.not.allocated(X_mat)) call X_alloc('X',(/X%ng,X%ng,Xw%n_freqs/)) + !else + ! if (.not.allocated(X_par(1)%blc)) & + ! call X_PARALLEL_alloc(X_par(1),X%ng,Xw%n_freqs,"X") + endif ! if (allocated(X_mat)) then call def_variable_bulk(ID,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP) diff --git a/src/modules/mod_IO.F b/src/modules/mod_IO.F index add4db4045..d178204a60 100644 --- a/src/modules/mod_IO.F +++ b/src/modules/mod_IO.F @@ -421,8 +421,8 @@ subroutine io_control(ACTION,MODE,COM,SEC,ID,COMM) ! Assign a new unit if the unit is not already open ! define_ID=any((/ACTION==OP_RD_CL, ACTION==OP_WR_CL, & -& ACTION==OP_APP_CL,ACTION==OP_RD, & -& ACTION==OP_APP, ACTION==OP_WR/)) +& ACTION==OP_APP_CL,ACTION==OP_RD, & +& ACTION==OP_APP, ACTION==OP_WR/)) ! if ( define_ID .and. (master_cpu .or. (.not.present(COMM))) ) then ID=-1 diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index b29b86883d..630e8d2504 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -1,3 +1,4 @@ + ! ! Copyright (C) 2000-2020 the YAMBO team ! http://www.yambo-code.org @@ -43,14 +44,13 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) use QP_m, ONLY:QP_t,QP_n_G_bands,QP_dSc_steps,QP_table,l_update_W,& & QP_Sc,QP_n_states,QP_G_damp,QP_table,QP_dSc_delta,GW_terminator_E,& & COHSEX_use_empties,l_GW_terminator,GW_terminator_Kind,QP_states_simmetrize - use X_m, ONLY:X_alloc,X_mat,X_t + use X_m, ONLY:X_alloc,X_par,X_t use wave_func, ONLY:WF use R_lattice, ONLY:qindx_S,bz_samp,G_m_G,G_m_G_d,nqibz use D_lattice, ONLY:nsym,i_time_rev,i_space_inv,mag_syms use wrapper, ONLY:M_by_V use interfaces, ONLY:PARALLEL_global_indexes,PARALLEL_WF_index,WF_load,WF_free,& -& PARALLEL_WF_distribute,QP_state_print - use matrix_operate,ONLY:mat_transpose +& PARALLEL_WF_distribute,QP_state_print,MATRIX_transpose,MATRIX_duplicate use matrix, ONLY:PAR_matrix use timing_m, ONLY:timing #if defined _SC @@ -78,8 +78,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! 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 :: iw,iw_X_mat - integer :: X_mat_range(2),X_range1,X_range2 + integer :: iw + integer :: X_range1,X_range2 integer :: X_rows1,X_rows2,X_cols1,X_cols2 ! character(schlen):: ch,SECTION_name,W_name @@ -198,16 +198,6 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) isc_rhotw_p => DEV_VAR(isc%rhotw) iscp_rhotw_p => DEV_VAR(iscp%rhotw) ! - ! Matrix distribution - !====================== - call X_PARALLEL_alloc(X_par_loc,X%ng,Xw%n_freqs,"X") - ! - X_rows1=X_par_loc%rows(1) - X_rows2=X_par_loc%rows(2) - X_cols1=X_par_loc%cols(1) - X_cols2=X_par_loc%cols(2) - X_blc_p=> DEV_VAR(X_par_loc%blc) - ! call timing('GW(ppa)',OPR='start') ! ! Plasmon-Pole/Static interaction DB I/O @@ -223,20 +213,22 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! ALLOCATION !------------ ! -!if (.not.allocated(X_par).and.io_RESPONSE) then -! allocate(X_par(1)) -!endif + ! deallocate X_mat + call X_alloc("X") + ! + if (.not.allocated(X_par).and.io_RESPONSE) then + allocate(X_par(1)) + endif ! if (l_sc_coh.or.l_sc_sex.or.l_cohsex.or.l_sc_srpa) then - if (io_RESPONSE) call X_alloc('X',(/X%ng,X%ng,1/)) + !if (io_RESPONSE) call X_alloc('X',(/X%ng,X%ng,1/)) + if (io_RESPONSE) call X_PARALLEL_alloc(X_par(1),X%ng,1,"X") YAMBO_ALLOC(dc,(2)) else - if (io_RESPONSE) call X_alloc('X',(/X%ng,X%ng,2/)) + !if (io_RESPONSE) call X_alloc('X',(/X%ng,X%ng,2/)) + if (io_RESPONSE) call X_PARALLEL_alloc(X_par(1),X%ng,2,"X") YAMBO_ALLOC(W_,(QP_dSc_steps)) YAMBO_ALLOC(dc,(QP_dSc_steps)) - if(l_GW_terminator) then - YAMBO_ALLOC(eet_factor,(X_rows1:X_rows2,X_cols1:X_cols2)) - endif endif ! call PP_redux_wait @@ -256,8 +248,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) io_err=io_X(X,Xw,ID) endif ! - ! indexes to be used with X_par_loc (i.e..also when using X_blc_p) - ! X_mat_range(1:2) have to be used with X_mat, instead + ! indexes to be used with X_par_loc (i.e. also when using X_blc_p) + ! X_mat_range(1:2) were used with X_mat, instead ! X_range1=1 X_range2=Xw%n_freqs @@ -274,8 +266,10 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) if (iqibz/=isc%iqref) then ! iq_mem=PAR_Q_ibz_index(iqibz) - X_mat_range=(/1,Xw%n_freqs/) - if (.not.io_RESPONSE) X_mat_range=(/Xw%n_freqs*(iq_mem-1)+1,iq_mem*Xw%n_freqs/) + if (io_RESPONSE) iq_mem=1 + ! + !X_mat_range=(/1,Xw%n_freqs/) + !if (.not.io_RESPONSE) X_mat_range=(/Xw%n_freqs*(iq_mem-1)+1,iq_mem*Xw%n_freqs/) ! ! GAMP ! @@ -308,12 +302,12 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) if (l_ppa) then ! !$omp parallel do default(shared), private(ig1,ig2) - do ig2=1,X%ng - do ig1=1,X%ng - if (real(X_mat(ig1,ig2,X_mat_range(1))/X_mat(ig1,ig2,X_mat_range(2)))<=1._SP) then - X_mat(ig1,ig2,X_mat_range(2))=X%ppaE + do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) + do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) + if (real(X_par(iq_mem)%blc(ig1,ig2,X_range1)/X_par(iq_mem)%blc(ig1,ig2,X_range2))<=1._SP) then + X_par(iq_mem)%blc(ig1,ig2,X_range2)=X%ppaE else - X_mat(ig1,ig2,X_mat_range(2))=sqrt(X_mat(ig1,ig2,X_mat_range(1))/X_mat(ig1,ig2,X_mat_range(2))-1) + X_par(iq_mem)%blc(ig1,ig2,X_range2)=sqrt(X_par(iq_mem)%blc(ig1,ig2,X_range1)/X_par(iq_mem)%blc(ig1,ig2,X_range2)-1) endif enddo enddo @@ -321,9 +315,9 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) else ! !$omp parallel do default(shared), private(ig1,ig2) - do ig2=1,X%ng - do ig1=1,X%ng - X_mat(ig1,ig2,X_mat_range(1))=X_mat(ig1,ig2,X_mat_range(1))*isc%gamp(ig1,ig2) + do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) + do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) + X_par(iq_mem)%blc(ig1,ig2,X_range1)=X_par(iq_mem)%blc(ig1,ig2,X_range1)*isc%gamp(ig1,ig2) enddo enddo ! @@ -348,27 +342,30 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! if (iqs>nsym/(i_time_rev+1) .and. (i_space_inv==0.or.mag_syms) .and..not.X_is_TR_rotated) then ! - ! Note (AF) that $omp directives are inside mat_transpose - ! - call mat_transpose(X_mat(:,:,X_mat_range(1))) - if (l_ppa) call mat_transpose(X_mat(:,:,X_mat_range(2))) + call MATRIX_transpose("T",M_out=X_par(iq_mem)) X_is_TR_rotated=.true. + ! endif - ! - ! mapping of X_par_loc from X_mat + ! PAR_matrix definitions ! - if (io_RESPONSE) iq_mem=1 + X_rows1=X_par(iq_mem)%rows(1) + X_rows2=X_par(iq_mem)%rows(2) + X_cols1=X_par(iq_mem)%cols(1) + X_cols2=X_par(iq_mem)%cols(2) ! - do iw=1,Xw%n_freqs - if ( io_RESPONSE) iw_X_mat=iw - if (.not.io_RESPONSE) iw_X_mat=(iq_mem-1)*Xw%n_freqs+iw - ! - X_par_loc%blc(:,:,iw)=X_mat(X_rows1:X_rows2,X_cols1:X_cols2,iw_X_mat) - enddo + call MATRIX_duplicate("none",M_in=X_par(iq_mem),M_out=X_par_loc) + call dev_memcpy(X_par_loc%blc, X_par(iq_mem)%blc) ! if (have_cuda) call dev_memcpy(X_par_loc%blc_d, X_par_loc%blc) ! + X_blc_p=> DEV_VAR(X_par_loc%blc) + ! + if(l_ppa.and.l_GW_terminator) then + YAMBO_ALLOC(eet_factor,(X_rows1:X_rows2,X_cols1:X_cols2)) + endif + ! + ! main QP loop ! QP_loop: do i_qp=i_qp_to_start,QP_n_states ! @@ -452,7 +449,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! if (X_is_TR_rotated) then ! - !$omp parallel do default(shared), private(ig1,ig2), reduction(+:dp_dummy), collapse(2) + !$omp parallel do default(shared), private(ig1,ig2), & + !$omp & reduction(+:dp_dummy), collapse(2) do ig2=X_cols1,X_cols2 do ig1=X_rows1,X_rows2 dp_dummy=dp_dummy+cmplx(2._SP*pi*isc%rhotw(G_m_G(ig2,ig1))* & @@ -462,7 +460,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! else ! - !$omp parallel do default(shared), private(ig1,ig2), reduction(+:dp_dummy), collapse(2) + !$omp parallel do default(shared), private(ig1,ig2), & + !$omp & reduction(+:dp_dummy), collapse(2) do ig2=X_cols1,X_cols2 do ig1=X_rows1,X_rows2 dp_dummy=dp_dummy+cmplx(2._SP*pi*isc%rhotw(G_m_G(ig1,ig2))*& @@ -606,7 +605,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! ! performed on the host ! - call M_by_V('N', X%ng, X_mat(:,:,X_mat_range(1)), conjg(iscp%rhotw), local_rhotw) + call M_by_V('N', X%ng, X_par(iq_mem)%blc(:,:,X_range1), conjg(iscp%rhotw), local_rhotw) ! pre_factor=0.0_SP ! @@ -687,6 +686,9 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! enddo QP_loop ! + YAMBO_FREE(eet_factor) + call MATRIX_duplicate("free",M_out=X_par_loc) + ! enddo Q_loop ! call live_timing() @@ -702,8 +704,9 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) l_X_alloc=l_sc_run.and.io_RESPONSE #endif if(l_X_alloc) call X_alloc('X') -! if(allocated(X_par)) deallocate(X_par) call X_PARALLEL_alloc(X_par_loc,0,0,"CLEAN") + call X_PARALLEL_alloc(X_par,0,0,"CLEAN") + if (allocated(X_par)) deallocate(X_par) ! call timing('GW(ppa)',OPR='stop') ! From 38207fbd4ecf30a0cc9a0fec6e40aea107ba11db Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Fri, 4 Dec 2020 18:11:25 +0100 Subject: [PATCH 045/110] COHSEX fixed. --- src/qp/QP_ppa_cohsex.F | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 630e8d2504..e2a7388f66 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -26,7 +26,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! ! Plasmon Pole & COHSEX Correlation Self-Energy ! - use pars, ONLY:DP,SP,pi,schlen,cZERO,cI + use pars, ONLY:DP,SP,pi,schlen,cZERO,cI,cONE use units, ONLY:HA2EV use stderr, ONLY:intc use frequency, ONLY:w_samp @@ -80,7 +80,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) & i_qp_to_start,iq_to_start,is,iq_mem,io_err,ID,IO_ACT,timing_steps integer :: iw integer :: X_range1,X_range2 - integer :: X_rows1,X_rows2,X_cols1,X_cols2 + 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 @@ -221,11 +221,9 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) endif ! if (l_sc_coh.or.l_sc_sex.or.l_cohsex.or.l_sc_srpa) then - !if (io_RESPONSE) call X_alloc('X',(/X%ng,X%ng,1/)) if (io_RESPONSE) call X_PARALLEL_alloc(X_par(1),X%ng,1,"X") YAMBO_ALLOC(dc,(2)) else - !if (io_RESPONSE) call X_alloc('X',(/X%ng,X%ng,2/)) if (io_RESPONSE) call X_PARALLEL_alloc(X_par(1),X%ng,2,"X") YAMBO_ALLOC(W_,(QP_dSc_steps)) YAMBO_ALLOC(dc,(QP_dSc_steps)) @@ -353,6 +351,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) X_rows2=X_par(iq_mem)%rows(2) X_cols1=X_par(iq_mem)%cols(1) X_cols2=X_par(iq_mem)%cols(2) + X_nrows=X_rows2-X_rows1+1 + X_ncols=X_cols2-X_cols1+1 ! call MATRIX_duplicate("none",M_in=X_par(iq_mem),M_out=X_par_loc) call dev_memcpy(X_par_loc%blc, X_par(iq_mem)%blc) @@ -401,7 +401,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) 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%qs=(/1,1,1/) - + ! call DEV_SUB(scatter_Bamp)(isc) if (have_cuda) call dev_memcpy(isc%rhotw,isc%rhotw_d) ! @@ -605,7 +605,11 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! ! performed on the host ! - call M_by_V('N', X%ng, X_par(iq_mem)%blc(:,:,X_range1), conjg(iscp%rhotw), local_rhotw) + local_rhotw=cZERO + !call M_by_V('N', X%ng, X_par(iq_mem)%blc(:,:,X_range1), conjg(iscp%rhotw), local_rhotw) + ! + call M_by_V('N',X_nrows,X_ncols, cONE,X_par(iq_mem)%blc(:,:,X_range1),X_nrows,& +& conjg(iscp%rhotw(X_cols1:X_cols2)),1,cZERO,local_rhotw(X_rows1:X_rows2),1) ! pre_factor=0.0_SP ! From e37c7da473d905b9de7c6a00ba50cebafd058bee Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Sat, 5 Dec 2020 12:20:58 +0100 Subject: [PATCH 046/110] GPU-part fixed ! All working now --- src/qp/QP_ppa_cohsex.F | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index e2a7388f66..5a4e635b74 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -357,7 +357,10 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) call MATRIX_duplicate("none",M_in=X_par(iq_mem),M_out=X_par_loc) call dev_memcpy(X_par_loc%blc, X_par(iq_mem)%blc) ! - if (have_cuda) call dev_memcpy(X_par_loc%blc_d, X_par_loc%blc) + if (have_cuda) then + YAMBO_ALLOC_SOURCE(X_par_loc%blc_d,X_par_loc%blc) + endif + !if (have_cuda) call dev_memcpy(X_par_loc%blc_d, X_par_loc%blc) ! X_blc_p=> DEV_VAR(X_par_loc%blc) ! From 1786d993baf54ba95cce08f95ea931e3114c070b Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Sat, 5 Dec 2020 17:20:06 +0100 Subject: [PATCH 047/110] more kernels ported to CUDA. --- src/qp/QP_ppa_cohsex.F | 72 +++++++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 32 deletions(-) diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 5a4e635b74..49c434875b 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -95,7 +95,6 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) complex(SP), allocatable :: W_(:),dc(:) complex(SP), allocatable DEV_ATTR :: eet_factor(:,:) type(elemental_collision), target :: isc,iscp - type(PAR_matrix), target :: X_par_loc ! complex(SP), pointer DEV_ATTR :: isc_rhotw_p(:) complex(SP), pointer DEV_ATTR :: iscp_rhotw_p(:) @@ -246,7 +245,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) io_err=io_X(X,Xw,ID) endif ! - ! indexes to be used with X_par_loc (i.e. also when using X_blc_p) + ! indexes to be used with X_par (i.e. also when using X_blc_p) ! X_mat_range(1:2) were used with X_mat, instead ! X_range1=1 @@ -354,15 +353,10 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) X_nrows=X_rows2-X_rows1+1 X_ncols=X_cols2-X_cols1+1 ! - call MATRIX_duplicate("none",M_in=X_par(iq_mem),M_out=X_par_loc) - call dev_memcpy(X_par_loc%blc, X_par(iq_mem)%blc) - ! if (have_cuda) then - YAMBO_ALLOC_SOURCE(X_par_loc%blc_d,X_par_loc%blc) + YAMBO_ALLOC_SOURCE(X_par(iq_mem)%blc_d,X_par(iq_mem)%blc) endif - !if (have_cuda) call dev_memcpy(X_par_loc%blc_d, X_par_loc%blc) - ! - X_blc_p=> DEV_VAR(X_par_loc%blc) + X_blc_p=> DEV_VAR(X_par(iq_mem)%blc) ! if(l_ppa.and.l_GW_terminator) then YAMBO_ALLOC(eet_factor,(X_rows1:X_rows2,X_cols1:X_cols2)) @@ -449,33 +443,54 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) else ! dp_dummy = 0.0_DP + dp_dummy_r = 0.0_DP + dp_dummy_i = 0.0_DP ! if (X_is_TR_rotated) then ! - !$omp parallel do default(shared), private(ig1,ig2), & - !$omp & reduction(+:dp_dummy), collapse(2) + !DEV_CUF kernel do(2) + !DEV_OMP parallel do default(shared), private(ig1,ig2,ctmp), & + !DEV_OMP & reduction(+:dp_dummy), collapse(2) + ! do ig2=X_cols1,X_cols2 do ig1=X_rows1,X_rows2 - dp_dummy=dp_dummy+cmplx(2._SP*pi*isc%rhotw(G_m_G(ig2,ig1))* & -& X_par_loc%blc(ig1,ig2,X_range1),kind=DP) + ctmp=cmplx(2._SP*pi*isc_rhotw_p(DEV_VAR(G_m_G)(ig2,ig1))* & +& X_blc_p(ig1,ig2,X_range1),kind=DP) +#ifdef _CUDA + dp_dummy_r=dp_dummy_r+real(ctmp,DP) + dp_dummy_i=dp_dummy_i+imag(ctmp) +#else + dp_dummy=dp_dummy+ctmp +#endif enddo enddo ! else ! - !$omp parallel do default(shared), private(ig1,ig2), & - !$omp & reduction(+:dp_dummy), collapse(2) + !DEV_CUF kernel do(2) + !DEV_OMP parallel do default(shared), private(ig1,ig2,ctmp), & + !DEV_OMP & reduction(+:dp_dummy), collapse(2) + ! do ig2=X_cols1,X_cols2 do ig1=X_rows1,X_rows2 - dp_dummy=dp_dummy+cmplx(2._SP*pi*isc%rhotw(G_m_G(ig1,ig2))*& -& X_par_loc%blc(ig1,ig2,X_range1),kind=DP) + ctmp=cmplx(2._SP*pi*isc_rhotw_p(DEV_VAR(G_m_G)(ig1,ig2))*& +& X_blc_p(ig1,ig2,X_range1),kind=DP) +#ifdef _CUDA + dp_dummy_r=dp_dummy_r+real(ctmp,DP) + dp_dummy_i=dp_dummy_i+imag(ctmp) +#else + dp_dummy=dp_dummy+ctmp +#endif enddo enddo ! endif ! + if (have_cuda) dp_dummy=cmplx(dp_dummy_r,dp_dummy_i,kind=DP) + ! dc(1) = cmplx(dp_dummy,kind=SP) ! + ! ! Bug spotted by D.V. (April 2014). HEAD_QP_cpu is defined differently when ! the _SC flag is used. The point is that in SE calculations HEAD_QP_cpu is used ! in cases where no band loops are done (like here). In _SC instead @@ -593,10 +608,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) enddo enddo ! -#ifdef _CUDA - dp_dummy%re = dp_dummy_r - dp_dummy%im = dp_dummy_i -#endif + if (have_cuda) dp_dummy=cmplx(dp_dummy_r,dp_dummy_i,kind=DP) ! dc(i_w) = cmplx(dp_dummy,kind=SP) ! @@ -609,8 +621,6 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! performed on the host ! local_rhotw=cZERO - !call M_by_V('N', X%ng, X_par(iq_mem)%blc(:,:,X_range1), conjg(iscp%rhotw), local_rhotw) - ! call M_by_V('N',X_nrows,X_ncols, cONE,X_par(iq_mem)%blc(:,:,X_range1),X_nrows,& & conjg(iscp%rhotw(X_cols1:X_cols2)),1,cZERO,local_rhotw(X_rows1:X_rows2),1) ! @@ -680,10 +690,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) enddo enddo ! -#ifdef _CUDA - dp_dummy%re = dp_dummy_r - dp_dummy%im = dp_dummy_i -#endif + if (have_cuda) dp_dummy=cmplx(dp_dummy_r,dp_dummy_i,kind=DP) ! QP_Sc(i_qp,i_w)=QP_Sc(i_qp,i_w)+cmplx(dp_dummy,kind=SP) ! @@ -694,7 +701,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) enddo QP_loop ! YAMBO_FREE(eet_factor) - call MATRIX_duplicate("free",M_out=X_par_loc) + YAMBO_FREE(X_par(iq_mem)%blc_d) ! enddo Q_loop ! @@ -710,10 +717,11 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) #if defined _SC l_X_alloc=l_sc_run.and.io_RESPONSE #endif - if(l_X_alloc) call X_alloc('X') - call X_PARALLEL_alloc(X_par_loc,0,0,"CLEAN") - call X_PARALLEL_alloc(X_par,0,0,"CLEAN") - if (allocated(X_par)) deallocate(X_par) + if(l_X_alloc) then + call X_PARALLEL_alloc(X_par,0,0,"CLEAN") + if (allocated(X_par)) deallocate(X_par) + endif + call X_alloc('X') ! call timing('GW(ppa)',OPR='stop') ! From 4829ddf88c8d8807931000d5b1977dbf2957c41d Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Sat, 5 Dec 2020 22:16:46 +0100 Subject: [PATCH 048/110] all computations performed on GPU --- src/qp/QP_ppa_cohsex.F | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 49c434875b..066b898254 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -48,7 +48,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) use wave_func, ONLY:WF use R_lattice, ONLY:qindx_S,bz_samp,G_m_G,G_m_G_d,nqibz use D_lattice, ONLY:nsym,i_time_rev,i_space_inv,mag_syms - use wrapper, ONLY:M_by_V + use wrapper, ONLY:M_by_V,V_dot_V use interfaces, ONLY:PARALLEL_global_indexes,PARALLEL_WF_index,WF_load,WF_free,& & PARALLEL_WF_distribute,QP_state_print,MATRIX_transpose,MATRIX_duplicate use matrix, ONLY:PAR_matrix @@ -57,7 +57,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) use parallel_m, ONLY:PAR_COM_QP_A2A use SC, ONLY:it_now,it_to_start #endif - use deviceXlib_m, ONLY:dev_memcpy,dev_memset + use deviceXlib_m, ONLY:dev_memcpy,dev_memset,dev_conjg use cuda_m, ONLY:have_cuda ! use drivers, ONLY:Finite_Tel @@ -87,13 +87,14 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) 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 - complex(SP) :: PPA_R,local_rhotw(X%ng),pre_factor + complex(SP) :: PPA_R,pre_factor complex(SP) :: W_i,lW,QP_ppa_EET real(DP) :: dp_dummy_r,dp_dummy_i complex(DP) :: dp_dummy,ctmp ! complex(SP), allocatable :: W_(:),dc(:) complex(SP), allocatable DEV_ATTR :: eet_factor(:,:) + complex(SP), allocatable DEV_ATTR :: local_rhotw(:), conjg_iscp_rhotw(:) type(elemental_collision), target :: isc,iscp ! complex(SP), pointer DEV_ATTR :: isc_rhotw_p(:) @@ -227,9 +228,12 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) YAMBO_ALLOC(W_,(QP_dSc_steps)) YAMBO_ALLOC(dc,(QP_dSc_steps)) endif + YAMBO_ALLOC(local_rhotw,(X%ng)) + YAMBO_ALLOC(conjg_iscp_rhotw,(X%ng)) ! 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)) ) @@ -534,6 +538,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) iscp%rhotw=isc%rhotw if (have_cuda) call dev_memcpy(iscp%rhotw_d, iscp%rhotw) endif + call dev_memcpy(conjg_iscp_rhotw,iscp%rhotw_d) + call dev_conjg(conjg_iscp_rhotw) ! dc=cZERO ! @@ -546,7 +552,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! do ig2=X_cols1,X_cols2 do ig1=X_rows1,X_rows2 - eet_factor(ig1,ig2)=eet_factor(ig1,ig2)-isc_rhotw_p(ig1)*conjg(iscp_rhotw_p(ig2)) + eet_factor(ig1,ig2)=eet_factor(ig1,ig2)-isc_rhotw_p(ig1)*conjg_iscp_rhotw(ig2) enddo enddo ! @@ -590,11 +596,11 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) endif endif ! - ctmp = -4._SP/spin_occ*pi*isc_rhotw_p(ig1)*conjg(iscp_rhotw_p(ig2))*(-PPA_R)*& + ctmp = -4._SP/spin_occ*pi*isc_rhotw_p(ig1)*conjg_iscp_rhotw(ig2)*(-PPA_R)*& & ( (spin_occ-f_kmq+bose_PPA_E)/(W_i-E_kmq-PPA_E)+& & (f_kmq+bose_PPA_E)/(conjg(W_i)-E_kmq+PPA_E)) ! -! ctmp = -4._SP/spin_occ*pi*isc%rhotw(ig1)*conjg(iscp%rhotw(ig2))*(-PPA_R)*& +! ctmp = -4._SP/spin_occ*pi*isc%rhotw(ig1)*conjg_iscp%rhotw(ig2)*(-PPA_R)*& !& ( (spin_occ-f_kmq+bose_f(PPA_E))/(W_(i_w)-E_kmq-PPA_E)+& !& (f_kmq+bose_f(PPA_E))/(conjg(W_(i_w))-E_kmq+PPA_E)) ! @@ -618,18 +624,19 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! else if (l_sc_sex.or.l_cohsex.or.(l_sc_coh.and.COHSEX_use_empties)) then ! - ! performed on the host - ! - local_rhotw=cZERO - call M_by_V('N',X_nrows,X_ncols, cONE,X_par(iq_mem)%blc(:,:,X_range1),X_nrows,& -& conjg(iscp%rhotw(X_cols1:X_cols2)),1,cZERO,local_rhotw(X_rows1:X_rows2),1) +! call M_by_V('N',X_nrows,X_ncols, cONE,X_par(iq_mem)%blc(:,:,X_range1),X_nrows,& +!& conjg(iscp%rhotw(X_cols1:X_cols2)),1,cZERO,local_rhotw(X_rows1:X_rows2),1) + call M_by_V('N',X_nrows,X_ncols, cONE, X_blc_p(:,:,X_range1),X_nrows,& +& conjg_iscp_rhotw(X_cols1:X_cols2),1,cZERO,local_rhotw(X_rows1:X_rows2),1) ! - pre_factor=0.0_SP + !pre_factor=0.0_SP ! - !$omp parallel do default(shared), private(ig1), reduction(+:pre_factor) - do ig1=X_rows1,X_rows2 - pre_factor=pre_factor+isc%rhotw(ig1)*local_rhotw(ig1) - enddo + !!DEV_CUF kernel do + !!DEV_OMP parallel do default(shared), private(ig1), reduction(+:pre_factor) + !do ig1=X_rows1,X_rows2 + ! pre_factor=pre_factor+isc%rhotw(ig1)*local_rhotw(ig1) + !enddo + pre_factor=V_dot_V(X_nrows,isc_rhotw_p(X_rows1:X_rows2),local_rhotw(X_rows1:X_rows2)) ! ! SEX @@ -711,7 +718,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! YAMBO_FREE(dc) YAMBO_FREE(W_) - YAMBO_FREE(eet_factor) + YAMBO_FREE(local_rhotw) + YAMBO_FREE(conjg_iscp_rhotw) ! l_X_alloc=.true. #if defined _SC From 06cff78539535eade6c1f3a336127eac7e132d4f Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Sat, 5 Dec 2020 22:51:14 +0100 Subject: [PATCH 049/110] dev->host transfers avoided; general cleanup --- src/qp/QP_ppa_cohsex.F | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 066b898254..0def21c43c 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -1,4 +1,3 @@ - ! ! Copyright (C) 2000-2020 the YAMBO team ! http://www.yambo-code.org @@ -269,9 +268,6 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) iq_mem=PAR_Q_ibz_index(iqibz) if (io_RESPONSE) iq_mem=1 ! - !X_mat_range=(/1,Xw%n_freqs/) - !if (.not.io_RESPONSE) X_mat_range=(/Xw%n_freqs*(iq_mem-1)+1,iq_mem*Xw%n_freqs/) - ! ! GAMP ! call DEV_SUB(scatter_Gamp)(isc,'c') @@ -404,7 +400,6 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) isc%qs=(/1,1,1/) ! call DEV_SUB(scatter_Bamp)(isc) - if (have_cuda) call dev_memcpy(isc%rhotw,isc%rhotw_d) ! if (l_GW_terminator) then ! @@ -423,7 +418,6 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! !DEV_CUF kernel do(2) !DEV_OMP parallel do default(shared), private(ig1,ig2), collapse(2) - ! do ig2=X_cols1,X_cols2 do ig1=X_rows1,X_rows2 eet_factor(ig1,ig2)=isc_rhotw_p(DEV_VAR(G_m_G)(ig2,ig1)) @@ -434,7 +428,6 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! !DEV_CUF kernel do(2) !DEV_OMP parallel do default(shared), private(ig1,ig2), collapse(2) - ! do ig2=X_cols1,X_cols2 do ig1=X_rows1,X_rows2 eet_factor(ig1,ig2)=isc_rhotw_p(DEV_VAR(G_m_G)(ig1,ig2)) @@ -528,17 +521,16 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) isc%os(1)=ib ! call DEV_SUB(scatter_Bamp)(isc) - if (have_cuda) call dev_memcpy(isc%rhotw, isc%rhotw_d) iscp%os=isc%os ! if (any(isc%is/=iscp%is)) then call DEV_SUB(scatter_Bamp)(iscp) - if (have_cuda) call dev_memcpy(iscp%rhotw, iscp%rhotw_d) else - iscp%rhotw=isc%rhotw - if (have_cuda) call dev_memcpy(iscp%rhotw_d, iscp%rhotw) + !iscp%rhotw=isc%rhotw + call dev_memcpy(iscp_rhotw_p, isc_rhotw_p) endif - call dev_memcpy(conjg_iscp_rhotw,iscp%rhotw_d) + !conjg_iscp_rhotw=conjg(iscp%rhotw) + call dev_memcpy(conjg_iscp_rhotw,iscp_rhotw_p) call dev_conjg(conjg_iscp_rhotw) ! dc=cZERO @@ -624,18 +616,9 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! else if (l_sc_sex.or.l_cohsex.or.(l_sc_coh.and.COHSEX_use_empties)) then ! -! call M_by_V('N',X_nrows,X_ncols, cONE,X_par(iq_mem)%blc(:,:,X_range1),X_nrows,& -!& conjg(iscp%rhotw(X_cols1:X_cols2)),1,cZERO,local_rhotw(X_rows1:X_rows2),1) call M_by_V('N',X_nrows,X_ncols, cONE, X_blc_p(:,:,X_range1),X_nrows,& & conjg_iscp_rhotw(X_cols1:X_cols2),1,cZERO,local_rhotw(X_rows1:X_rows2),1) ! - !pre_factor=0.0_SP - ! - !!DEV_CUF kernel do - !!DEV_OMP parallel do default(shared), private(ig1), reduction(+:pre_factor) - !do ig1=X_rows1,X_rows2 - ! pre_factor=pre_factor+isc%rhotw(ig1)*local_rhotw(ig1) - !enddo pre_factor=V_dot_V(X_nrows,isc_rhotw_p(X_rows1:X_rows2),local_rhotw(X_rows1:X_rows2)) ! From 1343895ae0ca026b74fb1d74d7b61b67e40f7631 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Sun, 6 Dec 2020 10:45:12 +0100 Subject: [PATCH 050/110] memory cleanup fixed --- src/qp/QP_ppa_cohsex.F | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index e76751acb1..971fd5c78d 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -51,7 +51,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) use wrapper, ONLY:M_by_V,V_dot_V use interfaces, ONLY:PARALLEL_global_indexes,PARALLEL_WF_index,WF_load,WF_free,& & PARALLEL_WF_distribute,QP_state_print,MATRIX_transpose,MATRIX_duplicate - use matrix, ONLY:PAR_matrix + use matrix, ONLY:PAR_matrix,MATRIX_reset use timing_m, ONLY:timing #if defined _SC use parallel_m, ONLY:PAR_COM_QP_A2A @@ -710,7 +710,9 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) l_X_alloc=l_sc_run.and.io_RESPONSE #endif if(l_X_alloc) then - call X_PARALLEL_alloc(X_par,0,0,"CLEAN") + do iq_mem = 1,size(X_par) + call MATRIX_reset(X_par(iq_mem)) + enddo if (allocated(X_par)) deallocate(X_par) endif call X_alloc('X') From b850fd1fd348282a7ea7cb63ca278aba71c7b440 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Sun, 6 Dec 2020 21:34:07 +0100 Subject: [PATCH 051/110] CUDA cleanup --- include/headers/common/dev_defs_nocuda.h | 5 ++-- src/pol_function/X_irredux.F | 22 +++++---------- src/wf_and_fft/WF_apply_symm.F | 14 +++------ src/wf_and_fft/WF_symm_kpoint.F | 8 ++---- src/wf_and_fft/scatter_Bamp.F | 36 ++++++++---------------- src/wf_and_fft/scatter_Gamp.F | 7 ++--- 6 files changed, 30 insertions(+), 62 deletions(-) diff --git a/include/headers/common/dev_defs_nocuda.h b/include/headers/common/dev_defs_nocuda.h index b26ebf4093..ad6c2fca3e 100644 --- a/include/headers/common/dev_defs_nocuda.h +++ b/include/headers/common/dev_defs_nocuda.h @@ -42,6 +42,7 @@ #define DEV_ATTR DEV_ATTRIBUTE #define DEV_PIN DEV_PINNED -!#define YAMBO_CUDA_OR_OMP(priv_list,nloop) !$omp parallel do default(shared), private(priv_list), collapse(nloop) -!#define YAMBO_CUDA_OR_OMP_END !$omp end parallel do +#define DEV_ACC !!!! +#define DEV_CUF !!!! +#define DEV_OMP $omp diff --git a/src/pol_function/X_irredux.F b/src/pol_function/X_irredux.F index 0f245979cb..baa3bebdf0 100644 --- a/src/pol_function/X_irredux.F +++ b/src/pol_function/X_irredux.F @@ -227,12 +227,10 @@ subroutine X_irredux(iq,X_par,Xen,Xk,Xw,X,Dip) ! OpenMP setup !============== ! -#if !defined _CUDA - !$omp parallel num_threads(n_out_threads) default(shared), & - !$omp & private(i_cg,Drude_pole,GreenF,i_bg,Xo_res,Xo_scatt,ig_col,& - !$omp & ig1,ig_row_transp,iw,mutexid,& - !$omp & X_rows1_l,X_rows2_l,X_nrows_l,X_cols_transp) -#endif + !DEV_OMP parallel num_threads(n_out_threads) default(shared), & + !DEV_OMP & private(i_cg,Drude_pole,GreenF,i_bg,Xo_res,Xo_scatt,ig_col,& + !DEV_OMP & ig1,ig_row_transp,iw,mutexid,& + !DEV_OMP & X_rows1_l,X_rows2_l,X_nrows_l,X_cols_transp) ! call OPENMP_update(master_thread) ! @@ -277,9 +275,7 @@ subroutine X_irredux(iq,X_par,Xen,Xk,Xw,X,Dip) ! MAIN LOOP !=========== ! -#if !defined _CUDA - !$omp do -#endif +!DEV_OMP do do i_cg = 1,coarse_grid_N ! i_bg=sum(bare_grid_N(1:i_cg-1))+1 @@ -444,9 +440,7 @@ subroutine X_irredux(iq,X_par,Xen,Xk,Xw,X,Dip) ! enddo ! -#if !defined _CUDA - !$omp end do -#endif +!DEV_OMP end do ! ! CLEAN !======= @@ -455,9 +449,7 @@ subroutine X_irredux(iq,X_par,Xen,Xk,Xw,X,Dip) YAMBO_FREE(rhotw_save_d) call elemental_collision_free(Xo_scatt) ! -#if !defined _CUDA -!$omp end parallel -#endif +!DEV_OMP end parallel ! if (iq==1.and.io_DIP) then call DIP_alloc('DIP_iR') diff --git a/src/wf_and_fft/WF_apply_symm.F b/src/wf_and_fft/WF_apply_symm.F index 0223584581..8a1f68a318 100644 --- a/src/wf_and_fft/WF_apply_symm.F +++ b/src/wf_and_fft/WF_apply_symm.F @@ -62,11 +62,8 @@ subroutine DEV_SUB_ALT(WF_apply_symm)(isc,WF_symm) ! if(n_spinor==1) then ! -#ifdef _CUDA_LOC - !$cuf kernel do(1) <<<*,*>>> -#else - !$omp parallel do default(shared), private(ifft) -#endif + !DEV_CUF kernel do(1) <<<*,*>>> + !DEV_OMP parallel do default(shared), private(ifft) do ifft = 1, fft_size WF_symm(ifft,1)=WF_p(DEV_VAR(fft_rot_r)(ifft,isymm),1,i_wf) enddo @@ -75,11 +72,8 @@ subroutine DEV_SUB_ALT(WF_apply_symm)(isc,WF_symm) ! if (n_spinor==2) then ! -#ifdef _CUDA_LOC - !$cuf kernel do(1) <<<*,*>>> -#else - !$omp parallel do default(shared), private(ifft) -#endif + !DEV_CUF kernel do(1) <<<*,*>>> + !DEV_OMP parallel do default(shared), private(ifft) 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) diff --git a/src/wf_and_fft/WF_symm_kpoint.F b/src/wf_and_fft/WF_symm_kpoint.F index a0e28ea5af..d8442fb983 100644 --- a/src/wf_and_fft/WF_symm_kpoint.F +++ b/src/wf_and_fft/WF_symm_kpoint.F @@ -70,9 +70,7 @@ 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) <<<*,*>>> -#endif + !DEV_CUF kernel do(2) <<<*,*>>> 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) @@ -81,9 +79,7 @@ subroutine DEV_SUB_ALT(WF_symm_kpoint)(b_to_load,ikbz,Xk,WF_k_out) ! else ! -#ifdef _CUDA_LOC - !$cuf kernel do(1) <<<*,*>>> -#endif + !DEV_CUF kernel do(1) <<<*,*>>> 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) diff --git a/src/wf_and_fft/scatter_Bamp.F b/src/wf_and_fft/scatter_Bamp.F index 6b821b213d..87f2f22ac2 100644 --- a/src/wf_and_fft/scatter_Bamp.F +++ b/src/wf_and_fft/scatter_Bamp.F @@ -102,29 +102,23 @@ subroutine DEV_SUB(scatter_Bamp)(isc) ! ! ordinary implementation ! -#ifdef _CUDA_LOC - !$cuf kernel do(1) <<<*,*>>> -#else - !$omp parallel default(shared), private(ir) - !$omp do -#endif + !DEV_OMP parallel default(shared), private(ir) + ! + !DEV_CUF kernel do(1) <<<*,*>>> + !DEV_OMP do do ir = 1, fft_size rho_tw_rs_p(ir) = cmplx(conjg(WF_symm_i_p(ir,1))*WF_symm_o_p(ir,1),kind=DP) enddo ! if (n_spinor==2) then -#ifdef _CUDA_LOC - !$cuf kernel do(1) <<<*,*>>> -#else - !$omp do -#endif + !DEV_CUF kernel do(1) <<<*,*>>> + !DEV_OMP do do ir = 1, fft_size rho_tw_rs_p(ir) = rho_tw_rs_p(ir)+cmplx(conjg(WF_symm_i_p(ir,2))*WF_symm_o_p(ir,2),kind=DP) enddo endif -#if !defined _CUDA_LOC - !$omp end parallel -#endif + ! + !DEV_OMP end parallel ! #endif @@ -184,22 +178,16 @@ subroutine DEV_SUB(scatter_Bamp)(isc) ! if (qs==idt_index) then ! -#ifdef _CUDA_LOC - !$cuf kernel do(1) <<<*,*>>> -#else - !$omp parallel do default(shared), private(ig) -#endif + !DEV_CUF kernel do(1) <<<*,*>>> + !DEV_OMP parallel do default(shared), private(ig) do ig = 1, isc_ngrho rhotw_p(ig)= cmplx(rho_tw_rs_p(DEV_VAR(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 + !DEV_CUF kernel do(1) <<<*,*>>> + !DEV_OMP parallel do default(shared), private(ig) do ig = 1, isc_ngrho rhotw_p(ig)= cmplx(rho_tw_rs_p(DEV_VAR(fft_g_table)(DEV_VAR(g_rot)(ig,qs),iGo)),kind=SP) enddo diff --git a/src/wf_and_fft/scatter_Gamp.F b/src/wf_and_fft/scatter_Gamp.F index c7c819a833..466f98873c 100644 --- a/src/wf_and_fft/scatter_Gamp.F +++ b/src/wf_and_fft/scatter_Gamp.F @@ -110,11 +110,8 @@ subroutine DEV_SUB(scatter_Gamp)(isc,mode) gamp_p => DEV_VAR(isc%gamp) ! -#ifdef _CUDA_LOC - !$cuf kernel do(2) -#else - !$omp parallel do default(shared), private(i1,i2,ig1,ig2,l_RIM), collapse(2) -#endif + !DEV_CUF kernel do(2) + !DEV_OMP parallel do default(shared), private(i1,i2,ig1,ig2,l_RIM), collapse(2) ! do i1=1,ng1 do i2=1,ng2 From d4240e98b3035cceffbe6ce7c49a24fda95d778b Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Mon, 7 Dec 2020 00:31:45 +0100 Subject: [PATCH 052/110] scatter_Gamp workd with distributed memory. Allocation and handling slightly modified. Some CUDA cleanup implemented. --- src/bse/K_screened_interaction.F | 4 +- src/collisions/COLLISIONS_HXC.F | 6 +-- src/collisions/COLLISIONS_NEQ_GW_static.F | 2 +- src/modules/mod_collision_el.F | 54 ++++++++++++++++++----- src/qp/QP_ppa_cohsex.F | 49 +++++++++++++------- src/qp/QP_real_axis.F | 2 +- src/qp/XCo_Hartree_Fock.F | 2 +- src/sc/OEP_ApplySigmaCSX.F | 2 +- src/sc/OEP_ApplySigmaX.F | 2 +- src/wf_and_fft/scatter_Gamp.F | 28 +++++++----- 10 files changed, 102 insertions(+), 49 deletions(-) diff --git a/src/bse/K_screened_interaction.F b/src/bse/K_screened_interaction.F index 5030a40d82..e0b3114553 100644 --- a/src/bse/K_screened_interaction.F +++ b/src/bse/K_screened_interaction.F @@ -144,9 +144,7 @@ subroutine K_screened_interaction(X,Xw,q,io_X_err) ! #ifdef _CUDA ! device <- host transfer - allocate(X_mat_d, source=X_mat) - ! - X_mat_d=X_mat + YAMBO_ALLOC_SOURCE(X_mat_d,X_mat) ! ! CUDA Fortran workarounds gamp_d => isc%gamp_d diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index b0ce5c252c..3c6f7125ef 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -156,7 +156,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) 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(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)) @@ -171,7 +171,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) 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,GAMP_NG=(/N_g_vecs_X, 1 /),TITLE=trim(H_potential)) ! if (l_compute_screening) then ! @@ -184,7 +184,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) call X_alloc('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)) + call elemental_collision_alloc(isc_XC, NG=NG_XC,GAMP_NG=(/N_g_vecs_C,N_g_vecs_C/),TITLE=trim(H_potential)) ! else ! diff --git a/src/collisions/COLLISIONS_NEQ_GW_static.F b/src/collisions/COLLISIONS_NEQ_GW_static.F index aec91ada25..c4e1d87d6c 100644 --- a/src/collisions/COLLISIONS_NEQ_GW_static.F +++ b/src/collisions/COLLISIONS_NEQ_GW_static.F @@ -107,7 +107,7 @@ subroutine COLLISIONS_NEQ_GW_static(X,Xk,E,k,q,Xw) call X_alloc('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(isc, NG=isc%ngrho,GAMP_NG=(/X%ng,X%ng/),TITLE="NEQ_GW") call elemental_collision_alloc(iscp,NG=isc%ngrho,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 ec5dfa991b..a29e16e065 100644 --- a/src/modules/mod_collision_el.F +++ b/src/modules/mod_collision_el.F @@ -53,6 +53,10 @@ module collision_el ! complex(SP), allocatable :: gamp(:,:) complex(SP), allocatable :: rhotw(:) + integer :: gamp_nrows + integer :: gamp_ncols + integer :: gamp_rows(2) + integer :: gamp_cols(2) ! ! scatter bamp workspace ! @@ -114,54 +118,82 @@ subroutine elemental_collision_free(ggw) ! end subroutine ! - subroutine elemental_collision_alloc(ggw,NG,NG_GAMP,GRADIENT,TITLE) + subroutine elemental_collision_alloc(ggw,NG,GAMP_NG,GAMP_ROWS,GAMP_COLS,& +& CPU_ONLY,GRADIENT,TITLE) use electrons, ONLY:n_spinor use FFT_m, ONLY:fft_size type(elemental_collision), target ::ggw integer, OPTIONAL :: NG - integer, OPTIONAL :: NG_GAMP(2) + integer, OPTIONAL :: GAMP_NG(2) + integer, OPTIONAL :: GAMP_ROWS(2) + integer, OPTIONAL :: GAMP_COLS(2) + logical, OPTIONAL :: CPU_ONLY logical, OPTIONAL :: GRADIENT character(*), OPTIONAL :: TITLE ! integer :: RHOSIZE + logical :: CPU_ONLY_ ! if (present(TITLE)) then ggw%name=TITLE endif ! - if (fft_size>0) then + CPU_ONLY_=.false. + if (present(CPU_ONLY)) CPU_ONLY_=CPU_ONLY + ! + ! workspace + ! + if (fft_size>0.and..not.allocated(ggw%rho_tw_rs)) then YAMBO_ALLOC(ggw%rho_tw_rs,(fft_size)) YAMBO_ALLOC(ggw%WF_symm_i,(fft_size,n_spinor)) YAMBO_ALLOC(ggw%WF_symm_o,(fft_size,n_spinor)) ! - if (have_cuda) then + if (have_cuda.and..not.CPU_ONLY_) then YAMBO_ALLOC(ggw%rho_tw_rs_d,(fft_size)) YAMBO_ALLOC(ggw%WF_symm_i_d,(fft_size,n_spinor)) YAMBO_ALLOC(ggw%WF_symm_o_d,(fft_size,n_spinor)) endif endif ! + ! rhotw + ! if (present(NG)) then if (NG>0) then ! if ( present(GRADIENT)) RHOSIZE=3*NG if (.not.present(GRADIENT)) RHOSIZE=1*NG YAMBO_ALLOC(ggw%rhotw,(RHOSIZE)) - if (have_cuda) then + ! + if (have_cuda.and..not.CPU_ONLY_) then YAMBO_ALLOC(ggw%rhotw_d,(RHOSIZE)) endif ! endif ggw%ngrho=NG endif - if (present(NG_GAMP)) then - if (all((/NG_GAMP>0/))) then - YAMBO_ALLOC(ggw%gamp,(NG_GAMP(1),NG_GAMP(2))) - if (have_cuda) then - YAMBO_ALLOC(ggw%gamp_d,(NG_GAMP(1),NG_GAMP(2))) - endif + ! + ! GAMP + ! + if (present(GAMP_NG)) then + if (all((/GAMP_NG>0/))) then + YAMBO_ALLOC(ggw%gamp,(GAMP_NG(1),GAMP_NG(2))) endif endif + if (present(GAMP_ROWS).and.present(GAMP_COLS)) then + if (present(GAMP_NG)) call error("[COLL] GAMP_NG should not be present") + YAMBO_ALLOC(ggw%gamp,(GAMP_ROWS(1):GAMP_ROWS(2),GAMP_COLS(1):GAMP_COLS(2))) + endif + if (have_cuda.and.allocated(ggw%gamp).and..not.CPU_ONLY_) then + YAMBO_ALLOC_MOLD(ggw%gamp_d,ggw%gamp) + endif + if (allocated(ggw%gamp)) then + ggw%gamp_rows(1)=lbound(ggw%gamp,1) + ggw%gamp_rows(2)=ubound(ggw%gamp,1) + ggw%gamp_cols(1)=lbound(ggw%gamp,2) + ggw%gamp_cols(2)=ubound(ggw%gamp,2) + ggw%gamp_nrows=ggw%gamp_rows(2)-ggw%gamp_rows(1)+1 + ggw%gamp_ncols=ggw%gamp_cols(2)-ggw%gamp_cols(1)+1 + endif ! end subroutine ! diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 971fd5c78d..d4b7af7d5b 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -188,16 +188,6 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! call WF_load(WF,isc%ngrho,maxval(qindx_S(:,:,2)),(/1,n_WF_bands_to_load/),(/1,k%nibz/),title=trim(ch)) ! - ! 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") - ! - isc_gamp_p => DEV_VAR(isc%gamp) - isc_rhotw_p => DEV_VAR(isc%rhotw) - iscp_rhotw_p => DEV_VAR(iscp%rhotw) - ! call timing('GW(ppa)',OPR='start') ! ! Plasmon-Pole/Static interaction DB I/O @@ -231,6 +221,15 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) YAMBO_ALLOC(local_rhotw,(X%ng)) YAMBO_ALLOC(conjg_iscp_rhotw,(X%ng)) ! + ! 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") + ! + isc_rhotw_p => DEV_VAR(isc%rhotw) + iscp_rhotw_p => DEV_VAR(iscp%rhotw) + ! call PP_redux_wait ! ! @@ -269,11 +268,6 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) iq_mem=PAR_Q_ibz_index(iqibz) if (io_RESPONSE) iq_mem=1 ! - ! GAMP - ! - call DEV_SUB(scatter_Gamp)(isc,'c') - if (have_cuda) call dev_memcpy(isc%gamp,isc%gamp_d) - ! ! I/O ! if (io_RESPONSE) then @@ -311,6 +305,14 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) enddo ! else + ! + ! GAMP + ! + ! update alloc + call elemental_collision_alloc(isc,GAMP_ROWS=X_par(1)%rows,GAMP_COLS=X_par(1)%cols) + ! + call DEV_SUB(scatter_Gamp)(isc,'c') + if (have_cuda) call dev_memcpy(isc%gamp,isc%gamp_d) ! !$omp parallel do default(shared), private(ig1,ig2) do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) @@ -319,6 +321,9 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) enddo enddo ! + YAMBO_FREE(isc%gamp) + YAMBO_FREE(isc%gamp_d) + ! endif ! #if defined _SC @@ -359,9 +364,19 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) endif X_blc_p=> DEV_VAR(X_par(iq_mem)%blc) ! + ! GAMP + ! + if(l_ppa) then + ! update alloc + call elemental_collision_alloc(isc,GAMP_ROWS=X_par(1)%rows,GAMP_COLS=X_par(1)%cols) + call DEV_SUB(scatter_Gamp)(isc,'c') + isc_gamp_p => DEV_VAR(isc%gamp) + endif + ! if(l_ppa.and.l_GW_terminator) then YAMBO_ALLOC(eet_factor,(X_rows1:X_rows2,X_cols1:X_cols2)) endif + ! ! main QP loop ! @@ -639,7 +654,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! enddo ! loop on scattering states ! - if(l_GW_terminator) then + if(l_ppa.and.l_GW_terminator) then ! 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 ! @@ -692,6 +707,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) enddo QP_loop ! YAMBO_FREE(eet_factor) + YAMBO_FREE(isc%gamp) + YAMBO_FREE(isc%gamp_d) YAMBO_FREE(X_par(iq_mem)%blc_d) ! enddo Q_loop diff --git a/src/qp/QP_real_axis.F b/src/qp/QP_real_axis.F index 11bc534f2e..b6b2f9ee04 100644 --- a/src/qp/QP_real_axis.F +++ b/src/qp/QP_real_axis.F @@ -279,7 +279,7 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) ! call X_alloc('X',(/X%ng,X%ng,QP_n_W_freqs_redux/)) ! - call elemental_collision_alloc(scattering_main,NG=X%ng,NG_GAMP=(/X%ng,X%ng/),TITLE="GW") + 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") ! QP_Sc=cZERO diff --git a/src/qp/XCo_Hartree_Fock.F b/src/qp/XCo_Hartree_Fock.F index a40bd8fe9f..508ea50f3f 100644 --- a/src/qp/XCo_Hartree_Fock.F +++ b/src/qp/XCo_Hartree_Fock.F @@ -173,7 +173,7 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) ! call elemental_collision_free(isc) call elemental_collision_free(iscp) - call elemental_collision_alloc(isc,NG=QP_ng_Sx,NG_GAMP=(/QP_ng_Sx,1/),TITLE="HF") + call elemental_collision_alloc(isc,NG=QP_ng_Sx,GAMP_NG=(/QP_ng_Sx,1/),TITLE="HF") call elemental_collision_alloc(iscp,NG=QP_ng_Sx,TITLE="HF") ! YAMBO_ALLOC(local_rhotw,(QP_ng_Sx)) diff --git a/src/sc/OEP_ApplySigmaCSX.F b/src/sc/OEP_ApplySigmaCSX.F index 07d0644169..fee186443e 100644 --- a/src/sc/OEP_ApplySigmaCSX.F +++ b/src/sc/OEP_ApplySigmaCSX.F @@ -93,7 +93,7 @@ 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)) ! - call elemental_collision_alloc(isc,TITLE="OEP_SigmaCSX",NG=X%ng,NG_GAMP=(/X%ng,X%ng/)) + 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)) YAMBO_ALLOC(u_rs,(fft_size)) diff --git a/src/sc/OEP_ApplySigmaX.F b/src/sc/OEP_ApplySigmaX.F index 142531ad33..fe6b75f7f8 100644 --- a/src/sc/OEP_ApplySigmaX.F +++ b/src/sc/OEP_ApplySigmaX.F @@ -71,7 +71,7 @@ subroutine OEP_ApplySigmaX(E,k,q,U_x) call elemental_collision_free(isc) call PP_indexes_reset(px) ! - call elemental_collision_alloc(isc,NG=QP_ng_Sx,NG_GAMP=(/QP_ng_Sx,1/),TITLE="OEP_SigmaX") + call elemental_collision_alloc(isc,NG=QP_ng_Sx,GAMP_NG=(/QP_ng_Sx,1/),TITLE="OEP_SigmaX") YAMBO_ALLOC(local_u,(fft_size)) YAMBO_ALLOC(u,(fft_size)) YAMBO_ALLOC(u_rs,(fft_size)) diff --git a/src/wf_and_fft/scatter_Gamp.F b/src/wf_and_fft/scatter_Gamp.F index 466f98873c..eebd27e5de 100644 --- a/src/wf_and_fft/scatter_Gamp.F +++ b/src/wf_and_fft/scatter_Gamp.F @@ -48,12 +48,12 @@ subroutine DEV_SUB(scatter_Gamp)(isc,mode) ! !Working Space ! - integer :: ng(2),ig1,ig2,iq,i1,i2 + integer :: ig1,ig2,iq,i1,i2 logical :: l_RIM real(SP):: reg_q_m2,q_weight,R_sphere complex(SP), pointer DEV_ATTR :: gamp_p(:,:) - integer :: ng1, ng2 + integer :: ng_rows1,ng_rows2,ng_cols1,ng_cols2 #ifdef _CUDA_LOC character(32) :: subname="scatter_Gamp_gpu" #else @@ -104,21 +104,27 @@ subroutine DEV_SUB(scatter_Gamp)(isc,mode) endif #endif ! - ng=shape(isc%gamp) - ng1=ng(1) - ng2=ng(2) - + ! desipite this information is (or should be) already present + ! in isc%gamp_rows and isc%gamp_cols, here we recompute it + ! in order to protect for gamp allocations done directly + ! via YAMBO_ALLOC instead of using the proper isc allocator + ! + ng_rows1=lbound(DEV_VAR(isc%gamp),1) + ng_rows2=ubound(DEV_VAR(isc%gamp),1) + ng_cols1=lbound(DEV_VAR(isc%gamp),2) + ng_cols2=ubound(DEV_VAR(isc%gamp),2) + ! gamp_p => DEV_VAR(isc%gamp) ! !DEV_CUF kernel do(2) !DEV_OMP parallel do default(shared), private(i1,i2,ig1,ig2,l_RIM), collapse(2) ! - do i1=1,ng1 - do i2=1,ng2 + do i2=ng_cols1,ng_cols2 + do i1=ng_rows1,ng_rows2 ig1=i1 ig2=i2 - if (ng1==1) ig1=ig2 - if (ng2==1) ig2=ig1 + if (ng_rows1==1.and.ng_rows2==1) ig1=ig2 + if (ng_cols1==1.and.ng_cols2==1) ig2=ig1 ! ! RIM support (Both components) ! @@ -184,7 +190,7 @@ subroutine DEV_SUB(scatter_Gamp)(isc,mode) ! ! Anisotropy correction ! - if (.not.l_col_cut) then + if (.not.l_col_cut.and.ng_rows1==1.and.ng_cols1==1) then if (all((/iq==1,RIM_ng>0,mode=='c',RIM_anisotropy/=0._SP/))) gamp_p(1,1)=RIM_anisotropy/2._SP endif ! From d12b1347f6bd53cdbf72e5bf23c951782a393123 Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Mon, 7 Dec 2020 16:31:32 +0100 Subject: [PATCH 053/110] iku->rlu ok imap seems ok but segfault --- lib/yambo | 2 +- src/common/eval_G_minus_G.F | 47 ++++++++++++++++++++++++++++++++--- src/modules/mod_vec_operate.F | 35 ++++++++++++++++++++------ src/modules/pgipar164Jk4g | 0 src/modules/pgipar2A2EZGu | 0 5 files changed, 73 insertions(+), 11 deletions(-) create mode 100644 src/modules/pgipar164Jk4g create mode 100644 src/modules/pgipar2A2EZGu diff --git a/lib/yambo b/lib/yambo index ea9c2d99ac..bd2d11907a 160000 --- a/lib/yambo +++ b/lib/yambo @@ -1 +1 @@ -Subproject commit ea9c2d99ac407d0a5e0592e5c72b080c19a2335b +Subproject commit bd2d11907a8e8eedbea3f255ea2446bc13df6fdc diff --git a/src/common/eval_G_minus_G.F b/src/common/eval_G_minus_G.F index d52d1b7e60..3d19bcd262 100644 --- a/src/common/eval_G_minus_G.F +++ b/src/common/eval_G_minus_G.F @@ -31,7 +31,7 @@ integer function eval_G_minus_G(iG,iGo,COMM) ! in such a way that G_m_G(iG,j) exists for all j ! use pars, ONLY:SP - use vec_operate, ONLY:iku_v_norm + use vec_operate, ONLY:iku_v_norm, c2a use parallel_m, ONLY:MPI_comm,PP_redux_wait,PP_indexes,PP_indexes_reset,myid use R_lattice, ONLY:G_m_G,G_m_G_d,g_vec,ng_in_shell,n_g_shells,E_of_shell use interfaces, ONLY:PARALLEL_index,PARALLEL_live_message @@ -47,7 +47,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) - real(SP), allocatable :: E_G_m_G(:,:) + real(SP), allocatable :: E_G_m_G(:,:),imap(:,:,:) type(PP_indexes) :: PAR_IND_G ! integer, external :: G_index @@ -162,7 +162,7 @@ integer function eval_G_minus_G(iG,iGo,COMM) ! ! * convert to g_vec to integer coords ! relative/crystal coords -! * alloc alternative g_vec_crys array +! * alloc alternative g_vec array ! * use internal conversion routines, if fast enough ! ! g_vec looks to be iku, we want to have rlu @@ -189,6 +189,39 @@ integer function eval_G_minus_G(iG,iGo,COMM) ! surely does not help ! ! + print *,g_vec(1,:) + print *,g_vec(2,:) + print *,g_vec(3,:) + print *,g_vec(4,:) + print *,g_vec(30,:) + call c2a(nvec=iG_,v_in=g_vec(1:iG_,1:3),mode="ki2a") + print *,'done' + print *,g_vec(1,:) + print *,g_vec(2,:) + print *,g_vec(3,:) + print *,g_vec(4,:) + print *,g_vec(30,:) + ! + allocate (imap(iG_,iG_,iG_)) + imap(:,:,:)=0 + do i1 = 1, iG_ + imap(nint(g_vec(i1,1)),nint(g_vec(i1,2)),nint(g_vec(i1,3))) = i1 + enddo + print *,"imap(v1)" + print *,imap(nint(g_vec(1,1)),nint(g_vec(2,2)),nint(g_vec(1,3))) + print *,"imap(v2)" + print *,imap(nint(g_vec(2,1)),nint(g_vec(2,2)),nint(g_vec(1,3))) + print *,"imap(v3)" + print *,imap(nint(g_vec(3,1)),nint(g_vec(3,2)),nint(g_vec(3,3))) + print *,"imap(v1)" + print *, nint(g_vec(2,3)) + print *,imap(nint(g_vec(3,1)),nint(g_vec(3,2)),nint(g_vec(2,3))) + print *,"imap(v2)" + print *,imap(nint(g_vec(5,1)),nint(g_vec(5,2)),nint(g_vec(5,3))) + print *,"imap(v3)" + print *,imap(nint(g_vec(30,1)),nint(g_vec(30,2)),nint(g_vec(30,3))) + ! + call c2a(nvec=iG_,v_in=g_vec(1:iG_,1:3),mode="ka2i") !$omp parallel do default(shared), private(i2,i1,v1), schedule(dynamic) do i2=1,iGo_ ! @@ -205,6 +238,14 @@ integer function eval_G_minus_G(iG,iGo,COMM) enddo enddo !$omp end parallel do + ! + call c2a(nvec=iG_,v_in=g_vec(1:iG_,1:3),mode="ka2i") + print *,'done' + print *,g_vec(1,:) + print *,g_vec(2,:) + print *,g_vec(3,:) + print *,g_vec(4,:) + print *,g_vec(30,:) ! if (present(COMM)) call PP_redux_wait(G_m_G,COMM=COMM%COMM) ! diff --git a/src/modules/mod_vec_operate.F b/src/modules/mod_vec_operate.F index 580bf6a86e..1b1b9dd59a 100644 --- a/src/modules/mod_vec_operate.F +++ b/src/modules/mod_vec_operate.F @@ -36,7 +36,7 @@ module vec_operate end interface ! interface c2a - module procedure c2a_scal, c2a_vec + module procedure c2a_scal,c2a_vec end interface ! contains @@ -190,7 +190,7 @@ subroutine rot_v_xy_plane(t,v_in,v_out) ! end subroutine rot_v_xy_plane ! - subroutine c2a_scal(b_in,v_in,v_out,mode) + subroutine c2a_scal(b_in,v_in,v_out,mode) !_scal ! ! mode = 'k/r c2a' 'k/r a2c' (cc <-> rlu) ! mode = 'k/r i2a' 'k/r a2i' (iku <-> rlu) @@ -243,7 +243,7 @@ subroutine c2a_scal(b_in,v_in,v_out,mode) v_in=matmul(mat,u) if (index(mode,'2i')/=0) v_in(:)=v_in(:)/n(:) ! * -> iku endif - end subroutine c2a_scal + end subroutine c2a_scal ! subroutine c2a_vec(b_in,nvec,v_in,v_out,mode) ! @@ -275,7 +275,10 @@ subroutine c2a_vec(b_in,nvec,v_in,v_out,mode) endif ! ! Scale factor if input vector is in iku - ! + ! + n=reshape((/1._SP,0._SP,0._SP,0._SP,1._SP,0._SP,0._SP,0._SP,1._SP/),(/3,3/)) + n_m1=reshape((/1._SP,0._SP,0._SP,0._SP,1._SP,0._SP,0._SP,0._SP,1._SP/),(/3,3/)) + do i =1, 3 if (index(mode,'r')/=0) n(i,i)=alat(i) if (index(mode,'k')/=0) n(i,i)=2._SP*pi/alat(i) @@ -284,9 +287,27 @@ subroutine c2a_vec(b_in,nvec,v_in,v_out,mode) ! ! u is rlu or cc (no iku) ! - u=v_in - if (index(mode,'i2')/=0) u(1:nvec,1:3)=matmul(v_in(:,:),n(:,:)) ! iku -> cc - ! + print *,"alat" + print *,alat + print *,"n" + print *,n(:,:) + print *,"a_here" + print *,a_here + u(:,:)=v_in(:,:) + print *,"u before matmul" + print *,u(1,:) + print *,u(2,:) + print *,u(3,:) + print *,u(4,:) + print *,u(30,:) + if (index(mode,'i2')/=0) u(:,:)=matmul(v_in(:,:),n(:,:)) ! iku -> cc + ! + print *,"u after matmul" + print *,u(1,:) + print *,u(2,:) + print *,u(3,:) + print *,u(4,:) + print *,u(30,:) ! i2c/c2i mat=reshape((/1._SP,0._SP,0._SP,0._SP,1._SP,0._SP,0._SP,0._SP,1._SP/),(/3,3/)) ! diff --git a/src/modules/pgipar164Jk4g b/src/modules/pgipar164Jk4g new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/modules/pgipar2A2EZGu b/src/modules/pgipar2A2EZGu new file mode 100644 index 0000000000..e69de29bb2 From f2dbd0af4673eb1d7c8fea3a89ab4016c223affc Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Mon, 7 Dec 2020 17:15:08 +0100 Subject: [PATCH 054/110] imap ok , only low cutoff for now --- src/common/eval_G_minus_G.F | 46 ++++++++++++++--------------------- src/modules/mod_vec_operate.F | 4 +-- 2 files changed, 20 insertions(+), 30 deletions(-) diff --git a/src/common/eval_G_minus_G.F b/src/common/eval_G_minus_G.F index 3d19bcd262..7b1b18202d 100644 --- a/src/common/eval_G_minus_G.F +++ b/src/common/eval_G_minus_G.F @@ -195,33 +195,31 @@ integer function eval_G_minus_G(iG,iGo,COMM) print *,g_vec(4,:) print *,g_vec(30,:) call c2a(nvec=iG_,v_in=g_vec(1:iG_,1:3),mode="ki2a") - print *,'done' - print *,g_vec(1,:) - print *,g_vec(2,:) - print *,g_vec(3,:) - print *,g_vec(4,:) - print *,g_vec(30,:) ! - allocate (imap(iG_,iG_,iG_)) + allocate(imap(iG_,iG_,iG_)) imap(:,:,:)=0 do i1 = 1, iG_ imap(nint(g_vec(i1,1)),nint(g_vec(i1,2)),nint(g_vec(i1,3))) = i1 enddo print *,"imap(v1)" print *,imap(nint(g_vec(1,1)),nint(g_vec(2,2)),nint(g_vec(1,3))) - print *,"imap(v2)" - print *,imap(nint(g_vec(2,1)),nint(g_vec(2,2)),nint(g_vec(1,3))) - print *,"imap(v3)" - print *,imap(nint(g_vec(3,1)),nint(g_vec(3,2)),nint(g_vec(3,3))) - print *,"imap(v1)" - print *, nint(g_vec(2,3)) - print *,imap(nint(g_vec(3,1)),nint(g_vec(3,2)),nint(g_vec(2,3))) - print *,"imap(v2)" - print *,imap(nint(g_vec(5,1)),nint(g_vec(5,2)),nint(g_vec(5,3))) - print *,"imap(v3)" - print *,imap(nint(g_vec(30,1)),nint(g_vec(30,2)),nint(g_vec(30,3))) - ! - call c2a(nvec=iG_,v_in=g_vec(1:iG_,1:3),mode="ka2i") + ! + print *,'done' + print *,g_vec(1,:) + print *,g_vec(2,:) + print *,g_vec(3,:) + print *,g_vec(4,:) + print *,g_vec(30,:) + ! + call c2a(nvec=iG_,v_in=g_vec(1:iG_,1:3),mode="ka2i") + ! + print *,'done' + print *,g_vec(1,:) + print *,g_vec(2,:) + print *,g_vec(3,:) + print *,g_vec(4,:) + print *,g_vec(30,:) + ! !$omp parallel do default(shared), private(i2,i1,v1), schedule(dynamic) do i2=1,iGo_ ! @@ -238,14 +236,6 @@ integer function eval_G_minus_G(iG,iGo,COMM) enddo enddo !$omp end parallel do - ! - call c2a(nvec=iG_,v_in=g_vec(1:iG_,1:3),mode="ka2i") - print *,'done' - print *,g_vec(1,:) - print *,g_vec(2,:) - print *,g_vec(3,:) - print *,g_vec(4,:) - print *,g_vec(30,:) ! if (present(COMM)) call PP_redux_wait(G_m_G,COMM=COMM%COMM) ! diff --git a/src/modules/mod_vec_operate.F b/src/modules/mod_vec_operate.F index 1b1b9dd59a..525ea0698e 100644 --- a/src/modules/mod_vec_operate.F +++ b/src/modules/mod_vec_operate.F @@ -319,10 +319,10 @@ subroutine c2a_vec(b_in,nvec,v_in,v_out,mode) ! if (present(v_out)) then v_out=transpose(matmul(mat,transpose(u))) - if (index(mode,'2i')/=0) v_out(1:nvec,1:3)=matmul(v_out(1:nvec,1:3),n_m1) ! * -> iku + if (index(mode,'2i')/=0) v_out(1:nvec,1:3)=matmul(v_out(1:nvec,1:3),n_m1(:,:)) ! * -> iku else v_in=transpose(matmul(mat,transpose(u))) - if (index(mode,'2i')/=0) v_in(1:nvec,1:3)=matmul(v_in(1:nvec,1:3),n_m1) ! * -> iku + if (index(mode,'2i')/=0) v_in(1:nvec,1:3)=matmul(v_in(1:nvec,1:3),n_m1(:,:)) ! * -> iku endif end subroutine c2a_vec ! From 67ee1c9f540c03c8c787502a3f29c2177cfbf6ed Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Mon, 7 Dec 2020 22:55:00 +0100 Subject: [PATCH 055/110] imap implemented, problem: should be done for also outer shell --- src/common/eval_G_minus_G.F | 43 ++++++++++++----------------------- src/modules/mod_vec_operate.F | 32 ++++++-------------------- 2 files changed, 22 insertions(+), 53 deletions(-) diff --git a/src/common/eval_G_minus_G.F b/src/common/eval_G_minus_G.F index 7b1b18202d..29252e8f66 100644 --- a/src/common/eval_G_minus_G.F +++ b/src/common/eval_G_minus_G.F @@ -46,7 +46,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 real(SP):: E_iG, E_iGo, E_max - real(SP):: v1(3) + real(SP):: v1(3),v2(3) real(SP), allocatable :: E_G_m_G(:,:),imap(:,:,:) type(PP_indexes) :: PAR_IND_G ! @@ -189,37 +189,18 @@ integer function eval_G_minus_G(iG,iGo,COMM) ! surely does not help ! ! - print *,g_vec(1,:) - print *,g_vec(2,:) - print *,g_vec(3,:) - print *,g_vec(4,:) - print *,g_vec(30,:) + v2(:)=g_vec(1,:)-g_vec(1,:) + G_m_G(1,1)=G_index(v2,.false.) + G_m_G(1,1)=0 + ! call c2a(nvec=iG_,v_in=g_vec(1:iG_,1:3),mode="ki2a") - ! + ! allocate(imap(iG_,iG_,iG_)) imap(:,:,:)=0 do i1 = 1, iG_ imap(nint(g_vec(i1,1)),nint(g_vec(i1,2)),nint(g_vec(i1,3))) = i1 enddo - print *,"imap(v1)" - print *,imap(nint(g_vec(1,1)),nint(g_vec(2,2)),nint(g_vec(1,3))) - ! - print *,'done' - print *,g_vec(1,:) - print *,g_vec(2,:) - print *,g_vec(3,:) - print *,g_vec(4,:) - print *,g_vec(30,:) - ! - call c2a(nvec=iG_,v_in=g_vec(1:iG_,1:3),mode="ka2i") - ! - print *,'done' - print *,g_vec(1,:) - print *,g_vec(2,:) - print *,g_vec(3,:) - print *,g_vec(4,:) - print *,g_vec(30,:) - ! + ! !$omp parallel do default(shared), private(i2,i1,v1), schedule(dynamic) do i2=1,iGo_ ! @@ -231,12 +212,18 @@ integer function eval_G_minus_G(iG,iGo,COMM) do i1=1,iG_ ! v1(:)=g_vec(i1,:)-g_vec(i2,:) - G_m_G(i1,i2)=G_index(v1,.false.) - ! + G_m_G(i1,i2)=imap(nint(v1(1)),nint(v1(2)),nint(v1(3))) + !G_m_G(i1,i2)=G_index(v1,.false.) + print *,"i1,i2" + print *, i1,i2 + print *,"index" + print *, G_m_G(i1,i2) enddo enddo !$omp end parallel do ! + call c2a(nvec=iG_,v_in=g_vec(1:iG_,1:3),mode="ka2i") + ! if (present(COMM)) call PP_redux_wait(G_m_G,COMM=COMM%COMM) ! call PP_indexes_reset(PAR_IND_G) diff --git a/src/modules/mod_vec_operate.F b/src/modules/mod_vec_operate.F index 525ea0698e..c972038f99 100644 --- a/src/modules/mod_vec_operate.F +++ b/src/modules/mod_vec_operate.F @@ -276,9 +276,8 @@ subroutine c2a_vec(b_in,nvec,v_in,v_out,mode) ! ! Scale factor if input vector is in iku ! - n=reshape((/1._SP,0._SP,0._SP,0._SP,1._SP,0._SP,0._SP,0._SP,1._SP/),(/3,3/)) - n_m1=reshape((/1._SP,0._SP,0._SP,0._SP,1._SP,0._SP,0._SP,0._SP,1._SP/),(/3,3/)) - + n(:,:)=0 + n_m1(:,:)=0 do i =1, 3 if (index(mode,'r')/=0) n(i,i)=alat(i) if (index(mode,'k')/=0) n(i,i)=2._SP*pi/alat(i) @@ -287,27 +286,10 @@ subroutine c2a_vec(b_in,nvec,v_in,v_out,mode) ! ! u is rlu or cc (no iku) ! - print *,"alat" - print *,alat - print *,"n" - print *,n(:,:) - print *,"a_here" - print *,a_here u(:,:)=v_in(:,:) - print *,"u before matmul" - print *,u(1,:) - print *,u(2,:) - print *,u(3,:) - print *,u(4,:) - print *,u(30,:) - if (index(mode,'i2')/=0) u(:,:)=matmul(v_in(:,:),n(:,:)) ! iku -> cc - ! - print *,"u after matmul" - print *,u(1,:) - print *,u(2,:) - print *,u(3,:) - print *,u(4,:) - print *,u(30,:) + ! + if (index(mode,'i2')/=0) u(:,:)=matmul(v_in(1:nvec,1:3),n(1:3,1:3)) ! iku -> cc + ! ! i2c/c2i mat=reshape((/1._SP,0._SP,0._SP,0._SP,1._SP,0._SP,0._SP,0._SP,1._SP/),(/3,3/)) ! @@ -319,10 +301,10 @@ subroutine c2a_vec(b_in,nvec,v_in,v_out,mode) ! if (present(v_out)) then v_out=transpose(matmul(mat,transpose(u))) - if (index(mode,'2i')/=0) v_out(1:nvec,1:3)=matmul(v_out(1:nvec,1:3),n_m1(:,:)) ! * -> iku + if (index(mode,'2i')/=0) v_out(:,:)=matmul(v_out(1:nvec,1:3),n_m1(:,:)) ! * -> iku else v_in=transpose(matmul(mat,transpose(u))) - if (index(mode,'2i')/=0) v_in(1:nvec,1:3)=matmul(v_in(1:nvec,1:3),n_m1(:,:)) ! * -> iku + if (index(mode,'2i')/=0) v_in(:,:)=matmul(v_in(1:nvec,1:3),n_m1(:,:)) ! * -> iku endif end subroutine c2a_vec ! From a453f39f9c7d412db91dba81821b5fc8bcc85672 Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Mon, 7 Dec 2020 23:35:47 +0100 Subject: [PATCH 056/110] imap not done for all G-G', also memory pbm --- src/common/eval_G_minus_G.F | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/common/eval_G_minus_G.F b/src/common/eval_G_minus_G.F index 29252e8f66..5d7b46d3d0 100644 --- a/src/common/eval_G_minus_G.F +++ b/src/common/eval_G_minus_G.F @@ -153,7 +153,7 @@ integer function eval_G_minus_G(iG,iGo,COMM) ! iG_= ng_in_shell(iG_shell) eval_G_minus_G=iG_ - if (iGo==0) iGo_=iG_ + if (iGo==0) iGo_=iG_ ! ! Fill the actual G_m_G matrix ! @@ -189,6 +189,7 @@ integer function eval_G_minus_G(iG,iGo,COMM) ! surely does not help ! ! + !print *, g_vec(127,:) v2(:)=g_vec(1,:)-g_vec(1,:) G_m_G(1,1)=G_index(v2,.false.) G_m_G(1,1)=0 @@ -214,10 +215,10 @@ integer function eval_G_minus_G(iG,iGo,COMM) v1(:)=g_vec(i1,:)-g_vec(i2,:) G_m_G(i1,i2)=imap(nint(v1(1)),nint(v1(2)),nint(v1(3))) !G_m_G(i1,i2)=G_index(v1,.false.) - print *,"i1,i2" - print *, i1,i2 - print *,"index" - print *, G_m_G(i1,i2) + !print *,"i1,i2" + !print *, i1,i2 + !print *,"index" + !print *, G_m_G(i1,i2) enddo enddo !$omp end parallel do From ce22b60d2b1f89f0c7bb83d215785b63ef631e97 Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Tue, 8 Dec 2020 14:38:29 +0100 Subject: [PATCH 057/110] hybrid imap and g_index --- src/common/eval_G_minus_G.F | 40 +++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/src/common/eval_G_minus_G.F b/src/common/eval_G_minus_G.F index 5d7b46d3d0..916d41af72 100644 --- a/src/common/eval_G_minus_G.F +++ b/src/common/eval_G_minus_G.F @@ -46,8 +46,8 @@ 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 real(SP):: E_iG, E_iGo, E_max - real(SP):: v1(3),v2(3) - real(SP), allocatable :: E_G_m_G(:,:),imap(:,:,:) + real(SP):: v1(3),v2(3),v1_rlu(3) + real(SP), allocatable :: E_G_m_G(:,:),imap(:,:,:),g_vec_rlu(:,:) type(PP_indexes) :: PAR_IND_G ! integer, external :: G_index @@ -189,19 +189,18 @@ integer function eval_G_minus_G(iG,iGo,COMM) ! surely does not help ! ! - !print *, g_vec(127,:) - v2(:)=g_vec(1,:)-g_vec(1,:) - G_m_G(1,1)=G_index(v2,.false.) - G_m_G(1,1)=0 - ! - call c2a(nvec=iG_,v_in=g_vec(1:iG_,1:3),mode="ki2a") + !v2(:)=g_vec(1,:)-g_vec(1,:) + !G_m_G(1,1)=G_index(v2,.false.) + !G_m_G(1,1)=0 + ! + allocate(g_vec_rlu(iG_,3)) + call c2a(nvec=iG_,v_in=g_vec(1:iG_,1:3),v_out=g_vec_rlu(1:iG_,1:3),mode="ki2a") ! allocate(imap(iG_,iG_,iG_)) - imap(:,:,:)=0 do i1 = 1, iG_ - imap(nint(g_vec(i1,1)),nint(g_vec(i1,2)),nint(g_vec(i1,3))) = i1 + imap(nint(g_vec_rlu(i1,1)),nint(g_vec_rlu(i1,2)),nint(g_vec_rlu(i1,3))) = i1 enddo - ! + ! !$omp parallel do default(shared), private(i2,i1,v1), schedule(dynamic) do i2=1,iGo_ ! @@ -212,18 +211,15 @@ integer function eval_G_minus_G(iG,iGo,COMM) ! do i1=1,iG_ ! + v1_rlu(:)=g_vec_rlu(i1,:)-g_vec_rlu(i2,:) v1(:)=g_vec(i1,:)-g_vec(i2,:) - G_m_G(i1,i2)=imap(nint(v1(1)),nint(v1(2)),nint(v1(3))) - !G_m_G(i1,i2)=G_index(v1,.false.) - !print *,"i1,i2" - !print *, i1,i2 - !print *,"index" - !print *, G_m_G(i1,i2) + G_m_G(i1,i2)=imap(nint(v1_rlu(1)),nint(v1_rlu(2)),nint(v1_rlu(3))) + if(G_m_G(i1,i2)==0) then + G_m_G(i1,i2)=G_index(v1,.false.) + endif enddo enddo !$omp end parallel do - ! - call c2a(nvec=iG_,v_in=g_vec(1:iG_,1:3),mode="ka2i") ! if (present(COMM)) call PP_redux_wait(G_m_G,COMM=COMM%COMM) ! @@ -234,7 +230,13 @@ integer function eval_G_minus_G(iG,iGo,COMM) YAMBO_FREE(G_m_G_d) YAMBO_ALLOC_SOURCE(G_m_G_d,G_m_G) #endif + ! + print *,"ok1" + deallocate(g_vec_rlu) + deallocate(imap) + print *,"ok2" ! call timing("eval_G_minus_G",opr="stop") ! + print *,"ok3" end function From 203f325426a9a5c1952f9df4a96cc37409ea3e3a Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Wed, 9 Dec 2020 06:36:40 +0100 Subject: [PATCH 058/110] implementation modified. --- src/common/eval_G_minus_G.F | 46 +++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/src/common/eval_G_minus_G.F b/src/common/eval_G_minus_G.F index 916d41af72..469d4bcfac 100644 --- a/src/common/eval_G_minus_G.F +++ b/src/common/eval_G_minus_G.F @@ -45,9 +45,11 @@ 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) real(SP):: E_iG, E_iGo, E_max - real(SP):: v1(3),v2(3),v1_rlu(3) + real(SP):: v1(3),v2(3) real(SP), allocatable :: E_G_m_G(:,:),imap(:,:,:),g_vec_rlu(:,:) + integer, allocatable :: ig_vec_rlu(:,:) type(PP_indexes) :: PAR_IND_G ! integer, external :: G_index @@ -193,15 +195,25 @@ integer function eval_G_minus_G(iG,iGo,COMM) !G_m_G(1,1)=G_index(v2,.false.) !G_m_G(1,1)=0 ! - allocate(g_vec_rlu(iG_,3)) - call c2a(nvec=iG_,v_in=g_vec(1:iG_,1:3),v_out=g_vec_rlu(1:iG_,1:3),mode="ki2a") + YAMBO_ALLOC(g_vec_rlu, (size(g_vec,1),3)) + YAMBO_ALLOC(ig_vec_rlu, (size(g_vec,1),3)) + ! + call c2a(nvec=size(g_vec,1),v_in=g_vec,v_out=g_vec_rlu,mode="ki2a") + ig_vec_rlu=NINT(g_vec_rlu) ! - allocate(imap(iG_,iG_,iG_)) - do i1 = 1, iG_ - imap(nint(g_vec_rlu(i1,1)),nint(g_vec_rlu(i1,2)),nint(g_vec_rlu(i1,3))) = i1 + ngx1 = maxval(ig_vec_rlu(:,1)) + ngx2 = maxval(ig_vec_rlu(:,2)) + ngx3 = maxval(ig_vec_rlu(:,3)) + ! + YAMBO_ALLOC(imap, (-ngx1:ngx1, -ngx2:ngx2, -ngx3:ngx3 )) + ! + imap=0 + !$omp parallel do default(shared), private(i1) + do i1 = 1, size(g_vec,1) + imap(ig_vec_rlu(i1,1),ig_vec_rlu(i1,2),ig_vec_rlu(i1,3)) = i1 enddo ! - !$omp parallel do default(shared), private(i2,i1,v1), schedule(dynamic) + !$omp parallel do default(shared), private(i2,i1,iv1_rlu), schedule(dynamic) do i2=1,iGo_ ! if(present(COMM)) then @@ -210,18 +222,18 @@ integer function eval_G_minus_G(iG,iGo,COMM) endif ! do i1=1,iG_ - ! - v1_rlu(:)=g_vec_rlu(i1,:)-g_vec_rlu(i2,:) - v1(:)=g_vec(i1,:)-g_vec(i2,:) - G_m_G(i1,i2)=imap(nint(v1_rlu(1)),nint(v1_rlu(2)),nint(v1_rlu(3))) - if(G_m_G(i1,i2)==0) then - G_m_G(i1,i2)=G_index(v1,.false.) - endif + 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 enddo !$omp end parallel do ! if (present(COMM)) call PP_redux_wait(G_m_G,COMM=COMM%COMM) + if (any(G_m_G(:,:)==0)) call error("[G-vec] unexpected invalid G_index in G_m_G") + ! + YAMBO_FREE(g_vec_rlu) + YAMBO_FREE(ig_vec_rlu) + YAMBO_FREE(imap) ! call PP_indexes_reset(PAR_IND_G) YAMBO_FREE(E_G_m_G) @@ -230,13 +242,7 @@ integer function eval_G_minus_G(iG,iGo,COMM) YAMBO_FREE(G_m_G_d) YAMBO_ALLOC_SOURCE(G_m_G_d,G_m_G) #endif - ! - print *,"ok1" - deallocate(g_vec_rlu) - deallocate(imap) - print *,"ok2" ! call timing("eval_G_minus_G",opr="stop") ! - print *,"ok3" end function From 6c4516d984b07e70474c61832c78dffeb1e178d2 Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Wed, 9 Dec 2020 12:50:14 +0100 Subject: [PATCH 059/110] small fix --- src/common/eval_G_minus_G.F | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/common/eval_G_minus_G.F b/src/common/eval_G_minus_G.F index 469d4bcfac..b1fa268e5e 100644 --- a/src/common/eval_G_minus_G.F +++ b/src/common/eval_G_minus_G.F @@ -191,9 +191,9 @@ integer function eval_G_minus_G(iG,iGo,COMM) ! surely does not help ! ! - !v2(:)=g_vec(1,:)-g_vec(1,:) - !G_m_G(1,1)=G_index(v2,.false.) - !G_m_G(1,1)=0 + v2(:)=g_vec(1,:)-g_vec(1,:) + G_m_G(1,1)=G_index(v2,.false.) + G_m_G(1,1)=0 ! YAMBO_ALLOC(g_vec_rlu, (size(g_vec,1),3)) YAMBO_ALLOC(ig_vec_rlu, (size(g_vec,1),3)) @@ -212,7 +212,9 @@ integer function eval_G_minus_G(iG,iGo,COMM) do i1 = 1, size(g_vec,1) imap(ig_vec_rlu(i1,1),ig_vec_rlu(i1,2),ig_vec_rlu(i1,3)) = i1 enddo - ! + ! + !$omp end parallel do + ! !$omp parallel do default(shared), private(i2,i1,iv1_rlu), schedule(dynamic) do i2=1,iGo_ ! From 6b851917a8eeba6a4608506d667c1a496df71b94 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Mon, 14 Dec 2020 12:14:15 +0100 Subject: [PATCH 060/110] OMP bugs fixed in Terminator --- src/qp/QP_ppa_cohsex.F | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index d4b7af7d5b..b48960c1fd 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -53,8 +53,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) & PARALLEL_WF_distribute,QP_state_print,MATRIX_transpose,MATRIX_duplicate use matrix, ONLY:PAR_matrix,MATRIX_reset use timing_m, ONLY:timing + use parallel_m, ONLY:PAR_COM_RL_A2A #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,dev_memset,dev_conjg @@ -504,20 +504,25 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) dc(1) = cmplx(dp_dummy,kind=SP) ! ! - ! Bug spotted by D.V. (April 2014). HEAD_QP_cpu is defined differently when + ! DV: Bug spotted in April 2014. HEAD_QP_cpu is defined differently when ! the _SC flag is used. The point is that in SE calculations HEAD_QP_cpu is used ! 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 + ! AF: After the inclusion of G-parallelism, the communicator to use + ! here (both SC and ordinary runs) has become PAR_COM_RL_A2A + ! +!#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 (PAR_COM_RL_A2A%CPU_id==0) QP_Sc(i_qp,:)=QP_Sc(i_qp,:)+dc(1) ! dc=cZERO ! @@ -665,7 +670,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) dp_dummy=0.0_DP ! !DEV_CUF kernel do(2) - !DEV_OMP parallel do default(shared),private(ig1,ig2,PPA_E,PPA_R), & + !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 @@ -695,6 +700,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! enddo enddo + !DEV_OMP end parallel do ! if (have_cuda) dp_dummy=cmplx(dp_dummy_r,dp_dummy_i,kind=DP) ! From 147447bd85e565c760c1c6bb7e5aa5eff021d8f7 Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Wed, 16 Dec 2020 18:54:53 +0100 Subject: [PATCH 061/110] g parallelism working for GTerm. Not yet qp parallelism. --- src/qp/QP_ppa_cohsex.F | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index b48960c1fd..dc8865eb42 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -429,7 +429,9 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! eet_factor=cZERO call dev_memset(eet_factor,cZERO) ! - if ( HEAD_QP_cpu ) then + ! MB: After the inclusion of G-parallelism, the communicator to use + ! here has become PAR_COM_RL_A2A. see below DV and AF comments + if (PAR_COM_RL_A2A%CPU_id==0) then if (X_is_TR_rotated) then ! !DEV_CUF kernel do(2) From 8a1198634c37b024ff7b760be051bc39794baa4d Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Thu, 17 Dec 2020 11:35:28 +0100 Subject: [PATCH 062/110] GTerm eet_factor ok with PAR_COM_G_b_INDEX --- src/qp/QP_ppa_cohsex.F | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index dc8865eb42..f195db669b 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -53,7 +53,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) & PARALLEL_WF_distribute,QP_state_print,MATRIX_transpose,MATRIX_duplicate use matrix, ONLY:PAR_matrix,MATRIX_reset use timing_m, ONLY:timing - use parallel_m, ONLY:PAR_COM_RL_A2A + use parallel_m, ONLY:PAR_COM_RL_A2A,PAR_COM_G_b_INDEX #if defined _SC use SC, ONLY:it_now,it_to_start #endif @@ -429,9 +429,9 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! eet_factor=cZERO call dev_memset(eet_factor,cZERO) ! - ! MB: After the inclusion of G-parallelism, the communicator to use - ! here has become PAR_COM_RL_A2A. see below DV and AF comments - if (PAR_COM_RL_A2A%CPU_id==0) then + ! MB: After the inclusion of G-parallelism, PAR_COM_G_b_INDEX can be different + ! from HEAD_QP_cpu --> the right one to be used is PAR_COM_G_b_INDEX + if (PAR_COM_G_b_INDEX%CPU_id==0) then if (X_is_TR_rotated) then ! !DEV_CUF kernel do(2) From b58a4e743656f0e88fe32837bead63b03abd892a Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Thu, 17 Dec 2020 19:29:52 +0100 Subject: [PATCH 063/110] cleanup --- src/qp/QP_ppa_cohsex.F | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index f195db669b..3cb55657a1 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -431,7 +431,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! ! MB: After the inclusion of G-parallelism, PAR_COM_G_b_INDEX can be different ! from HEAD_QP_cpu --> the right one to be used is PAR_COM_G_b_INDEX - if (PAR_COM_G_b_INDEX%CPU_id==0) then + ! + if (PAR_COM_G_b_INDEX%CPU_id==0) then if (X_is_TR_rotated) then ! !DEV_CUF kernel do(2) @@ -511,8 +512,8 @@ 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. ! - ! AF: After the inclusion of G-parallelism, the communicator to use - ! here (both SC and ordinary runs) has become PAR_COM_RL_A2A + ! AF,MB: After the inclusion of G-parallelism, the communicator to use + ! here (both SC and ordinary runs) has become PAR_COM_G_b_INDEX ! !#if defined _SC ! if (l_sc_run) then @@ -524,7 +525,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! endif !#endif ! - if (PAR_COM_RL_A2A%CPU_id==0) 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) ! dc=cZERO ! From 90091cdb645b6755eb2337f93d5e5faf7dfcbff7 Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Tue, 9 Mar 2021 12:48:46 +0100 Subject: [PATCH 064/110] yMPIcomm also for SE --- src/modules/mod_parallel.F | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/mod_parallel.F b/src/modules/mod_parallel.F index 022b5ff869..fd0adf3354 100644 --- a/src/modules/mod_parallel.F +++ b/src/modules/mod_parallel.F @@ -442,8 +442,8 @@ module parallel_m type(yMPI_comm),SAVE :: PAR_COM_freqs_INDEX ! ! ... SE - type(MPI_comm),SAVE :: PAR_COM_SE_WORLD_RL_resolved - type(MPI_comm),SAVE :: PAR_COM_SE_WORLD + type(yMPI_comm),SAVE :: PAR_COM_SE_WORLD_RL_resolved + type(yMPI_comm),SAVE :: PAR_COM_SE_WORLD ! ! ... and dimensions (used for automatic cpu distribution) !========================================================= From e2f36be0035d41eb8e999e364946d24b4953784f Mon Sep 17 00:00:00 2001 From: mikibonacci Date: Tue, 9 Mar 2021 18:57:52 +0100 Subject: [PATCH 065/110] BUFFER%blc_d deleted, used Xo%blc_d instead -> to be tested --- src/pol_function/X_redux.F | 43 ++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/src/pol_function/X_redux.F b/src/pol_function/X_redux.F index 3ab54dc925..876b4308d2 100644 --- a/src/pol_function/X_redux.F +++ b/src/pol_function/X_redux.F @@ -71,7 +71,7 @@ subroutine X_redux(iq,X_par,Xw,X) logical :: compute_on_gpu type(PAR_matrix) :: K_FXC type(PAR_matrix), target :: BUFFER,KERNEL,Xo - complex(SP), pointer DEV_ATTR :: BUFFER_blc_d(:,:,:) + complex(SP), pointer DEV_ATTR :: Xo_blc_d(:,:,:) ! ! Setup ! @@ -117,10 +117,10 @@ subroutine X_redux(iq,X_par,Xw,X) ! if (compute_on_gpu) then YAMBO_ALLOC(KERNEL%blc_d,(KERNEL%BLCrows(1):KERNEL%BLCrows(2),KERNEL%BLCcols(1):KERNEL%BLCcols(2),1)) - YAMBO_ALLOC(BUFFER%blc_d,(BUFFER%BLCrows(1):BUFFER%BLCrows(2),BUFFER%BLCcols(1):BUFFER%BLCcols(2),max(PAR_n_freqs,1))) + !AMBO_ALLOC(BUFFER%blc_d,(BUFFER%BLCrows(1):BUFFER%BLCrows(2),BUFFER%BLCcols(1):BUFFER%BLCcols(2),max(PAR_n_freqs,1))) YAMBO_ALLOC(Xo%blc_d,(Xo%BLCrows(1):Xo%BLCrows(2),Xo%BLCcols(1):Xo%BLCcols(2),1)) call dev_memset(KERNEL%blc_d,cZERO) - call dev_memset(BUFFER%blc_d,cZERO) + !call dev_memset(BUFFER%blc_d,cZERO) call dev_memset(Xo%blc_d,cZERO) endif ! @@ -229,24 +229,31 @@ subroutine X_redux(iq,X_par,Xw,X) ! ! X(g,gp)=Sum_gpp[KERNEL]^-1_(g,gpp)*Xo(gpp,gp) ! + ! on input: Xo irreducible polarizability + ! on output: Xo is overwritten + ! if (X_use_lin_sys) then ! ! Linear System ! - if (compute_on_gpu) then - call dev_memcpy(BUFFER%blc_d(:,:,BUFFER%I), Xo%blc_d(:,:,1)) - else - BUFFER%blc(:,:,BUFFER%I) = Xo%blc(:,:,1) - endif + !if (compute_on_gpu) then + ! call dev_memcpy(BUFFER%blc_d(:,:,BUFFER%I), Xo%blc_d(:,:,1)) + !else + ! BUFFER%blc(:,:,BUFFER%I) = Xo%blc(:,:,1) + !endif ! - call LINEAR_ALGEBRA_driver(LIN_SYS,M_slk=KERNEL,B_slk=BUFFER) + !call LINEAR_ALGEBRA_driver(LIN_SYS,M_slk=KERNEL,B_slk=BUFFER) + call LINEAR_ALGEBRA_driver(LIN_SYS,M_slk=KERNEL,B_slk=Xo) ! else ! ! Matrix Inversion + Matmul ! + if (compute_on_gpu) call error("[LA] inversion+matmul not available on GPUs") + ! call LINEAR_ALGEBRA_driver(INV,M_slk=KERNEL) call LINEAR_ALGEBRA_driver(MAT_MUL,M_slk=KERNEL,B_slk=Xo,C_slk=BUFFER) + Xo%blc(:,:,1)=BUFFER%blc(:,:,BUFFER%I) ! endif ! @@ -254,38 +261,38 @@ subroutine X_redux(iq,X_par,Xw,X) ! if (compute_on_gpu) then ! -! call dev_mat_upd_dMd(Xo_rows(2)-Xo_rows(1)+1,Xo_cols(2)-Xo_cols(1)+1,BUFFER%blc_d(:,:,iw_par),& -!& bare_qpg_d(Xo_rows(1):,iq),"R",bare_qpg_d(iq,Xo_cols(1):),"R",scal=cmplx(4._SP*pi,kind=SP)) - ! - BUFFER_blc_d => BUFFER%blc_d + Xo_blc_d => Xo%blc_d ! !$cuf kernel do(2) do ig2=Xo_cols(1),Xo_cols(2) do ig1=Xo_rows(1),Xo_rows(2) - BUFFER_blc_d(ig1,ig2,iw_par)=BUFFER_blc_d(ig1,ig2,iw_par)*4._SP*pi/bare_qpg_d(iq,ig1)/bare_qpg_d(iq,ig2) + Xo_blc_d(ig1,ig2,1)=Xo_blc_d(ig1,ig2,1)*4._SP*pi/bare_qpg_d(iq,ig1)/bare_qpg_d(iq,ig2) enddo enddo ! - call dev_stream_sync(stream_default) - call dev_memcpy_async(BUFFER%blc(:,:,BUFFER%I),BUFFER%blc_d(:,:,BUFFER%I), stream_d2h) + !call dev_stream_sync(stream_default) + !call dev_memcpy_async(BUFFER%blc(:,:,iw_par),Xo%blc_d(:,:,1), stream_d2h) + call dev_memcpy(BUFFER%blc(:,:,iw_par),Xo%blc_d(:,:,1)) ! else ! !$omp parallel do default(shared), private(ig1,ig2), collapse(2) do ig2=Xo%cols(1),Xo%cols(2) do ig1=Xo%rows(1),Xo%rows(2) - BUFFER%blc(ig1,ig2,iw_par)=BUFFER%blc(ig1,ig2,iw_par)*4._SP*pi/bare_qpg(iq,ig1)/bare_qpg(iq,ig2) + Xo%blc(ig1,ig2,1)=Xo%blc(ig1,ig2,1)*4._SP*pi/bare_qpg(iq,ig1)/bare_qpg(iq,ig2) enddo enddo !$omp end parallel do ! + BUFFER%blc(:,:,iw_par)=Xo%blc(:,:,1) + ! endif ! if (PAR_n_freqs>0) call live_timing(steps=1) ! enddo ! - call dev_stream_sync(stream_d2h) + !call dev_stream_sync(stream_d2h) ! if (PAR_n_freqs>0) call live_timing() ! From 67dc69b3f9f8578d372f6e5d1dcefb031f3a3335 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Wed, 10 Mar 2021 13:46:41 +0100 Subject: [PATCH 066/110] _NV macro added for nv-compiler --- config/m4/acx_fortran_flags.m4 | 45 ++++++++++++++++++++++++++ configure | 59 ++++++++++++++++++++++++++-------- src/modules/mod_functions.F | 2 +- src/modules/mod_stderr.F | 2 +- 4 files changed, 93 insertions(+), 15 deletions(-) diff --git a/config/m4/acx_fortran_flags.m4 b/config/m4/acx_fortran_flags.m4 index 7723d19705..9a0e4cafc2 100644 --- a/config/m4/acx_fortran_flags.m4 +++ b/config/m4/acx_fortran_flags.m4 @@ -50,6 +50,15 @@ i?86*linux*) def_compiler="-D_PGI" DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" ;; + *nvfortran* ) + SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + FUFLAGS="-O0 -Mbackslash" + FCMFLAG="-Mnomain" + OMPFLAGS="-mp" + #NETCDFFLAGS="-DpgiFortran" + def_compiler="-D_NV" + DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" + ;; *abf90*) SYSFLAGS="-B101 -YEXT_NAMES=LCS -YEXT_SFX=_" ;; @@ -125,6 +134,15 @@ i?86*linux*) NETCDFFLAGS="-DpgiFortran" DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" ;; + *nvfortran* ) + SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + FUFLAGS="-O0 -g -Mbackslash" + FCMFLAG="-Mnomain" + OMPFLAGS="-mp" + #NETCDFFLAGS="-DpgiFortran" + def_compiler="-D_NV" + DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" + ;; *gfortran*) SYSFLAGS="-O3 -g -mtune=native" FUFLAGS="-O0 -g -mtune=native" @@ -174,6 +192,15 @@ ia64*linux* ) def_compiler="-D_PGI" DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" ;; + *nvfortran* ) + SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + FUFLAGS="-O0 -g -Mbackslash" + FCMFLAG="-Mnomain" + OMPFLAGS="-mp" + #NETCDFFLAGS="-DpgiFortran" + def_compiler="-D_NV" + DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" + ;; *gfortran*) SYSFLAGS="-O3 -g -mtune=native" FUFLAGS="-O0 -g -mtune=native" @@ -245,6 +272,15 @@ ia64*linux* ) NETCDFFLAGS="-DpgiFortran" DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" ;; + *nvfortran* ) + SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + FUFLAGS="-O0 -g -Mbackslash" + FCMFLAG="-Mnomain" + OMPFLAGS="-mp" + def_compiler="-D_NV" + #NETCDFFLAGS="-DpgiFortran" + DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" + ;; *gfortran*) SYSFLAGS="-O3 -g -mtune=native" FUFLAGS="-O0 -g -mtune=native" @@ -327,6 +363,15 @@ powerpc64*linux* ) NETCDFFLAGS="-DpgiFortran" DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" ;; + *nvfortran* ) + SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + FUFLAGS="-O0 -g -Mbackslash" + FCMFLAG="-Mnomain" + OMPFLAGS="-mp" + def_compiler="-D_NV" + #NETCDFFLAGS="-DpgiFortran" + DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" + ;; *gfortran*) SYSFLAGS="-O3 -g -mtune=native" FUFLAGS="-O0 -g -mtune=native" diff --git a/configure b/configure index bf678d8fdf..050687950d 100755 --- a/configure +++ b/configure @@ -848,7 +848,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -1015,7 +1014,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}' @@ -1268,15 +1266,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=* \ @@ -1414,7 +1403,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. @@ -1567,7 +1556,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] @@ -6679,6 +6667,15 @@ i?86*linux*) def_compiler="-D_PGI" DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" ;; + *nvfortran* ) + SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + FUFLAGS="-O0 -Mbackslash" + FCMFLAG="-Mnomain" + OMPFLAGS="-mp" + #NETCDFFLAGS="-DpgiFortran" + def_compiler="-D_NV" + DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" + ;; *abf90*) SYSFLAGS="-B101 -YEXT_NAMES=LCS -YEXT_SFX=_" ;; @@ -6754,6 +6751,15 @@ i?86*linux*) NETCDFFLAGS="-DpgiFortran" DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" ;; + *nvfortran* ) + SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + FUFLAGS="-O0 -g -Mbackslash" + FCMFLAG="-Mnomain" + OMPFLAGS="-mp" + #NETCDFFLAGS="-DpgiFortran" + def_compiler="-D_NV" + DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" + ;; *gfortran*) SYSFLAGS="-O3 -g -mtune=native" FUFLAGS="-O0 -g -mtune=native" @@ -6803,6 +6809,15 @@ ia64*linux* ) def_compiler="-D_PGI" DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" ;; + *nvfortran* ) + SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + FUFLAGS="-O0 -g -Mbackslash" + FCMFLAG="-Mnomain" + OMPFLAGS="-mp" + #NETCDFFLAGS="-DpgiFortran" + def_compiler="-D_NV" + DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" + ;; *gfortran*) SYSFLAGS="-O3 -g -mtune=native" FUFLAGS="-O0 -g -mtune=native" @@ -6874,6 +6889,15 @@ ia64*linux* ) NETCDFFLAGS="-DpgiFortran" DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" ;; + *nvfortran* ) + SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + FUFLAGS="-O0 -g -Mbackslash" + FCMFLAG="-Mnomain" + OMPFLAGS="-mp" + def_compiler="-D_NV" + #NETCDFFLAGS="-DpgiFortran" + DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" + ;; *gfortran*) SYSFLAGS="-O3 -g -mtune=native" FUFLAGS="-O0 -g -mtune=native" @@ -6956,6 +6980,15 @@ powerpc64*linux* ) NETCDFFLAGS="-DpgiFortran" DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" ;; + *nvfortran* ) + SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + FUFLAGS="-O0 -g -Mbackslash" + FCMFLAG="-Mnomain" + OMPFLAGS="-mp" + def_compiler="-D_NV" + #NETCDFFLAGS="-DpgiFortran" + DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" + ;; *gfortran*) SYSFLAGS="-O3 -g -mtune=native" FUFLAGS="-O0 -g -mtune=native" diff --git a/src/modules/mod_functions.F b/src/modules/mod_functions.F index c6351b7f55..c4ea9f9930 100644 --- a/src/modules/mod_functions.F +++ b/src/modules/mod_functions.F @@ -59,7 +59,7 @@ logical function infinity(E) end function infinity ! logical function NAN(E) -#if defined(_XLF) || defined(_PGI) +#if defined(_XLF) || defined(_PGI) || defined(_NV) use ieee_arithmetic real(SP) :: E NAN= ieee_is_nan(E) diff --git a/src/modules/mod_stderr.F b/src/modules/mod_stderr.F index 9e1753441a..700dcfbbd3 100644 --- a/src/modules/mod_stderr.F +++ b/src/modules/mod_stderr.F @@ -46,7 +46,7 @@ module stderr ! ! Slash ! -#if defined _aix || defined _XLF || defined _PGI +#if defined _aix || defined _XLF || defined _PGI || defined _NV character(2), parameter :: slash="\\" #else character(1), parameter :: slash="\" From e815b0675c8250a91c9d6d76377672fe703f6b7a Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Wed, 14 Apr 2021 11:10:44 +0200 Subject: [PATCH 067/110] debug instructions added; IN_PLACE PP_redux coded --- src/modules/mod_parallel_interface.F | 34 ++++++++++++++++++++++++++ src/pol_function/X_dielectric_matrix.F | 12 ++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/src/modules/mod_parallel_interface.F b/src/modules/mod_parallel_interface.F index 119c7cbc5e..9cf0b72d8f 100644 --- a/src/modules/mod_parallel_interface.F +++ b/src/modules/mod_parallel_interface.F @@ -46,6 +46,7 @@ module parallel_int & i81share, & & r0share, r1share, r2share,r3share, & & c0share, c1share, c2share,c3share,c4share,c5share, & +& c2share_x, & #if ! defined _DOUBLE & d0share, d1share, d2share,d3share, & & dc0share,dc1share,dc2share, & @@ -682,6 +683,39 @@ subroutine c2share(array,COMM) call mpi_barrier(LOCAL_COMM,i_err) #endif end subroutine + + subroutine c2share_x(array,in_place,COMM) + complex(SP):: array(:,:) + logical, intent(IN) :: in_place + integer, optional :: COMM +#if defined _MPI + integer::dimensions(2),dimension,LOCAL_COMM ! Work Space + if (ncpu==1) return + ! + if (.not.in_place) then + if ( present(COMM)) call c2share(array,COMM) + if (.not. present(COMM)) call c2share(array) + return + endif + ! + if (present(COMM)) then + LOCAL_COMM=COMM + else + LOCAL_COMM=mpi_comm_world + endif + if (LOCAL_COMM==comm_default_value) return + ! + local_type=MPI_COMPLEX + if (SP==DP) local_type=MPI_DOUBLE_COMPLEX + ! + call mpi_barrier(LOCAL_COMM,i_err) + dimensions=shape(array) + if( any(dimensions<1) ) return + dimension=product(dimensions) + call mpi_allreduce(MPI_IN_PLACE,array,dimension,local_type,mpi_sum,LOCAL_COMM,i_err) + call mpi_barrier(LOCAL_COMM,i_err) +#endif + end subroutine ! subroutine c3share(array,COMM) complex(SP):: array(:,:,:) diff --git a/src/pol_function/X_dielectric_matrix.F b/src/pol_function/X_dielectric_matrix.F index c3c4526fed..97a57e6d8c 100644 --- a/src/pol_function/X_dielectric_matrix.F +++ b/src/pol_function/X_dielectric_matrix.F @@ -273,6 +273,9 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) ! if (X%whoami/=1) call X_redux(iq,X_par(iq_mem),Xw,X) ! +! XXX +write(*,*) "upto before io_RESPONSE" +! XXX #if defined _PAR_IO if(.not.io_RESPONSE) then #endif @@ -286,14 +289,21 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) if ( io_RESPONSE) iw_X_mat=iw if (.not.io_RESPONSE) iw_X_mat=(iq_mem-1)*X_MEM_n_freqs+iw ! +! XXX +write(*,*) "before zeroing X_mat",iw X_mat(:,:,iw_X_mat)=cZERO ! +write(*,*) "before if PAR_COM_X_WORLD",iw if (PAR_COM_X_WORLD_RL_resolved%CPU_id==0) then +write(*,*) "inside if PAR_COM_X_WORLD",iw X_mat(X_par(iq_mem)%rows(1):X_par(iq_mem)%rows(2),& & X_par(iq_mem)%cols(1):X_par(iq_mem)%cols(2),iw_X_mat)=X_par(iq_mem)%blc(:,:,iw) endif ! - call PP_redux_wait(X_mat(:,:,iw_X_mat),COMM=PAR_COM_X_WORLD%COMM) +write(*,*) "before PP_redux_wait", iw +!!! call PP_redux_wait(X_mat(:,:,iw_X_mat),COMM=PAR_COM_X_WORLD%COMM) + call PP_redux_wait(X_mat(:,:,iw_X_mat),IN_PLACE=.true.,COMM=PAR_COM_X_WORLD%COMM) +write(*,*) "after PP_redux_wait", iw ! enddo ! From 4118d35ada42a15db03426c096a0f0fefcc53eef Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Wed, 14 Apr 2021 11:46:41 +0200 Subject: [PATCH 068/110] tentative relocation of the X_alloc call (allocating X_mat) in X_dielectric_function, in order not to have significant memory allocated during X_irredux and X_redux, if not strictly required (allocation of X_mat is not performed only when writing the DB, if io_RESPONSE). --- src/pol_function/X_dielectric_matrix.F | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/pol_function/X_dielectric_matrix.F b/src/pol_function/X_dielectric_matrix.F index 97a57e6d8c..53f8afb73a 100644 --- a/src/pol_function/X_dielectric_matrix.F +++ b/src/pol_function/X_dielectric_matrix.F @@ -178,9 +178,9 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) ! if (io_RESPONSE) then allocate(X_par(1)) -#if !defined _PAR_IO - call X_alloc('X',(/X%ng,X%ng,Xw%n_freqs/)) -#endif +!#if !defined _PAR_IO +! call X_alloc('X',(/X%ng,X%ng,Xw%n_freqs/)) +!#endif else allocate(X_par(PAR_nQ_ibz)) call X_alloc('X',(/X%ng,X%ng,X_MEM_n_freqs*PAR_nQ_ibz/)) @@ -273,6 +273,13 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) ! if (X%whoami/=1) call X_redux(iq,X_par(iq_mem),Xw,X) ! + ! allocation of X_mat + if (io_RESPONSE.and..not.allocated(X_mat)) then +#if ! defined _PAR_IO + call X_alloc('X',(/X%ng,X%ng,Xw%n_freqs/)) +#endif + endif + ! ! XXX write(*,*) "upto before io_RESPONSE" ! XXX @@ -319,6 +326,14 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) call io_control(ACTION=OP_APP_CL,COM=REP,SEC=(/2*iq,2*iq+1/),ID=Xdb) i_err=io_X(X,Xw,Xdb) ! + ! X_mat (and other few quantities) deallocate + ! + if (io_RESPONSE.and.allocated(X_mat)) then +#if ! defined _PAR_IO + call X_alloc('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 From 1fbedeadb54b6a5341e6c61a4f21e3ba15ed2885 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Fri, 28 May 2021 21:49:55 +0200 Subject: [PATCH 069/110] collapse clause added --- src/qp/QP_ppa_cohsex.F | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 3cb55657a1..e0f92fc525 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -293,7 +293,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! if (l_ppa) then ! - !$omp parallel do default(shared), private(ig1,ig2) + !$omp parallel do default(shared), private(ig1,ig2), collapse(2) do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) if (real(X_par(iq_mem)%blc(ig1,ig2,X_range1)/X_par(iq_mem)%blc(ig1,ig2,X_range2))<=1._SP) then @@ -314,7 +314,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) call DEV_SUB(scatter_Gamp)(isc,'c') if (have_cuda) call dev_memcpy(isc%gamp,isc%gamp_d) ! - !$omp parallel do default(shared), private(ig1,ig2) + !$omp parallel do default(shared), private(ig1,ig2), collapse(2) do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) X_par(iq_mem)%blc(ig1,ig2,X_range1)=X_par(iq_mem)%blc(ig1,ig2,X_range1)*isc%gamp(ig1,ig2) From 5dcc41b395197da7e9f6919f2573fbc7a76ed354 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 28 Sep 2022 12:55:36 +0200 Subject: [PATCH 070/110] Version 5.1.0, Revision 21780, Hash c025db860 MODIFIED * include/driver/version.h ypp/interface/INIT_ypp.F Bugs: - [ypp_rt] Fixed compilation Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- ypp/interface/INIT_ypp.F | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a5cfff304e..d58d7e9162 100644 --- a/include/driver/version.h +++ 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 "ea13d5a7b" +#define YAMBO_REVISION 21780 +#define YAMBO_HASH "c025db860" diff --git a/ypp/interface/INIT_ypp.F b/ypp/interface/INIT_ypp.F index b90e0d5a3f..4b0437f0c9 100644 --- a/ypp/interface/INIT_ypp.F +++ b/ypp/interface/INIT_ypp.F @@ -67,7 +67,8 @@ subroutine INIT_ypp(E,instr,FINALIZE) use pars, ONLY:SP #endif #if defined _YPP_ELPH - use 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 #endif #if defined _YAML_OUTPUT use pars, ONLY:logfile_index,repfile_index From 574442fca26c5e05ee67fe2297ee1b5a85385ad1 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 20 Nov 2022 19:14:14 +0100 Subject: [PATCH 071/110] Version 5.1.0, Revision 21781, Hash 5dcc41b39 MODIFIED * include/driver/version.h DELETED * lib/qe_pseudo/stoW4kD8 pol_function/pgipar1b7VYnw Changes: - [yambo] deleted compilation files which were added to the source Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- lib/qe_pseudo/stoW4kD8 | 0 src/pol_function/pgipar1b7VYnw | 0 3 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 lib/qe_pseudo/stoW4kD8 delete mode 100644 src/pol_function/pgipar1b7VYnw diff --git a/include/driver/version.h b/include/driver/version.h index d58d7e9162..45e98717da 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21780 -#define YAMBO_HASH "c025db860" +#define YAMBO_REVISION 21781 +#define YAMBO_HASH "5dcc41b39" diff --git a/lib/qe_pseudo/stoW4kD8 b/lib/qe_pseudo/stoW4kD8 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/pol_function/pgipar1b7VYnw b/src/pol_function/pgipar1b7VYnw deleted file mode 100644 index e69de29bb2..0000000000 From 9389553998d1ffdb990184a6c9388d9fc8f2705f Mon Sep 17 00:00:00 2001 From: Miki Date: Thu, 23 Feb 2023 10:46:44 +0100 Subject: [PATCH 072/110] merged with develop --- 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 bb7cea53ad..e8dc5edb2d 100755 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -157,7 +157,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,W,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(isc,NG=isc%ngrho,GAMP_NG=(/X%ng,X%ng/),TITLE="GW") call elemental_collision_alloc(iscp,NG=isc%ngrho,TITLE="GW") ! call timing('GW(mpa)',OPR='start') From 9809e89e785990ee543628535b470be6640964b7 Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Sat, 14 Oct 2023 14:45:15 +0200 Subject: [PATCH 073/110] reset of the branch to the bugfix commit; ready to try again a merge with bug-fixes and develop --- .gitattributes | 5 +- .gitignore | 9 +- Makefile | 35 +- config/configure.ac | 38 +- config/m4/acx_IO_wrap_up.m4 | 22 +- config/m4/acx_branch.m4 | 22 +- config/m4/acx_cpp.m4 | 25 +- config/m4/acx_fortran_flags.m4 | 51 +- config/m4/acx_fpp.m4 | 28 +- config/m4/acx_get_fc_kind.m4 | 22 +- config/m4/acx_get_mpi_kind.m4 | 22 +- config/m4/acx_misc.m4 | 22 +- config/m4/acx_mpi.m4 | 22 +- config/m4/acx_report.m4 | 151 +- config/m4/acx_stripe_subpath.m4 | 17 + config/m4/acx_version.m4 | 17 + config/m4/blas.m4 | 30 +- config/m4/cuda.m4 | 22 +- config/m4/etsf_io.m4 | 22 +- config/m4/fft.m4 | 22 +- config/m4/futile.m4 | 22 +- config/m4/hdf5_f90.m4 | 100 +- config/m4/iotk.m4 | 23 +- config/m4/lapack.m4 | 29 +- config/m4/libxc.m4 | 57 +- config/m4/mpi.m4 | 26 +- config/m4/netcdf_f90.m4 | 26 +- config/m4/petsc_slepc.m4 | 76 +- config/m4/scalapack.m4 | 22 +- config/m4/scripts.m4 | 22 +- config/m4/yambo_driver.m4 | 25 + config/m4/yambo_folders.m4 | 22 +- config/m4/yambo_remote_compilation_setup.m4 | 22 +- config/m4/yambo_specific.m4 | 22 +- config/mk/defs.mk.in | 22 +- config/mk/global/actions/clean.mk | 12 +- .../actions/compile_external_libraries.mk | 6 + .../mk/global/actions/compile_interfaces.mk | 12 +- .../actions/compile_internal_libraries.mk | 8 +- config/mk/global/actions/compile_yambo.mk | 28 +- .../global/actions/compile_yambo_libraries.mk | 8 +- config/mk/global/actions/compile_ypp.mk | 36 +- config/mk/global/actions/dependencies.mk | 8 + .../actions/download_external_libraries.mk | 7 + config/mk/global/actions/help.mk | 7 + config/mk/global/defs.mk.in | 22 +- config/mk/global/functions/cleaning.mk | 24 +- config/mk/global/functions/get_libraries.mk | 9 +- config/mk/global/functions/global_check.mk | 9 +- config/mk/global/functions/help.mk | 14 +- config/mk/global/functions/mk_exe.mk | 11 +- config/mk/global/functions/mk_external_lib.mk | 7 + config/mk/global/functions/mk_lib.mk | 7 + config/mk/global/functions/todo.mk | 12 +- config/mk/global/libraries.mk | 95 +- config/mk/global/no_configure_help.mk | 7 + config/mk/global/targets.mk | 9 +- config/mk/local/defs.mk.in | 22 +- config/mk/local/functions.mk | 24 +- config/mk/local/makefile | 24 +- config/mk/local/operations.mk | 7 + config/mk/local/rules.mk | 6 + config/report.in | 56 +- config/setup.in | 12 +- configure | 1379 ++-- doc/doxygen/000_doxygen_example.F | 5 - driver/yambo.F | 39 +- driver/ypp.F | 28 +- driver/ypp_project.dep | 2 + include/branch.inc.in | 7 + include/driver/editor.h.in | 22 +- include/driver/fortran_driver.h | 22 +- include/driver/tool.h | 22 +- include/driver/yambo_driver.h | 22 +- include/headers/common/collisions.h | 22 +- include/headers/common/dev_defs.h | 52 +- include/headers/common/dev_defs_nocuda.h | 29 +- include/headers/common/dev_undefs.h | 30 +- include/headers/common/device_macros.h | 13 + include/headers/common/have_malloc.h.in | 23 +- include/headers/common/memory.h | 34 +- include/headers/common/wrapper.h | 22 +- {config => include}/version/version.m4 | 6 +- interfaces/a2y/a2y.F | 22 +- interfaces/a2y/a2y_db1.F | 22 +- interfaces/a2y/a2y_kb_pp.F | 22 +- interfaces/a2y/a2y_wf.F | 22 +- interfaces/a2y/netcdf_data.F | 22 +- interfaces/c2y/c2y.F | 22 +- interfaces/c2y/c2y_db1.F | 22 +- interfaces/c2y/c2y_file_name.F | 22 +- interfaces/c2y/c2y_wf.F | 22 +- interfaces/e2y/e2y.F | 22 +- interfaces/e2y/e2y_db1.F | 22 +- interfaces/e2y/e2y_kb_pp.F | 22 +- interfaces/e2y/e2y_wf.F | 22 +- interfaces/e2y/e2y_wf_components.F | 22 +- interfaces/e2y/etsf_data.F | 22 +- interfaces/int_modules/mod_com2y.F | 22 +- interfaces/int_modules/mod_wf2y.F | 22 +- interfaces/int_modules/mod_xc2y.F | 22 +- interfaces/p2y/PP_PWscf_comp.F | 24 +- interfaces/p2y/PP_PWscf_comp_nlcc.F | 22 +- interfaces/p2y/mod_p2y.F | 22 +- interfaces/p2y/mod_pw_data.F | 22 +- interfaces/p2y/p2y.F | 22 +- interfaces/p2y/p2y_atmproj.F | 22 +- interfaces/p2y/p2y_db1.F | 22 +- interfaces/p2y/p2y_pseudo.F | 22 +- interfaces/p2y/p2y_wf.F | 22 +- interfaces/p2y/pw_pseudo_read.F | 22 +- interfaces/p2y/qe_pseudo_init.F | 22 +- interfaces/p2y/qexpt_p2y.F | 22 +- interfaces/p2y/qexsd_p2y.F | 28 +- lib/archive/Makefile.loc | 3 +- 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 + .../archive/Ydriver-src/config/defs.mk.in | 32 +- 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 | 8 +- .../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 + lib/archive/git.list.in | 6 +- lib/fftqe/fftqe_defs.h.in | 8 +- lib/hdf5/Makefile.loc | 2 +- lib/iotk/Makefile.loc | 3 +- lib/iotk/make_iotk.inc.in | 13 +- lib/libxc/Makefile.loc | 2 +- lib/netcdf/Makefile.loc | 3 +- lib/netcdff/Makefile.loc | 2 +- lib/petsc/Makefile.loc | 2 +- lib/qe_pseudo/qe_auxdata.F | 22 +- lib/qe_pseudo/qe_pseudo_module.F | 22 +- lib/scalapack/SLmake.inc_lib | 2 +- sbin/CUDA_MPI_launcher.sh | 22 +- sbin/check_packages.sh | 48 + sbin/compilation/check_object_childs.sh | 43 +- sbin/compilation/check_updated_locks.sh | 84 +- sbin/compilation/check_updated_sources.sh | 36 +- sbin/compilation/configure_generated_files.sh | 22 +- sbin/compilation/dependencies.sh | 53 +- sbin/compilation/dependencies_element.sh | 22 +- sbin/compilation/dependencies_project.sh | 52 +- sbin/compilation/fix_locks.sh | 38 +- sbin/compilation/global_conf_check.sh | 26 +- sbin/compilation/helper.inc.sh.in | 23 +- sbin/compilation/helper.sh | 101 +- sbin/compilation/libraries.sh | 23 +- sbin/compilation/name_me.sh | 102 + sbin/compilation/object_remove.sh | 181 +- sbin/compilation/object_save_and_restore.sh | 255 +- sbin/compilation/options.sh | 22 +- sbin/compilation/projects.sh | 22 +- sbin/compilation/special_sources.sh | 22 +- sbin/compilation/stamp_remove.sh | 45 +- sbin/compilation/verbosity.sh | 59 + .../clean_unused_variables.tcsh | 22 +- sbin/developer_tools/copyright.sh | 117 + sbin/developer_tools/file_splitter.pl | 6 + sbin/developer_tools/find_and_replace.sh | 22 +- sbin/developer_tools/msg_unit_shift.pl | 6 + sbin/developer_tools/recursive_year_update.sh | 92 - sbin/git_configure_and_hooks.sh | 25 +- sbin/gitchangelog.py | 22 +- sbin/make_message.pl | 37 +- sbin/replacer.sh | 22 +- sbin/yambo_versions_update.tcsh | 57 +- src/Yio/IO_and_Messaging_switch.F | 22 +- src/Yio/IO_make_directories.F | 22 +- src/Yio/IO_temporary_jobdir_and_strings.F | 22 +- src/Yio/def_variable_bulk.F | 43 +- src/Yio/def_variable_elemental.F | 35 +- src/Yio/io_bulk.F | 22 +- src/Yio/io_connect.F | 24 +- src/Yio/io_control.F | 29 +- src/Yio/io_disconnect.F | 22 +- src/Yio/io_elemental.F | 22 +- src/Yio/io_fragment.F | 22 +- src/Yio/io_fragment_disconnect.F | 22 +- src/Yio/io_utilities.F | 29 +- src/Yio/io_variable_bulk.F | 22 +- src/Yio/io_variable_elemental.F | 22 +- src/acfdt/acfdt_tot_energy.F | 22 +- src/acfdt/gauss_leg_grid.F | 22 +- src/allocations/.objects | 6 +- src/allocations/ELPH_alloc.F | 22 +- src/allocations/ELPH_project.dep | 2 + src/allocations/X_ALLOC_elemental.F | 25 +- src/allocations/X_ALLOC_global.F | 22 +- src/allocations/X_ALLOC_parallel.F | 22 +- src/bse/EPS_via_perturbative_inversion.F | 22 +- src/bse/K.F | 68 +- src/bse/K_Haydock.F | 22 +- src/bse/K_Haydock_gather.F | 22 +- src/bse/K_Haydock_response.F | 22 +- src/bse/K_Haydock_scatter.F | 22 +- src/bse/K_IP.F | 22 +- src/bse/K_IP_sort.F | 22 +- src/bse/K_Transition_check.F | 22 +- src/bse/K_Transitions_setup.F | 22 +- src/bse/K_WF_phases.F | 22 +- src/bse/K_blocks.F | 22 +- .../K_components_folded_in_serial_arrays.F | 22 +- src/bse/K_compress.F | 22 +- src/bse/K_correlation_collisions.F | 22 +- src/bse/K_correlation_kernel.F | 22 +- src/bse/K_diago_driver.F | 22 +- src/bse/K_diago_hermitian_residuals.F | 22 +- src/bse/K_diago_kerr_residual.F | 22 +- src/bse/K_diago_magnons_residual.F | 22 +- src/bse/K_diago_non_hermitian_residuals.F | 22 +- src/bse/K_diago_perturbative.F | 22 +- src/bse/K_diago_response_functions.F | 22 +- src/bse/K_diagonal.F | 22 +- src/bse/K_dipoles.F | 22 +- src/bse/K_dot_product.F | 22 +- src/bse/K_driver.F | 22 +- src/bse/K_driver_init.F | 22 +- src/bse/K_eps_interpolate.F | 22 +- src/bse/K_exchange_collisions.F | 22 +- src/bse/K_exchange_kernel.F | 22 +- src/bse/K_inversion_Lo.F | 22 +- src/bse/K_inversion_do_it_SLK.F | 22 +- src/bse/K_inversion_do_it_full.F | 22 +- src/bse/K_inversion_driver.F | 22 +- src/bse/K_inversion_engine.F | 22 +- src/bse/K_inversion_restart.F | 22 +- src/bse/K_multiply_by_V.F | 22 +- src/bse/K_multiply_by_V_slepc.F | 22 +- src/bse/K_multiply_by_V_transpose.F | 22 +- src/bse/K_multiply_by_V_transpose_slepc.F | 22 +- src/bse/K_observables.F | 22 +- src/bse/K_restart.F | 22 +- src/bse/K_screened_interaction.F | 44 +- src/bse/K_shell_matrix.F | 22 +- src/bse/K_solvers.F | 22 +- src/bse/K_stored_in_a_big_matrix.F | 22 +- src/bse/K_stored_in_a_slepc_matrix.F | 22 +- src/bse/PL_diago_residual.F | 22 +- src/bse/PL_via_perturbative_inversion.F | 22 +- src/bz_ops/NL_project.dep | 2 + src/bz_ops/bz_samp_indexes.F | 81 +- src/bz_ops/k_build_up_BZ_tables.F | 22 +- src/bz_ops/k_expand.F | 22 +- src/bz_ops/k_ibz2bz.F | 22 +- src/bz_ops/k_lattice.F | 32 +- src/bz_ops/k_map_nearest_by_dir.F | 22 +- src/bz_ops/k_reduce.F | 22 +- src/bz_ops/k_the_nearest.F | 22 +- src/collisions/.objects | 11 +- src/collisions/COLLISIONS_HXC.F | 49 +- src/collisions/COLLISIONS_NEQ_GW_static.F | 24 +- src/collisions/COLLISIONS_alloc_and_free.F | 22 +- src/collisions/COLLISIONS_basic_operations.F | 22 +- src/collisions/COLLISIONS_compose_nl.F | 22 +- src/collisions/COLLISIONS_compose_rt.F | 22 +- src/collisions/COLLISIONS_compose_sc.F | 22 +- src/collisions/COLLISIONS_eval.F | 22 +- src/collisions/COLLISIONS_linearize_and_IO.F | 22 +- src/collisions/COLLISIONS_load.F | 22 +- src/collisions/COLLISIONS_map_to_QP_table.F | 22 +- src/collisions/COLLISIONS_momentum.F | 22 +- src/collisions/NL_project.dep | 14 + src/collisions/PLASMA_build_up.F | 22 +- src/collisions/PLASMA_parallel_setup.F | 22 +- src/collisions/PLASMA_tables_and_dimensions.F | 22 +- src/collisions/QED_project.dep | 11 + src/collisions/RT_project.dep | 11 + src/collisions/SCATTERING_GW_kinematics.F | 22 +- .../SCATTERING_QED_transverse_matrix.F | 22 +- src/collisions/SC_project.dep | 14 + src/common/.objects | 5 +- src/common/CIntegrate.F | 22 +- src/common/Convolve.F | 22 +- src/common/DOUBLE_project.dep | 2 + src/common/FREQUENCIES_Green_Function.F | 32 +- src/common/FREQUENCIES_coarse_grid.F | 22 +- src/common/FREQUENCIES_damping.F | 22 +- src/common/FREQUENCIES_merge.F | 22 +- src/common/FREQUENCIES_mpa_sampling.F | 220 + src/common/FREQUENCIES_reset.F | 22 +- src/common/FREQUENCIES_set_reference_point.F | 22 +- src/common/FREQUENCIES_setup.F | 42 +- src/common/Fermi_fnc_fit.F | 22 +- src/common/G_index.F | 22 +- src/common/G_index_energy_factor.F | 22 +- src/common/G_rot_grid.F | 22 +- src/common/HyperbolicSecant_FT.F | 22 +- src/common/Kramers_Kronig.F | 22 +- src/common/LEVELS_respect_degenerations.F | 22 +- src/common/Laplace_transform.F | 22 +- src/common/Lorentzian_FT.F | 26 +- src/common/OBS_rotate.F | 22 +- src/common/OCCUPATIONS_Extend.F | 43 +- src/common/OCCUPATIONS_Extend_Double_Grid.F | 22 +- src/common/OCCUPATIONS_Fermi.F | 22 +- src/common/OCCUPATIONS_Gaps.F | 22 +- src/common/QP_state_group.F | 22 +- src/common/QP_state_print.F | 22 +- src/common/QPartilize.F | 22 +- src/common/RIntegrate.F | 22 +- src/common/RT_project.dep | 2 + src/common/crystal_lattice.F | 22 +- src/common/eval_G_minus_G.F | 107 +- src/common/eval_Gradient.F | 22 +- src/common/f_build_ext.F | 36 + src/common/pgipar1XQrolt | 0 src/common/pgipar2Yy1LOK | 0 src/common/spline_fit.F | 22 +- src/communicate/DESC_compare.F | 22 +- src/communicate/DESC_write.F | 30 +- src/communicate/REPORT_Energies.F | 22 +- src/communicate/REPORT_Occupations.F | 22 +- src/communicate/acknowledge_yambo.F | 28 +- src/communicate/com_compose_msg.F | 22 +- src/communicate/com_utilities_functions.F | 22 +- src/communicate/com_utilities_netcdf.F | 22 +- src/communicate/com_utilities_subroutines.F | 22 +- src/communicate/msg_characters_vector_int.F | 22 +- src/communicate/msg_integers_vector_int.F | 22 +- src/communicate/msg_manager.F | 22 +- src/communicate/msg_reals_vector_int.F | 22 +- src/communicate/section.F | 22 +- src/coulomb/bessel_F2.F | 22 +- src/coulomb/bessel_F3.F | 22 +- src/coulomb/bessel_F4.F | 22 +- src/coulomb/bessel_F5.F | 22 +- src/coulomb/bessel_F6.F | 22 +- src/coulomb/bessel_J0.F | 22 +- src/coulomb/col_driver.F | 39 +- src/coulomb/cutoff_box.F | 22 +- src/coulomb/cutoff_cylinder.F | 22 +- src/coulomb/cutoff_driver.F | 22 +- src/coulomb/cutoff_slab.F | 22 +- src/coulomb/cutoff_sphere.F | 22 +- src/coulomb/cutoff_test.F | 22 +- src/coulomb/cutoff_ws.F | 22 +- src/coulomb/rim.F | 36 +- src/coulomb/rim_integrate_v.F | 22 +- src/coulomb/rim_integrate_w.F | 162 +- src/coulomb/rim_spherical.F | 22 +- src/coulomb/rim_spherical_bose.F | 22 +- src/dipoles/Berry_polarization_EQ.F | 22 +- src/dipoles/Build_Overlaps_Det_EQ.F | 22 +- src/dipoles/DIPOLE_IO.F | 23 +- src/dipoles/DIPOLE_SC_rotate.F | 22 +- src/dipoles/DIPOLE_build_covariants.F | 22 +- src/dipoles/DIPOLE_check_shifted_grids.F | 22 +- src/dipoles/DIPOLE_dimensions.F | 28 +- src/dipoles/DIPOLE_driver.F | 22 +- src/dipoles/DIPOLE_kb_Ylm.F | 26 +- src/dipoles/DIPOLE_kb_abinit_comp.F | 26 +- src/dipoles/DIPOLE_kb_abinit_def_dim.F | 26 +- src/dipoles/DIPOLE_kb_init.F | 22 +- src/dipoles/DIPOLE_kb_pwscf_comp.F | 26 +- src/dipoles/DIPOLE_kb_pwscf_def_dim.F | 26 +- src/dipoles/DIPOLE_kb_sum.F | 26 +- src/dipoles/DIPOLE_orb_magn_forCD.F | 22 +- src/dipoles/DIPOLE_orbital_magnetization.F | 22 +- src/dipoles/DIPOLE_overlaps.F | 51 +- src/dipoles/DIPOLE_p_matrix_elements.F | 26 +- src/dipoles/DIPOLE_shifted_grids.F | 22 +- src/dipoles/DIPOLE_spin_magnetization.F | 22 +- src/dipoles/DIPOLE_transverse.F | 22 +- src/dipoles/DIPOLE_x_real_space.F | 22 +- src/dipoles/Ionic_polarization.F | 22 +- src/dipoles/NL_project.dep | 3 + src/dipoles/POLARIZATION_output.F | 22 +- src/dipoles/RT_project.dep | 1 + src/dipoles/SC_project.dep | 4 + src/driver/NL_project.dep | 2 + src/driver/RT_project.dep | 2 - src/driver/options_control.c | 29 +- src/driver/options_interfaces.c | 22 +- src/driver/options_projects.c | 22 +- src/driver/options_yambo.c | 46 +- src/driver/options_ypp.c | 22 +- src/el-ph/.objects | 11 +- src/el-ph/DOUBLE_project.dep | 4 +- src/el-ph/ELPH_Hamiltonian.F | 22 +- src/el-ph/ELPH_Sigma_c.F | 35 +- .../{ELPH_GreenF.F => ELPH_Sigma_c_engine.F} | 53 +- src/el-ph/ELPH_acoustic_phonon_properties.F | 22 +- src/el-ph/ELPH_databases_check.F | 22 +- src/el-ph/ELPH_databases_grids_map.F | 22 +- src/el-ph/ELPH_databases_load.F | 22 +- src/el-ph/ELPH_databases_symmetrize.F | 22 +- src/el-ph/ELPH_gsqF_to_Sigma.F | 56 +- src/el-ph/ELPH_project.dep | 14 + .../ELPH_simmetrize_and_distribute_gsqF.F | 22 +- src/el-ph/En_k_plus_q_interpolate.F | 48 +- src/el-ph/Eval_Efermi_DbGd.F | 74 + src/el-ph/PHEL_project.dep | 6 + src/el-ph/RT_project.dep | 6 + src/el-ph/get_ph_E_DbGd.F | 55 + src/hamiltonian/.objects | 5 +- src/hamiltonian/Bare_Hamiltonian.F | 22 +- src/hamiltonian/Berry_polarization_NEQ.F | 22 +- src/hamiltonian/Build_Overlaps_det_NEQ.F | 22 +- src/hamiltonian/Build_W_operator.F | 24 +- src/hamiltonian/Build_tilde_vbands.F | 22 +- src/hamiltonian/Check_symmetries.F | 22 +- src/hamiltonian/MAG_A_phase.F | 22 +- src/hamiltonian/MAG_Hamiltonian.F | 22 +- src/hamiltonian/MAG_common_build_A.F | 22 +- src/hamiltonian/MAG_initial_check.F | 22 +- src/hamiltonian/NL_project.dep | 12 + src/hamiltonian/Pseudo_Hamiltonian.F | 22 +- src/hamiltonian/Pseudo_KB_FFT.F | 22 +- src/hamiltonian/Pseudo_KB_G_to_R_space.F | 22 +- src/hamiltonian/Pseudo_KB_gauge_factor.F | 22 +- src/hamiltonian/RT_project.dep | 4 + src/hamiltonian/SC_project.dep | 12 + src/hamiltonian/V_Hartree.F | 22 +- src/hamiltonian/V_qp_basis_to_H.F | 47 +- src/hamiltonian/V_real_space_to_H.F | 22 +- src/hamiltonian/Vgrad_real_space_to_H.F | 22 +- src/hamiltonian/WF_and_dipole_dimensions.F | 32 +- src/hamiltonian/XC_additional_SC_potentials.F | 22 +- src/hamiltonian/XC_potentials.F | 22 +- src/interface/INIT.F | 59 +- src/interface/INIT_C_driver_runlevels.F | 22 +- src/interface/INIT_DephMatrix.F | 22 +- src/interface/INIT_QP.F | 22 +- src/interface/INIT_QP_ctl_load.F | 22 +- src/interface/INIT_QP_ctl_switch.F | 22 +- src/interface/INIT_RT_ctl_load.F | 22 +- src/interface/INIT_RT_ctl_switch.F | 22 +- src/interface/INIT_activate.F | 65 +- src/interface/INIT_barriers.F | 56 +- src/interface/INIT_check_databases.F | 33 +- src/interface/INIT_input_file.F | 22 +- src/interface/INIT_load.F | 192 +- src/interface/INIT_q_points.F | 22 +- src/interface/INIT_read_command_line.F | 47 +- .../INIT_read_command_line_corr_scatt.F | 22 +- .../INIT_read_command_line_potentials.F | 22 +- src/interface/INIT_report_and_log_files.F | 22 +- src/interface/RT_project.dep | 4 + src/interface/SC_project.dep | 1 + src/interpolate/INTERPOLATION_BZ.F | 22 +- src/interpolate/INTERPOLATION_BZ_coeff.F | 22 +- src/interpolate/INTERPOLATION_BZ_setup.F | 22 +- src/interpolate/INTERPOLATION_coefficients.F | 22 +- .../INTERPOLATION_create_the_grid.F | 22 +- src/interpolate/INTERPOLATION_driver_do.F | 22 +- src/interpolate/INTERPOLATION_driver_end.F | 22 +- src/interpolate/INTERPOLATION_driver_seed.F | 22 +- src/interpolate/INTERPOLATION_fourier.F | 22 +- .../INTERPOLATION_integral_respect.F | 22 +- src/interpolate/INTERPOLATION_nearest_E.F | 22 +- src/interpolate/INTERPOLATION_nearest_k.F | 22 +- src/interpolate/INTERPOLATION_vec_in_star.F | 22 +- src/io/.objects | 2 +- src/io/DOUBLE_project.dep | 1 + src/io/RT_SCATT_project.dep | 2 - src/io/io_ATMPROJ_pwscf.F | 26 +- src/io/io_BSS_Haydock.F | 22 +- src/io/io_BSS_diago.F | 22 +- src/io/io_BSS_invert.F | 22 +- src/io/io_BS_Fxc.F | 26 +- src/io/io_COL_CUT.F | 22 +- src/io/io_DB1.F | 22 +- src/io/io_DB1_selective_scan.F | 22 +- src/io/io_Double_Grid.F | 44 +- src/io/io_ELPH.F | 24 +- src/io/io_E_SOC_map.F | 22 +- src/io/io_GROT.F | 22 +- src/io/io_HF_and_locXC.F | 22 +- src/io/io_KB_abinit.F | 22 +- src/io/io_KB_pwscf.F | 22 +- src/io/io_KB_real_space.F | 24 +- src/io/io_MPA.F | 206 + src/io/io_NL.F | 102 +- src/io/io_NLCC_pwscf.F | 22 +- src/io/io_PH.F | 30 +- src/io/io_QINDX.F | 93 +- src/io/io_QP_and_GF.F | 40 +- src/io/io_RIM.F | 22 +- src/io/io_RIM_W.F | 33 +- src/io/io_RT_components.F | 24 +- src/io/io_RT_components_G_lesser.F | 24 +- src/io/io_RT_components_OBS.F | 24 +- src/io/io_RT_components_Reference.F | 24 +- src/io/io_RT_components_TIME_points.F | 30 +- src/io/io_RT_components_header.F | 32 +- src/io/io_SC_components.F | 24 +- src/io/io_USPP_pwscf.F | 22 +- src/io/io_Vnl.F | 22 +- src/io/io_WF.F | 22 +- src/io/io_X.F | 105 +- src/io/io_descriptors.F | 34 +- src/io/io_gFsq.F | 24 +- src/io/io_header.F | 22 +- src/io/io_out_of_date.F | 22 +- src/io/load_SC_components.F | 24 +- src/io/variables_DIPOLES.F | 30 +- src/io/variables_ELPH.F | 24 +- src/io/variables_NL.F | 152 +- src/io/variables_RT_dynamic.F | 28 +- src/io/variables_RT_static.F | 44 +- src/io/variables_SC.F | 24 +- src/io/variables_X.F | 30 +- src/io/ver_is_gt_or_eq.F | 22 +- src/io_parallel/COLLISIONS_dbname.F | 24 +- src/io_parallel/io_BS_PAR_block.F | 22 +- src/io_parallel/io_BS_PAR_free.F | 22 +- src/io_parallel/io_BS_PAR_init.F | 40 +- src/io_parallel/io_BS_header.F | 22 +- src/io_parallel/io_COLLISIONS.F | 51 +- src/io_parallel/io_COLLISIONS_header.F | 28 +- src/io_parallel/io_DIPOLES.F | 22 +- src/io_parallel/io_Overlaps.F | 22 +- src/io_parallel/variables_BS.F | 72 +- src/io_parallel/variables_BS_more.F | 26 +- src/io_serial/io_BS.F | 22 +- src/io_serial/io_COLLISIONS.F | 32 +- src/io_serial/io_DIPOLES.F | 22 +- src/io_serial/io_Overlaps.F | 22 +- src/io_serial/variables_BS.F | 34 +- src/linear_algebra/LINEAR_ALGEBRA_driver.F | 22 +- src/linear_algebra/MATRIX_slepc.F | 22 +- .../PARALLEL_HERMITIAN_diagonalization.F | 28 +- src/linear_algebra/PARALLEL_M_by_M.F | 22 +- src/linear_algebra/PARALLEL_M_by_V.F | 22 +- src/linear_algebra/PARALLEL_inversion.F | 28 +- src/linear_algebra/PARALLEL_lin_system.F | 22 +- .../SERIAL_HERMITIAN_diagonalization.F | 22 +- src/linear_algebra/SERIAL_SVD_inversion.F | 22 +- src/linear_algebra/SERIAL_diagonalization.F | 22 +- src/linear_algebra/SERIAL_inversion.F | 22 +- src/linear_algebra/SERIAL_lin_system.F | 22 +- src/linear_algebra/SLK_ORTHO_group.F | 11 +- src/linear_algebra/SLK_ORTHO_init.F | 11 +- src/linear_algebra/SLK_setup.F | 22 +- src/linear_algebra/SLK_test.F | 28 +- src/matrices/.objects | 2 +- src/matrices/MATRIX_BSE_to_PAR.F | 22 +- src/matrices/MATRIX_PAR_to_from_PAR.F | 22 +- src/matrices/MATRIX_duplicate.F | 63 +- src/matrices/MATRIX_init.F | 22 +- src/matrices/MATRIX_transfer.F | 22 +- src/matrices/MATRIX_transfer_side_crop.F | 22 +- src/matrices/MATRIX_transpose.F | 64 + src/matrices/SLK_matrix_init.F | 28 +- src/memory/MEM_bits.F | 22 +- src/memory/MEM_defaults.F | 22 +- src/memory/MEM_error.F | 22 +- src/memory/MEM_free.F | 22 +- src/memory/MEM_global_mesg.F | 22 +- src/memory/MEM_library.F | 22 +- src/memory/MEM_manager_alloc.F | 22 +- src/memory/MEM_manager_init.F | 22 +- src/memory/MEM_manager_messages.F | 22 +- src/memory/MEM_report.F | 22 +- src/memory/MEM_treshold_estimate.F | 22 +- src/modules/.objects | 8 +- src/modules/DOUBLE_project.dep | 1 + src/modules/ELPH_project.dep | 1 + src/modules/NL_project.dep | 7 + src/modules/PHEL_project.dep | 2 + src/modules/QED_project.dep | 3 + src/modules/RT_project.dep | 7 + src/modules/SC_project.dep | 7 + src/modules/SET_defaults.F | 45 +- src/modules/SET_logicals.F | 51 +- src/modules/YPP_ELPH_project.dep | 2 + src/modules/mod_ACFDT.F | 22 +- src/modules/mod_BS.F | 23 +- src/modules/mod_BS_solvers.F | 22 +- src/modules/mod_COLL_interfaces.F | 22 +- src/modules/mod_DICHROISM.F | 22 +- src/modules/mod_DIPOLES.F | 22 +- src/modules/mod_D_lattice.F | 22 +- src/modules/mod_ELPH.F | 23 +- src/modules/mod_FFT.F | 22 +- src/modules/mod_H_interfaces.F | 22 +- src/modules/mod_IO.F | 31 +- src/modules/mod_IO_interfaces.F | 25 +- src/modules/mod_LIVE_t.F | 28 +- src/modules/mod_MAGNONS.F | 22 +- src/modules/mod_MPA.F | 739 +++ src/modules/mod_NL_interfaces.F | 22 +- src/modules/mod_OUTPUT.F | 22 +- src/modules/mod_Overlaps.F | 22 +- src/modules/mod_PHEL.F | 22 +- src/modules/mod_PHOTOLUM.F | 22 +- src/modules/mod_POL_FIT.F | 22 +- src/modules/mod_QP.F | 28 +- src/modules/mod_QP_CTL.F | 22 +- src/modules/mod_RT_control.F | 22 +- src/modules/mod_RT_iterative.F | 24 +- src/modules/mod_RT_lifetimes.F | 22 +- src/modules/mod_RT_occupations.F | 22 +- src/modules/mod_RT_operations.F | 22 +- src/modules/mod_RT_output.F | 22 +- src/modules/mod_R_lattice.F | 33 +- src/modules/mod_SC.F | 22 +- src/modules/mod_SLK.F | 22 +- src/modules/mod_TDDFT.F | 29 +- src/modules/mod_X.F | 30 +- src/modules/mod_atom_proj.F | 22 +- src/modules/mod_collision_el.F | 76 +- src/modules/mod_collision_ext.F | 22 +- src/modules/mod_com.F | 23 +- src/modules/mod_com_interfcs.F | 22 +- src/modules/mod_cuda.F | 22 +- src/modules/mod_debug.F | 22 +- src/modules/mod_descriptors.F | 22 +- src/modules/mod_drivers.F | 25 +- src/modules/mod_electric.F | 22 +- src/modules/mod_electrons.F | 22 +- src/modules/mod_fields.F | 22 +- src/modules/mod_frequency.F | 37 +- src/modules/mod_functions.F | 22 +- src/modules/mod_global_XC.F | 22 +- src/modules/mod_hamiltonian.F | 22 +- src/modules/mod_interfaces.F | 46 +- src/modules/mod_interpolate.F | 24 +- src/modules/mod_interpolate_tools.F | 22 +- src/modules/mod_lexical_sort.F | 27 +- src/modules/mod_linear_algebra.F | 22 +- src/modules/mod_logo.F | 22 +- src/modules/mod_magnetic.F | 22 +- src/modules/mod_matrix.F | 22 +- src/modules/mod_matrix_operate.F | 22 +- src/modules/mod_memory.F | 26 +- src/modules/mod_nl_optics.F | 27 +- src/modules/mod_openmp.F | 22 +- src/modules/mod_parallel.F | 26 +- src/modules/mod_parallel_interface.F | 89 +- src/modules/mod_pars.F | 32 +- src/modules/mod_plasma.F | 22 +- src/modules/mod_pseudo.F | 22 +- src/modules/mod_real_time.F | 22 +- src/modules/mod_stderr.F | 22 +- src/modules/mod_timing.F | 11 +- src/modules/mod_units.F | 22 +- src/modules/mod_vec_operate.F | 105 +- src/modules/mod_wave_func.F | 22 +- src/modules/mod_wrapper.F | 86 +- src/modules/mod_wrapper_omp.F | 22 +- src/modules/mod_xc_functionals.F | 22 +- src/modules/mod_zeros.F | 22 +- src/modules/pgipar164Jk4g | 0 src/modules/pgipar1ZyGlEf | 0 src/modules/pgipar2A2EZGu | 0 src/modules/pgipar2bwSQPS | 0 src/nloptics/.objects | 2 + src/nloptics/Berry_polarization.F | 104 - src/nloptics/DIP_polarization.F | 22 +- src/nloptics/DOUBLE_project.dep | 1 - src/nloptics/EXC_macroscopic_JGM.F | 22 +- src/nloptics/EXP_op.F | 22 +- src/nloptics/EXP_step.F | 22 +- src/nloptics/INVINT_step.F | 22 +- src/nloptics/NL_Berry_current.F | 20 +- src/nloptics/NL_Hamiltonian.F | 64 +- src/nloptics/NL_Integrator.F | 22 +- src/nloptics/NL_average_operator.F | 24 +- src/nloptics/NL_build_dG_lesser.F | 22 +- src/nloptics/NL_build_valence_bands.F | 26 +- src/nloptics/NL_current.F | 22 +- src/nloptics/NL_damping.F | 22 +- src/nloptics/NL_databases_IO.F | 22 +- src/nloptics/NL_driver.F | 44 +- src/nloptics/NL_initialize.F | 33 +- src/nloptics/NL_output.F | 22 +- src/nloptics/NL_project.dep | 21 + src/nloptics/NL_start_and_restart.F | 22 +- src/nloptics/RK_basestep.F | 22 +- src/nloptics/el_density_vbands.F | 22 +- src/output/EPS_2_eels.F | 22 +- src/output/EPS_2_moke.F | 22 +- src/output/EPS_2_trasmission_and_reflection.F | 22 +- src/output/K_OUTPUT.F | 34 +- src/output/OUTPUT_driver.F | 22 +- src/output/OUTPUT_unit_conversion.F | 22 +- src/output/X_OUTPUT_driver.F | 22 +- src/output/X_OUTPUT_messages.F | 22 +- src/parallel/.objects | 2 +- src/parallel/ELPH_project.dep | 2 +- src/parallel/NL_project.dep | 1 + src/parallel/PARALLEL_FREQS_setup.F | 22 +- src/parallel/PARALLEL_Haydock_VEC_COMMs.F | 22 +- src/parallel/PARALLEL_MATRIX_distribute.F | 22 +- src/parallel/PARALLEL_PAR_to_PAR_comms_init.F | 22 +- src/parallel/PARALLEL_SETUP_K_scheme.F | 22 +- src/parallel/PARALLEL_SND_RCV_plan.F | 22 +- src/parallel/PARALLEL_Transitions_grouping.F | 22 +- src/parallel/PARALLEL_WF_distribute.F | 22 +- src/parallel/PARALLEL_WF_index.F | 22 +- src/parallel/PARALLEL_add_Q_to_K_list.F | 22 +- src/parallel/PARALLEL_assign_LA_COMMs.F | 22 +- .../PARALLEL_assign_chains_and_COMMs.F | 22 +- .../PARALLEL_build_up_child_INTER_chains.F | 22 +- src/parallel/PARALLEL_check_phase_space.F | 22 +- src/parallel/PARALLEL_collisions.F | 22 +- .../PARALLEL_distribute_BZk_using_IBZk.F | 22 +- .../PARALLEL_get_ENVIRONMENT_structure.F | 22 +- src/parallel/PARALLEL_get_user_structure.F | 22 +- src/parallel/PARALLEL_global_BZINDX.F | 22 +- src/parallel/PARALLEL_global_DIPOLES.F | 22 +- src/parallel/PARALLEL_global_Non_Linear.F | 22 +- .../PARALLEL_global_Phonon_Self_Energy.F | 22 +- src/parallel/PARALLEL_global_Real_Time.F | 22 +- src/parallel/PARALLEL_global_Response_G.F | 22 +- src/parallel/PARALLEL_global_Response_IO.F | 22 +- src/parallel/PARALLEL_global_Response_T.F | 22 +- .../PARALLEL_global_Response_T_transitions.F | 22 +- src/parallel/PARALLEL_global_ScaLapacK.F | 22 +- src/parallel/PARALLEL_global_Self_Energy.F | 48 +- src/parallel/PARALLEL_global_defaults.F | 28 +- src/parallel/PARALLEL_global_dimensions.F | 24 +- src/parallel/PARALLEL_global_indexes.F | 34 +- src/parallel/PARALLEL_global_reset.F | 22 +- src/parallel/PARALLEL_index.F | 22 +- src/parallel/PARALLEL_live_message.F | 22 +- .../PARALLEL_minimal_index_from_overlaping.F | 22 +- src/parallel/PARALLEL_scheme_initialize.F | 22 +- .../PARALLEL_set_the_active_structures.F | 22 +- src/parallel/PARALLEL_structure.F | 22 +- src/parallel/PHEL_project.dep | 2 + src/parallel/QED_project.dep | 2 +- src/parallel/RT_project.dep | 2 + src/parallel/SC_project.dep | 1 + src/parallel/SLK_communicators.F | 22 +- src/parallel/check_for_a_redundant_IO.F | 22 +- src/parser/PARSER_array.F | 22 +- src/parser/PARSER_close_G.F | 22 +- src/parser/PARSER_convert_INT.F | 22 +- src/parser/PARSER_convert_REAL.F | 22 +- src/parser/PARSER_dump_the_additional_lines.F | 22 +- src/parser/PARSER_lib.F | 21 +- src/parser/PARSER_symbols.c | 2 + src/parser/initactivate.F | 22 +- src/parser/initinfio.F | 22 +- src/parser/initverbosity.F | 22 +- src/parser/mod_it_tools.F | 22 +- src/parser/mod_itm.F | 22 +- src/parser/mod_parser_m.F | 22 +- src/ph-el/PHEL_Lifetimes.F | 22 +- src/ph-el/PHEL_Self_Energy.F | 22 +- src/ph-el/PHEL_double_grid_subset.F | 22 +- src/ph-el/PHEL_driver.F | 22 +- src/ph-el/PHEL_from_GF_to_quasiphonons.F | 22 +- src/ph-el/PHEL_k_nearest_table.F | 22 +- src/ph-el/PHEL_project.dep | 10 + src/ph-el/PHEL_screening.F | 22 +- src/ph-el/PH_Grid_Check_Transitions.F | 22 +- src/ph-el/PH_Transitions_Report.F | 22 +- src/ph-el/PH_of.F | 22 +- src/pol_function/ELPH_project.dep | 1 + src/pol_function/OPTICS_driver.F | 24 +- src/pol_function/OPTICS_select_q_and_G.F | 22 +- src/pol_function/X_AVERAGE_do_it.F | 22 +- src/pol_function/X_AVERAGE_setup.F | 22 +- src/pol_function/X_Double_Grid_setup.F | 22 +- src/pol_function/X_GreenF_analytical.F | 22 +- src/pol_function/X_GreenF_convoluted.F | 22 +- src/pol_function/X_GreenF_remap.F | 22 +- src/pol_function/X_delta_part.F | 22 +- src/pol_function/X_dielectric_matrix.F | 76 +- src/pol_function/X_drude.F | 151 +- src/pol_function/X_eh_setup.F | 22 +- src/pol_function/X_half_mat_check.F | 22 +- src/pol_function/X_irredux.F | 55 +- src/pol_function/X_irredux_residuals.F | 47 +- src/pol_function/X_mat_filling.F | 31 +- src/pol_function/X_pre_setup.F | 22 +- src/pol_function/X_redux.F | 62 +- src/qp/.objects | 3 +- src/qp/DOUBLE_project.dep | 1 + src/qp/ELPH_project.dep | 1 + src/qp/QED_Radiative_Lifetimes.F | 22 +- src/qp/QED_Sigma_c.F | 22 +- src/qp/QED_project.dep | 2 + src/qp/QP_Green_Function.F | 22 +- src/qp/QP_W2Sc.F | 24 +- src/qp/QP_bracket.F | 22 +- src/qp/QP_descriptions.F | 28 +- src/qp/QP_driver.F | 104 +- src/qp/QP_expand.F | 22 +- src/qp/QP_interpolate_W.F | 129 +- src/qp/QP_life_transitions.F | 22 +- src/qp/QP_load_SC_xc.F | 22 +- src/qp/QP_logicals.F | 29 +- src/qp/QP_mpa.F | 548 ++ src/qp/QP_newton.F | 256 +- src/qp/QP_of.F | 28 +- src/qp/QP_ppa_EET_terminator.F | 22 +- src/qp/QP_ppa_cohsex.F | 672 +- src/qp/QP_real_axis.F | 105 +- src/qp/QP_report_and_write.F | 22 +- src/qp/QP_secant.F | 22 +- src/qp/QP_secant_driver.F | 22 +- src/qp/QP_states_simmetrize.F | 23 +- src/qp/SC_project.dep | 1 + src/qp/XCo_Hartree_Fock.F | 58 +- src/qp/XCo_driver.F | 22 +- src/qp/XCo_local.F | 22 +- src/qp/XCo_report.F | 22 +- src/qp_control/.objects | 5 +- src/qp_control/QP_DB_message.F | 22 +- src/qp_control/QP_DBs_add_me.F | 22 +- src/qp_control/QP_DBs_merge.F | 22 +- src/qp_control/QP_apply.F | 22 +- src/qp_control/QP_apply_QP.F | 22 +- src/qp_control/QP_apply_dump_user_CTLs.F | 22 +- src/qp_control/QP_apply_interpolate_QP.F | 24 +- src/qp_control/QP_apply_the_ACTION.F | 22 +- src/qp_control/QP_eval_the_FIT.F | 22 +- src/qp_control/QP_fit_energies.F | 22 +- src/qp_control/QP_fit_report.F | 24 +- src/qp_control/QP_fit_widths.F | 22 +- src/qp_control/QP_load_DB.F | 22 +- src/qp_control/QP_load_GFs.F | 26 +- src/real_time_control/.objects | 2 + src/real_time_control/ELPH_project.dep | 1 + src/real_time_control/PHEL_project.dep | 2 + src/real_time_control/RT_Dynamics_is_over.F | 22 +- .../RT_Fluence_and_PI_kind.F | 22 +- .../RT_Lifetimes_merge_driver.F | 22 +- .../RT_Lifetimes_merge_inter_k.F | 22 +- .../RT_Lifetimes_merge_intra_k.F | 22 +- src/real_time_control/RT_Observables.F | 22 +- .../RT_RESTART_database_copy.F | 22 +- src/real_time_control/RT_Rabi_frequency.F | 22 +- .../RT_Rabi_frequency_ALL_and_print.F | 22 +- src/real_time_control/RT_SCATT_project.dep | 3 - src/real_time_control/RT_alloc.F | 28 +- src/real_time_control/RT_apply.F | 22 +- src/real_time_control/RT_average_operator.F | 22 +- src/real_time_control/RT_carriers_number.F | 22 +- src/real_time_control/RT_carriers_object.F | 22 +- .../RT_carriers_temperature.F | 22 +- .../RT_current_AND_polarization.F | 22 +- src/real_time_control/RT_databases_IO.F | 22 +- src/real_time_control/RT_do_it.F | 22 +- src/real_time_control/RT_energy_components.F | 22 +- src/real_time_control/RT_entropy.F | 22 +- src/real_time_control/RT_free.F | 28 +- .../RT_interpolation_doit_and_transfer.F | 22 +- .../RT_interpolation_driver.F | 22 +- src/real_time_control/RT_k_grid.F | 22 +- .../RT_mean_lifetimes_and_temperatures.F | 22 +- src/real_time_control/RT_occupations_FIT.F | 22 +- src/real_time_control/RT_output.F | 22 +- src/real_time_control/RT_output_INIT.F | 22 +- .../RT_output_and_IO_driver.F | 22 +- src/real_time_control/RT_project.dep | 29 + .../RT_update_TIME_CONF_descriptions.F | 22 +- src/real_time_drivers/.objects | 5 +- src/real_time_drivers/DOUBLE_project.dep | 1 - src/real_time_drivers/RT_SCATT_project.dep | 1 + src/real_time_drivers/RT_driver.F | 27 +- src/real_time_drivers/RT_empty_driver.F | 38 - src/real_time_drivers/RT_relaxation.F | 22 +- src/real_time_hamiltonian/.objects | 2 + src/real_time_hamiltonian/RT_Hamiltonian.F | 22 +- .../RT_Hamiltonian_diagonalize.F | 22 +- src/real_time_hamiltonian/RT_apply_field.F | 22 +- src/real_time_hamiltonian/RT_project.dep | 4 + src/real_time_initialize/.objects | 12 +- src/real_time_initialize/DOUBLE_project.dep | 1 - src/real_time_initialize/ELPH_project.dep | 1 + src/real_time_initialize/PHEL_project.dep | 1 + .../RT_Dephasing_Matrix.F | 22 +- src/real_time_initialize/RT_ELPH_initialize.F | 22 +- .../RT_Field_Commensurable_Frequencies.F | 22 +- src/real_time_initialize/RT_G_lesser_init.F | 22 +- src/real_time_initialize/RT_SCATT_project.dep | 1 - src/real_time_initialize/RT_empty.F | 50 - src/real_time_initialize/RT_initialize.F | 28 +- .../RT_occupations_and_levels_init.F | 26 +- .../RT_occupations_update.F | 22 +- src/real_time_initialize/RT_project.dep | 6 + .../RT_start_and_restart.F | 35 +- src/real_time_iterative_el-ph/.objects | 2 + .../ELPH_ITERATIVE_project.dep | 7 + .../RT_ELPH_eq_Kernel.F | 22 +- .../RT_ELPH_iterative_Kernel.F | 22 +- .../RT_ELPH_iterative_init.F | 22 +- .../RT_ELPH_out_of_eq_Kernel.F | 22 +- .../RT_ELPH_zeroing.F | 22 +- .../RT_G_retarded_time.F | 22 +- src/real_time_lifetimes/.objects | 2 + .../RT_Coulomb_Lifetimes.F | 22 +- src/real_time_lifetimes/RT_ELPH_Lifetimes.F | 22 +- src/real_time_lifetimes/RT_ELPH_Q_weights.F | 22 +- .../RT_G_retarded_convolution.F | 22 +- .../RT_Lifetimes_Extrapolation.F | 22 +- .../RT_Lifetimes_evaluation_plan.F | 22 +- .../RT_Lifetimes_save_and_extrap.F | 22 +- .../RT_Lifetimes_use_delta_Occupations.F | 22 +- .../RT_Radiative_Lifetimes.F | 22 +- .../RT_impose_zero_dE_and_dN.F | 22 +- src/real_time_lifetimes/RT_project.dep | 12 + .../RT_relaxation_logicals.F | 22 +- src/real_time_propagation/.objects | 2 + src/real_time_propagation/PHEL_project.dep | 2 + src/real_time_propagation/RT_Dephasing_step.F | 22 +- src/real_time_propagation/RT_EULER_step.F | 22 +- .../RT_EXP_step_accurate.F | 22 +- src/real_time_propagation/RT_EXP_step_std.F | 22 +- src/real_time_propagation/RT_Ext_fields.F | 22 +- src/real_time_propagation/RT_Glesser_evolve.F | 22 +- src/real_time_propagation/RT_Glesser_rotate.F | 22 +- .../RT_INV_step_accurate.F | 22 +- src/real_time_propagation/RT_INV_step_diago.F | 22 +- src/real_time_propagation/RT_INV_step_std.F | 22 +- .../RT_IO_type_time_steps.F | 22 +- src/real_time_propagation/RT_Integrator.F | 26 +- .../RT_Integrator_init.F | 22 +- src/real_time_propagation/RT_MEMORY_index.F | 22 +- .../RT_PHEL_Scattering_step.F | 22 +- .../RT_SCATT_project.dep | 3 + .../RT_Scattering_step.F | 22 +- src/real_time_propagation/RT_apply_RWA.F | 22 +- .../RT_build_T1_and_T2.F | 22 +- .../RT_occupations_eval.F | 22 +- src/real_time_propagation/RT_project.dep | 20 + .../RT_propagate_fields.F | 22 +- .../RT_time_step_update.F | 28 +- src/sc/.objects | 2 + src/sc/ELECTR_initial_check.F | 22 +- src/sc/OEP_ApplySigmaCSX.F | 24 +- src/sc/OEP_ApplySigmaX.F | 24 +- src/sc/OEP_Hole.F | 22 +- src/sc/OEP_Weighted_Density.F | 22 +- src/sc/OEP_app_inversion.F | 22 +- src/sc/OEP_driver.F | 22 +- src/sc/OEP_exact_inversion.F | 22 +- src/sc/OEP_iterative.F | 22 +- src/sc/SC_Energy.F | 22 +- src/sc/SC_History.F | 22 +- src/sc/SC_add_XC.F | 22 +- src/sc/SC_add_efield.F | 22 +- src/sc/SC_driver.F | 28 +- src/sc/SC_precondition.F | 22 +- src/sc/SC_project.dep | 18 + src/sc/SC_start_and_restart.F | 22 +- src/sc/V_Mean_Potential.F | 22 +- src/setup/External_corrections.F | 22 +- src/setup/G_shells_finder.F | 22 +- src/setup/PARALLEL_and_IO_Setup.F | 22 +- src/setup/QP_state_table_setup.F | 22 +- src/setup/SET_job_strings_and_dirs.F | 22 +- src/setup/build_spin_sop.F | 22 +- src/setup/build_xc_spin_map.F | 22 +- src/setup/check_periodic_directions.F | 22 +- src/setup/eval_Mtot.F | 22 +- src/setup/eval_minus_G.F | 22 +- src/setup/setup.F | 29 +- src/stop_and_restart/CLOSE_the_run.F | 22 +- src/stop_and_restart/STOP_now.F | 22 +- src/tddft/TDDFT_ALDA_G_space.F | 27 +- src/tddft/TDDFT_ALDA_R_space.F | 94 +- src/tddft/TDDFT_ALDA_lower_cutoff.F | 63 +- src/tddft/TDDFT_BSK_2_FXC.F | 22 +- src/tddft/TDDFT_BSK_disk_2_FXC.F | 22 +- src/tddft/TDDFT_PF_coefficient.F | 22 +- src/tddft/TDDFT_do_X_W_typs.F | 22 +- src/timing/TIMING_clock_write.F | 22 +- src/timing/TIMING_overview.F | 22 +- src/tools/c_printing.c | 22 +- src/tools/io.c | 1 + src/wf_and_fft/NL_project.dep | 3 - src/wf_and_fft/PP_compute_becp.F | 22 +- src/wf_and_fft/PP_rotate_becp.F | 22 +- src/wf_and_fft/PP_scatterBamp_init.F | 22 +- src/wf_and_fft/PP_uspp_init.F | 22 +- src/wf_and_fft/PP_vloc_augment.F | 22 +- src/wf_and_fft/WF_alloc.F | 22 +- src/wf_and_fft/WF_apply_symm.F | 36 +- src/wf_and_fft/WF_apply_symm_incl.F | 22 +- src/wf_and_fft/WF_derivative.F | 24 +- src/wf_and_fft/WF_free.F | 22 +- src/wf_and_fft/WF_load.F | 21 +- src/wf_and_fft/WF_rotate.F | 24 +- src/wf_and_fft/WF_shift_kpoint.F | 22 +- src/wf_and_fft/WF_spatial_inversion.F | 22 +- src/wf_and_fft/WF_symm.F | 22 +- src/wf_and_fft/WF_symm_kpoint.F | 30 +- src/wf_and_fft/WF_symm_kpoint_incl.F | 22 +- src/wf_and_fft/eval_GradOperator.F | 22 +- src/wf_and_fft/eval_R_minus_R.F | 22 +- src/wf_and_fft/fft_1d.F | 24 +- src/wf_and_fft/fft_3d_cuda.F | 22 +- src/wf_and_fft/fft_3d_fftw.F | 22 +- src/wf_and_fft/fft_3d_qe.F | 23 +- src/wf_and_fft/fft_3d_sg.F | 22 +- src/wf_and_fft/fft_check_size.F | 22 +- src/wf_and_fft/fft_desc_init.F | 22 +- src/wf_and_fft/fft_free.F | 22 +- src/wf_and_fft/fft_setup.F | 22 +- src/wf_and_fft/load_cc.F | 22 +- src/wf_and_fft/scatter_Bamp.F | 67 +- src/wf_and_fft/scatter_Bamp_incl.F | 29 +- src/wf_and_fft/scatter_Bamp_spin.F | 22 +- .../scatter_Bamp_using_the_gradient.F | 22 +- src/wf_and_fft/scatter_Gamp.F | 59 +- src/wf_and_fft/scatter_Gamp_incl.F | 22 +- src/wf_and_fft/scatter_Modscr.F | 22 +- src/xc_functionals/Build_F_xc_mat.F | 54 +- src/xc_functionals/Build_V_xc_mat.F | 22 +- src/xc_functionals/RT_project.dep | 2 + src/xc_functionals/XC_eval_gga_kernel.F | 22 +- src/xc_functionals/XC_eval_gga_potential.F | 29 +- src/xc_functionals/XC_eval_lda_kernel.F | 37 +- src/xc_functionals/XC_eval_pbe-gaux.F | 22 +- src/xc_functionals/XC_libxc_driver.F | 119 +- src/xc_functionals/XC_nlcc_setup.F | 22 +- src/xc_functionals/XC_potential_driver.F | 22 +- src/xc_functionals/el_density_and_current.F | 31 +- src/xc_functionals/el_density_matrix.F | 22 +- src/xc_functionals/el_density_of_states.F | 39 +- src/xc_functionals/el_magnetization.F | 22 +- src/xc_functionals/el_magnetization_matrix.F | 22 +- src/xc_functionals/xc_rpa_kp.F | 22 +- ypp/bits/WANNIER_driver.F | 22 +- ypp/bits/WF_map_perturbative_SOC.F | 22 +- ypp/dipoles/DIPOLE_ypp_driver.F | 22 +- ypp/el-ph/ELPH_atomic_amplitude.F | 22 +- ypp/el-ph/ELPH_databases.F | 22 +- ypp/el-ph/ELPH_databases_IO_elemental.F | 22 +- ypp/el-ph/ELPH_databases_IO_freqs.F | 22 +- ypp/el-ph/ELPH_databases_IO_gkkp_expand.F | 22 +- ypp/el-ph/ELPH_databases_IO_grids_check.F | 22 +- ypp/el-ph/ELPH_databases_IO_modes.F | 22 +- ypp/el-ph/ELPH_databases_IO_pol_and_freqs.F | 22 +- .../ELPH_databases_IO_transfer_and_write.F | 22 +- ypp/el-ph/ELPH_double_grid.F | 24 +- ypp/el-ph/ELPH_eliashberg_dos.F | 22 +- ypp/el-ph/ELPH_excitonic_gkkp.F | 22 +- ypp/el-ph/ELPH_general_gFsq.F | 22 +- ypp/el-ph/ELPH_plot_gkkp.F | 22 +- ypp/el-ph/Eliashberg_Dos_Func.F | 22 +- ypp/el-ph/YPP_ELPH_project.dep | 16 + ypp/electrons/ELPH_project.dep | 2 - ypp/electrons/RT_project.dep | 2 - ypp/electrons/SC_project.dep | 4 - ypp/electrons/YPP_SC_project.dep | 3 + ypp/electrons/electrons_WFs.F | 22 +- .../electrons_WFs_proj_interpolate.F | 22 +- ypp/electrons/electrons_angular_momentum.F | 22 +- ypp/electrons/electrons_bands.F | 24 +- ypp/electrons/electrons_bands_interpolate.F | 24 +- ypp/electrons/electrons_current.F | 22 +- ypp/electrons/electrons_density.F | 22 +- ypp/electrons/electrons_dos.F | 95 +- ypp/electrons/electrons_dos_elemental.F | 53 +- ypp/electrons/electrons_dos_setup.F | 22 +- ypp/electrons/electrons_driver.F | 22 +- ypp/electrons/electrons_magn_factors.F | 22 +- ypp/electrons/electrons_magnetization.F | 22 +- ypp/electrons/electrons_pdos_factors.F | 22 +- ypp/electrons/electrons_position.F | 22 +- .../electrons_spin_and_magn_interpolate.F | 25 +- ypp/electrons/electrons_spin_factors.F | 22 +- ypp/excitons/ELPH_project.dep | 2 - ypp/excitons/RT_project.dep | 2 - ypp/excitons/YPP_ELPH_project.dep | 1 + ypp/excitons/excitons_WFs.F | 22 +- ypp/excitons/excitons_amplitudes.F | 22 +- ypp/excitons/excitons_bands.F | 22 +- ypp/excitons/excitons_degeneracy_average.F | 22 +- ypp/excitons/excitons_driver.F | 22 +- ypp/excitons/excitons_find_degeneracies.F | 22 +- ypp/excitons/excitons_interpolate_setup.F | 22 +- ypp/excitons/excitons_kinematics.F | 22 +- ypp/excitons/excitons_ph_ass_dos.F | 32 +- ypp/excitons/excitons_read.F | 22 +- ypp/excitons/excitons_sort_and_report.F | 22 +- ypp/excitons/excitons_spin.F | 22 +- ypp/interface/ELPH_project.dep | 3 - ypp/interface/INIT_load_ypp.F | 25 +- ypp/interface/INIT_ypp.F | 28 +- ypp/interface/NL_project.dep | 3 - ypp/interface/QP_DBs_initialize.F | 22 +- ypp/interface/RT_project.dep | 3 - ypp/interface/SC_project.dep | 3 - ypp/k-points/ELPH_project.dep | 2 - .../k_FineGd_grid_consistency_check.F | 22 +- ypp/k-points/k_circuit_driver.F | 22 +- .../k_circuit_made_of_special_points.F | 22 +- ypp/k-points/k_circuit_made_of_user_points.F | 22 +- ypp/k-points/k_find_border_and_merge.F | 22 +- ypp/k-points/k_grid_printer.F | 22 +- ypp/k-points/k_grids.F | 24 +- ypp/k-points/k_map_E_fine.F | 22 +- ypp/k-points/k_map_fine_to_coarse.F | 22 +- ypp/k-points/k_map_fine_to_coarse_driver.F | 22 +- ypp/k-points/k_map_fine_to_coarse_engine.F | 22 +- ypp/k-points/k_map_fine_to_coarse_init.F | 27 +- ypp/k-points/k_map_fine_to_coarse_reduce.F | 22 +- ypp/k-points/k_random.F | 22 +- ypp/k-points/k_special.F | 22 +- ypp/modules/.objects | 8 +- ypp/modules/ELPH_project.dep | 2 - ypp/modules/NL_project.dep | 2 - ypp/modules/RT_project.dep | 3 - ypp/modules/SC_project.dep | 2 - ypp/modules/YPP_NL_project.dep | 1 + ypp/modules/YPP_SET_defaults.F | 25 +- ypp/modules/mod_YPP.F | 22 +- ypp/modules/mod_YPP_ELPH.F | 24 +- ypp/modules/mod_YPP_interfaces.F | 28 +- ypp/modules/mod_YPP_real_time.F | 24 +- ypp/modules/mod_YPP_symm.F | 22 +- ypp/plotting/PROJECTION_axis.F | 22 +- .../PROJECTION_k_on_the_path_or_plane.F | 22 +- .../PROJECTION_perpendicular_sampling.F | 22 +- ypp/plotting/PROJECTION_plot.F | 22 +- ypp/plotting/PROJECTION_setup.F | 22 +- ypp/plotting/RT_plot_interpolated_values.F | 22 +- ypp/plotting/RT_project.dep | 3 - ypp/plotting/SC_project.dep | 2 - ypp/plotting/YPP_RT_project.dep | 1 + ypp/plotting/plot_and_project_1D.F | 22 +- ypp/plotting/plot_check_and_launch.F | 22 +- ypp/plotting/plot_cube.F | 22 +- ypp/plotting/plot_gnuplot.F | 22 +- ypp/plotting/plot_interpolated_values.F | 22 +- ypp/plotting/plot_xcrysden.F | 22 +- ypp/qp/QP_DB_expand.F | 22 +- ypp/qp/QP_DBs_create_and_modify.F | 22 +- ypp/qp/QP_DBs_manipulate.F | 22 +- ypp/real_time/NL_exc_driver.F | 22 +- ypp/real_time/NL_project.dep | 2 - ypp/real_time/NL_ypp_driver.F | 22 +- ypp/real_time/RT_1D_Fourier_Transform.F | 22 +- ypp/real_time/RT_1D_Fourier_setup.F | 22 +- ypp/real_time/RT_DBs_carriers_setup.F | 22 +- ypp/real_time/RT_Fermi_excitation.F | 22 +- ypp/real_time/RT_G_two_times_build.F | 22 +- ypp/real_time/RT_G_two_times_driver.F | 22 +- .../RT_G_two_times_interp_and_plot.F | 22 +- ypp/real_time/RT_OBSERVABLES_IO.F | 22 +- ypp/real_time/RT_OBSERVABLES_IO_path.F | 22 +- ypp/real_time/RT_OBSERVABLES_damp_and_write.F | 22 +- ypp/real_time/RT_Polarization.F | 22 +- ypp/real_time/RT_TRabs_driver.F | 22 +- ypp/real_time/RT_TRabs_output.F | 22 +- ypp/real_time/RT_TRabs_residuals.F | 22 +- ypp/real_time/RT_X_LRR_real_field.F | 22 +- ypp/real_time/RT_X_effective.F | 22 +- ypp/real_time/RT_X_inversion.F | 22 +- ypp/real_time/RT_X_qssin.F | 22 +- ypp/real_time/RT_X_response.F | 22 +- ypp/real_time/RT_apply_Texp.F | 22 +- ypp/real_time/RT_coefficients_Fourier.F | 22 +- ypp/real_time/RT_coefficients_Inversion.F | 50 +- ypp/real_time/RT_components_energy_plot.F | 22 +- ypp/real_time/RT_damp_it.F | 22 +- ypp/real_time/RT_density.F | 22 +- ypp/real_time/RT_dos_time_plot.F | 49 +- ypp/real_time/RT_manual_excitation.F | 22 +- ypp/real_time/RT_occ_bands_interpolation.F | 22 +- ypp/real_time/RT_occ_time_plot.F | 22 +- ypp/real_time/RT_occupations_driver.F | 22 +- ypp/real_time/RT_split_Polarization.F | 22 +- ypp/real_time/RT_time_configuration_setup.F | 22 +- ypp/real_time/RT_ypp_driver.F | 22 +- ypp/real_time/YPP_NL_project.dep | 3 + ypp/real_time/YPP_RT_project.dep | 28 + ypp/symmetries/SC_project.dep | 2 - ypp/symmetries/YPP_SC_project.dep | 1 + ypp/symmetries/fix_ATOMPROJs.F | 22 +- ypp/symmetries/fix_PPs.F | 22 +- ypp/symmetries/fix_QP_DBs.F | 22 +- ypp/symmetries/fix_SC_DBs.F | 22 +- ypp/symmetries/fix_WFs_Gshells.F | 22 +- ypp/symmetries/fix_WFs_and_E.F | 22 +- ypp/symmetries/fix_symmetries.F | 22 +- ypp/symmetries/k_build_map.F | 22 +- ypp/symmetries/symmetries_driver.F | 22 +- 1216 files changed, 22307 insertions(+), 22165 deletions(-) create mode 100644 config/m4/acx_stripe_subpath.m4 create mode 100644 config/m4/acx_version.m4 create mode 100644 config/m4/yambo_driver.m4 create mode 100644 driver/ypp_project.dep rename {config => include}/version/version.m4 (59%) 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 rename config/m4/ydriver.m4 => lib/archive/Ydriver-src/config/defs.mk.in (57%) 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 rename include/driver/version.h => lib/archive/Ydriver-src/example/include/example_driver.h (86%) 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 create mode 100755 sbin/check_packages.sh create mode 100755 sbin/compilation/name_me.sh create mode 100755 sbin/compilation/verbosity.sh create mode 100755 sbin/developer_tools/copyright.sh delete mode 100755 sbin/developer_tools/recursive_year_update.sh create mode 100644 src/allocations/ELPH_project.dep create mode 100644 src/bz_ops/NL_project.dep create mode 100644 src/collisions/NL_project.dep create mode 100644 src/collisions/SC_project.dep create mode 100644 src/common/FREQUENCIES_mpa_sampling.F create mode 100644 src/common/f_build_ext.F create mode 100644 src/common/pgipar1XQrolt create mode 100644 src/common/pgipar2Yy1LOK create mode 100644 src/driver/NL_project.dep delete mode 100644 src/driver/RT_project.dep rename src/el-ph/{ELPH_GreenF.F => ELPH_Sigma_c_engine.F} (86%) create mode 100644 src/el-ph/ELPH_project.dep create mode 100644 src/el-ph/Eval_Efermi_DbGd.F create mode 100644 src/el-ph/PHEL_project.dep create mode 100644 src/el-ph/RT_project.dep create mode 100644 src/el-ph/get_ph_E_DbGd.F delete mode 100644 src/io/RT_SCATT_project.dep create mode 100644 src/io/io_MPA.F create mode 100644 src/matrices/MATRIX_transpose.F create mode 100644 src/modules/PHEL_project.dep create mode 100644 src/modules/YPP_ELPH_project.dep create mode 100644 src/modules/mod_MPA.F create mode 100644 src/modules/pgipar164Jk4g create mode 100644 src/modules/pgipar1ZyGlEf create mode 100644 src/modules/pgipar2A2EZGu create mode 100644 src/modules/pgipar2bwSQPS delete mode 100644 src/nloptics/Berry_polarization.F create mode 100644 src/nloptics/NL_project.dep create mode 100644 src/ph-el/PHEL_project.dep create mode 100644 src/qp/QP_mpa.F create mode 100644 src/real_time_control/PHEL_project.dep delete mode 100644 src/real_time_control/RT_SCATT_project.dep delete mode 100644 src/real_time_drivers/RT_empty_driver.F create mode 100644 src/real_time_hamiltonian/RT_project.dep delete mode 100644 src/real_time_initialize/RT_empty.F create mode 100644 src/real_time_iterative_el-ph/ELPH_ITERATIVE_project.dep create mode 100644 src/real_time_lifetimes/RT_project.dep create mode 100644 src/real_time_propagation/PHEL_project.dep create mode 100644 src/real_time_propagation/RT_SCATT_project.dep create mode 100644 src/real_time_propagation/RT_project.dep create mode 100644 src/sc/SC_project.dep delete mode 100644 src/wf_and_fft/NL_project.dep create mode 100644 ypp/el-ph/YPP_ELPH_project.dep delete mode 100644 ypp/electrons/ELPH_project.dep delete mode 100644 ypp/electrons/RT_project.dep delete mode 100644 ypp/electrons/SC_project.dep delete mode 100644 ypp/excitons/ELPH_project.dep delete mode 100644 ypp/excitons/RT_project.dep delete mode 100644 ypp/interface/ELPH_project.dep delete mode 100644 ypp/interface/NL_project.dep delete mode 100644 ypp/interface/RT_project.dep delete mode 100644 ypp/interface/SC_project.dep delete mode 100644 ypp/k-points/ELPH_project.dep delete mode 100644 ypp/modules/ELPH_project.dep delete mode 100644 ypp/modules/NL_project.dep delete mode 100644 ypp/modules/RT_project.dep delete mode 100644 ypp/modules/SC_project.dep delete mode 100644 ypp/plotting/RT_project.dep delete mode 100644 ypp/plotting/SC_project.dep delete mode 100644 ypp/real_time/NL_project.dep create mode 100644 ypp/real_time/YPP_RT_project.dep delete mode 100644 ypp/symmetries/SC_project.dep diff --git a/.gitattributes b/.gitattributes index 3d36373fca..7ef701fc0e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,2 @@ -configure merge=keepTheirs -config/version/version.m4 merge=keepTheirs -include/driver/version.h merge=keepTheirs +configure merge=keepTheirs +include/version/version.m4 merge=keepTheirs diff --git a/.gitignore b/.gitignore index 3970dc129f..9c716c4ba8 100644 --- a/.gitignore +++ b/.gitignore @@ -34,15 +34,16 @@ lib/archive/git.list *.save *.f90 *.s -*.sw* +*.swp* *dSYM *bk # source # ########## -lib/archive/yambo-libraries-1.0/ -lib/yambo/driver/yambo/include/editor.h -lib/yambo/driver/yambo/include/version.h +lib/archive/Ydriver +lib/yambo/Ydriver/yambo/include/editor.h +lib/yambo/Ydriver/yambo/include/version.h +include/version/version.h include/driver/editor.h include/branch.inc src/tools/.objects diff --git a/Makefile b/Makefile index 6b5ca4dd0b..b08f97c739 100644 --- a/Makefile +++ b/Makefile @@ -1,31 +1,16 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): AM, DS +# Copyright (C) 2006 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. -# -# 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. +# Authors (see AUTHORS file for details): AM DS # ifeq ($(wildcard config/mk/global/defs.mk),config/mk/global/defs.mk) include config/mk/global/defs.mk include config/mk/defs.mk else ifeq ($(MAKECMDGOALS), download) -else ifeq ($(MAKECMDGOALS), check) +else ifeq ($(MAKECMDGOALS), check-files) +else ifeq ($(MAKECMDGOALS), check-packages) else include config/mk/global/no_configure_help.mk endif @@ -38,7 +23,7 @@ include config/mk/global/targets.mk # Libraries (ordered for compiling & linking) include config/mk/global/libraries.mk -.PHONY: interfaces ypp +.PHONY: interfaces ypp nothing: @$(call yambo_help,"header") @@ -64,6 +49,8 @@ nl-project: @for target in $(NL_PROJ) ; do $(MAKE) $(MAKEFLAGS) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; break;fi ; done rtext-project: @for target in $(RTE_PROJ) ; do $(MAKE) $(MAKEFLAGS) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; break;fi ; done +mod-project: + @for target in $(MOD_PROJ) ; do $(MAKE) $(MAKEFLAGS) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; break;fi ; done kerr-project: @for target in $(KERR_PROJ); do $(MAKE) $(MAKEFLAGS) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; break;fi ; done main: @@ -76,7 +63,7 @@ int-libs: @for target in $(INT_LIBS) ; do $(MAKE) $(MAKEFLAGS) $$target; done yambo-int-libs: @for target in $(YAMBO_INT_LIBS) ; do $(MAKE) $(MAKEFLAGS) $$target; done -conf-check: +check-packages: @$(global_check) # #===================== @@ -114,7 +101,7 @@ libs: ext-libs int-libs # Yambo include config/mk/global/actions/compile_yambo.mk # -# Interfaces # +# Interfaces include config/mk/global/actions/compile_interfaces.mk # # YPP @@ -127,7 +114,7 @@ include config/mk/global/actions/clean.mk # Functions #=========== # -# Global Configuration Check (DOUBLE, FFTW ...) +# Global Configuration Check include config/mk/global/functions/global_check.mk # # Libraries download/clone/checkout diff --git a/config/configure.ac b/config/configure.ac index 51d623ffc7..37a8129a2e 100644 --- a/config/configure.ac +++ b/config/configure.ac @@ -1,27 +1,11 @@ # -# Copyright (C) 2000-2019 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): AM, DS +# 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 DS # -# 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. -# -m4_include([config/version/version.m4]) +m4_include([include/version/version.m4]) # CURRENT_DIR=`echo "$PWD" | sed -e "s/ /X/g"` if ! test -d $CURRENT_DIR ; then @@ -41,7 +25,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/ydriver.m4]) +m4_include([config/m4/yambo_driver.m4]) # # General # @@ -56,15 +40,18 @@ m4_include([config/m4/acx_get_mpi_kind.m4]) m4_include([config/m4/acx_fortran_flags.m4]) m4_include([config/m4/acx_mpi.m4]) m4_include([config/m4/cuda.m4]) +m4_include([config/m4/acx_version.m4]) m4_include([config/m4/acx_branch.m4]) m4_include([config/m4/acx_IO_wrap_up.m4]) # # Report # +m4_include([config/m4/acx_stripe_subpath.m4]) m4_include([config/m4/acx_report.m4]) # ============================================================================ -# Echo -AC_PROG_ECHO +# version.m4 -> version.h +ACX_VERSION +# # ============================================================================ # Current branch ACX_BRANCH @@ -77,7 +64,6 @@ AC_C_CONST AC_C_INLINE AC_FUNC_MALLOC AC_FUNC_REALLOC -# AC_FUNC_SETVBUF_REVERSE # This is reported as obsolete AC_FUNC_STAT AC_PROG_MAKE_SET # ============================================================================ @@ -304,9 +290,7 @@ AC_CONFIG_FILES([ config/setup config/mk/global/defs.mk config/report config/msg_ydb src/wf_and_fft/sgfft.F src/tools/.objects config/mk/local/defs.mk config/mk/defs.mk sbin/compilation/helper.inc.sh - include/branch.inc include/driver/editor.h - lib/archive/git.list -]) + include/branch.inc include/driver/editor.h lib/archive/git.list ]) # AC_OUTPUT # diff --git a/config/m4/acx_IO_wrap_up.m4 b/config/m4/acx_IO_wrap_up.m4 index 1099d68d61..96d58030eb 100644 --- a/config/m4/acx_IO_wrap_up.m4 +++ b/config/m4/acx_IO_wrap_up.m4 @@ -1,25 +1,9 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): AM +# Copyright (C) 2022 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. -# -# 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. +# Authors (see AUTHORS file for details): AM # AC_DEFUN([ACX_IO_WRAP_UP], [ diff --git a/config/m4/acx_branch.m4 b/config/m4/acx_branch.m4 index 93b30d9686..7f143bd893 100644 --- a/config/m4/acx_branch.m4 +++ b/config/m4/acx_branch.m4 @@ -1,25 +1,9 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2016 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. -# -# 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 # AC_DEFUN([ACX_BRANCH], [ diff --git a/config/m4/acx_cpp.m4 b/config/m4/acx_cpp.m4 index cbfc372462..8dcee5fd7b 100644 --- a/config/m4/acx_cpp.m4 +++ b/config/m4/acx_cpp.m4 @@ -1,25 +1,9 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2008 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 # AC_DEFUN([ACX_CPP], [ @@ -28,6 +12,9 @@ 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* ) diff --git a/config/m4/acx_fortran_flags.m4 b/config/m4/acx_fortran_flags.m4 index 01c9533b11..3e5fcdb5e7 100644 --- a/config/m4/acx_fortran_flags.m4 +++ b/config/m4/acx_fortran_flags.m4 @@ -1,25 +1,9 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2010 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. -# -# 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 # # ################################################ # Set FC FLAGS @@ -37,13 +21,13 @@ if test x"$enable_debug_flags" = "x"; then enable_debug_flags="no"; fi HDF5_MODE="production"; # def_compiler= +SLK_FC_FLAGS="" # case "${host}" in i?86*linux*) case "${FC}" in *pgf9* | *ftn* | *pgfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" - #FUFLAGS="-O0 -g -Mbackslash" + SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" FUFLAGS="-O0 -Mbackslash" FCMFLAG="-Mnomain" OMPFLAGS="-mp" @@ -52,7 +36,7 @@ i?86*linux*) DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame -Mbackslash" ;; *nvfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" FUFLAGS="-O0 -Mbackslash" FCMFLAG="-Mnomain" OMPFLAGS="-mp" @@ -81,6 +65,7 @@ i?86*linux*) *gfortran*) SYSFLAGS="-O3 -g -mtune=native" FUFLAGS="-O0 -mtune=native" + SLK_FC_FLAGS="-fallow-argument-mismatch" FCMFLAG="" OMPFLAGS="-fopenmp" NETCDFFLAGS="-DgFortran" @@ -98,7 +83,7 @@ i?86*linux*) ;; *2021* ) CPU_FLAG=" " - OMPFLAGS="-qopenmp" + OMPFLAGS="-qopenmp -parallel" FCMFLAG="-nofor-main" ;; *17* | *18* | *19* ) @@ -133,7 +118,7 @@ i?86*linux*) *86*apple* ) case "${FC}" in *pgf9* | *ftn* | *pgfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" FUFLAGS="-O0 -g -Mbackslash" FCMFLAG="-Mnomain" OMPFLAGS="-mp" @@ -141,7 +126,7 @@ i?86*linux*) DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" ;; *nvfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" FUFLAGS="-O0 -g -Mbackslash" FCMFLAG="-Mnomain" OMPFLAGS="-mp" @@ -152,6 +137,7 @@ i?86*linux*) *gfortran*) SYSFLAGS="-O3 -g -mtune=native" FUFLAGS="-O0 -g -mtune=native" + SLK_FC_FLAGS="-fallow-argument-mismatch" FCMFLAG="" OMPFLAGS="-fopenmp" NETCDFFLAGS="-DgFortran" @@ -190,7 +176,8 @@ i?86*linux*) ia64*linux* ) case "${FC}" in *pgf9* | *ftn* | *pgfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" + #SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" FUFLAGS="-O0 -g -Mbackslash" FCMFLAG="-Mnomain" OMPFLAGS="-mp" @@ -199,7 +186,7 @@ ia64*linux* ) DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" ;; *nvfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" FUFLAGS="-O0 -g -Mbackslash" FCMFLAG="-Mnomain" OMPFLAGS="-mp" @@ -210,6 +197,7 @@ ia64*linux* ) *gfortran*) SYSFLAGS="-O3 -g -mtune=native" FUFLAGS="-O0 -g -mtune=native" + SLK_FC_FLAGS="-fallow-argument-mismatch" FCMFLAG="" OMPFLAGS="-fopenmp" NETCDFFLAGS="-DgFortran" @@ -282,6 +270,7 @@ ia64*linux* ) *gfortran*) SYSFLAGS="-O3 -g -mtune=native" FUFLAGS="-O0 -g -mtune=native" + SLK_FC_FLAGS="-fallow-argument-mismatch" FCMFLAG="" OMPFLAGS="-fopenmp" NETCDFFLAGS="-DgFortran" @@ -313,7 +302,7 @@ ia64*linux* ) ;; *2020* | *2021* ) CPU_FLAG=" " - OMPFLAGS="-qopenmp" + OMPFLAGS="-qopenmp -parallel" FCMFLAG="-nofor-main" CFLAGS="-O2 -std=gnu99" ;; @@ -365,7 +354,7 @@ alphaev*) powerpc64*linux* ) case "${FC}" in *pgf9* | *ftn* | *pgfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" FUFLAGS="-O0 -g -Mbackslash" FCMFLAG="-Mnomain" OMPFLAGS="-mp" @@ -374,7 +363,7 @@ powerpc64*linux* ) DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" ;; *nvfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" FUFLAGS="-O0 -g -Mbackslash" FCMFLAG="-Mnomain" OMPFLAGS="-mp" @@ -385,6 +374,7 @@ powerpc64*linux* ) *gfortran*) SYSFLAGS="-O3 -g -mtune=native" FUFLAGS="-O0 -g -mtune=native" + SLK_FC_FLAGS="-fallow-argument-mismatch" FCMFLAG="" OMPFLAGS="-fopenmp" NETCDFFLAGS="-DgFortran" @@ -449,6 +439,7 @@ AC_MSG_RESULT([$NETCDFFLAGS]) AC_SUBST(CFLAGS) AC_SUBST(FCFLAGS) AC_SUBST(FCUFLAGS) +AC_SUBST(SLK_FC_FLAGS) AC_SUBST(FUFLAGS) AC_SUBST(FCMFLAG) AC_SUBST(OMPFLAGS) diff --git a/config/m4/acx_fpp.m4 b/config/m4/acx_fpp.m4 index 99bbc30011..c2c2079b7a 100644 --- a/config/m4/acx_fpp.m4 +++ b/config/m4/acx_fpp.m4 @@ -1,25 +1,9 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2008 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 # AC_DEFUN([ACX_FPP], [ @@ -69,16 +53,16 @@ cat > conftest.F << EOF_ 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 -i "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 -i "warning" conftest.er2`" || test -n "`grep "command line remark" conftest.er2`" ) ; then acx_FC_ok=no ; FPP_TESTS_PASSED=no; diff --git a/config/m4/acx_get_fc_kind.m4 b/config/m4/acx_get_fc_kind.m4 index 25d918d916..7b5d643d5e 100644 --- a/config/m4/acx_get_fc_kind.m4 +++ b/config/m4/acx_get_fc_kind.m4 @@ -1,25 +1,9 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2007 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. -# -# 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 # AC_DEFUN([ACX_GET_FC_KIND], [ diff --git a/config/m4/acx_get_mpi_kind.m4 b/config/m4/acx_get_mpi_kind.m4 index a6bc9ce95a..b7ff7fd6bb 100644 --- a/config/m4/acx_get_mpi_kind.m4 +++ b/config/m4/acx_get_mpi_kind.m4 @@ -1,25 +1,9 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2016 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. -# -# 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 # AC_DEFUN([ACX_GET_MPI_KIND], [ diff --git a/config/m4/acx_misc.m4 b/config/m4/acx_misc.m4 index 08ad322e28..c0a324aab2 100644 --- a/config/m4/acx_misc.m4 +++ b/config/m4/acx_misc.m4 @@ -1,27 +1,11 @@ # # Copyright (C) 2002 M. Marques, A. Castro, A. Rubio, G. Bertsch # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2006 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. -# -# 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 # ################################################ # Check size of a pointer diff --git a/config/m4/acx_mpi.m4 b/config/m4/acx_mpi.m4 index 7a2d2db056..df1cf72dfb 100644 --- a/config/m4/acx_mpi.m4 +++ b/config/m4/acx_mpi.m4 @@ -2,27 +2,11 @@ # Original version Available from the GNU Autoconf Macro Archive at: # http://autoconf-archive.cryp.to/macros-by-category.html # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): AM, DS +# Copyright (C) 2006 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. -# -# 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. +# Authors (see AUTHORS file for details): AM DS # AC_DEFUN([ACX_MPI], [ AC_PREREQ([2.50]) dnl for AC_LANG_CASE diff --git a/config/m4/acx_report.m4 b/config/m4/acx_report.m4 index 804050e5d0..c0f0e360f7 100644 --- a/config/m4/acx_report.m4 +++ b/config/m4/acx_report.m4 @@ -1,25 +1,9 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2006 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 # AC_DEFUN([ACX_REPORT], [ @@ -242,4 +226,133 @@ AC_SUBST(YPY_check) AC_SUBST(LIBXC_check) AC_SUBST(MPI_check) AC_SUBST(MPI_info) +# +# STRIPE [LIB] from paths +# +ACX_STRIPE_SUBPATH($IOTK_LIBS,"LIB") +IOTK_LIBS_R=$STRIPE +ACX_STRIPE_SUBPATH($IOTK_INCS,"INC") +IOTK_INCS_R=$STRIPE +AC_SUBST(IOTK_LIBS_R) +AC_SUBST(IOTK_INCS_R) +# +ACX_STRIPE_SUBPATH($YAML_LIBS,"LIB") +YAML_LIBS_R=$STRIPE +ACX_STRIPE_SUBPATH($YAML_INCS,"INC") +YAML_INCS_R=$STRIPE +AC_SUBST(YAML_LIBS_R) +AC_SUBST(YAML_INCS_R) +# +ACX_STRIPE_SUBPATH($FUTILE_LIBS,"LIB") +FUTILE_LIBS_R=$STRIPE +ACX_STRIPE_SUBPATH($FUTILE_INCS,"INC") +FUTILE_INCS_R=$STRIPE +AC_SUBST(FUTILE_LIBS_R) +AC_SUBST(FUTILE_INCS_R) +# +ACX_STRIPE_SUBPATH($ETSF_LIBS,"LIB") +ETSF_LIBS_R=$STRIPE +ACX_STRIPE_SUBPATH($ETSF_INCS,"INC") +ETSF_INCS_R=$STRIPE +AC_SUBST(ETSF_LIBS_R) +AC_SUBST(ETSF_INCS_R) +# +ACX_STRIPE_SUBPATH($NETCDFF_LIBS,"LIB") +NETCDFF_LIBS_R=$STRIPE +ACX_STRIPE_SUBPATH($NETCDFF_INCS,"INC") +NETCDFF_INCS_R=$STRIPE +AC_SUBST(NETCDFF_LIBS_R) +AC_SUBST(NETCDFF_INCS_R) +# +ACX_STRIPE_SUBPATH($NETCDF_LIBS,"LIB") +NETCDF_LIBS_R=$STRIPE +ACX_STRIPE_SUBPATH($NETCDF_INCS,"INC") +NETCDF_INCS_R=$STRIPE +AC_SUBST(NETCDF_LIBS_R) +AC_SUBST(NETCDF_INCS_R) +# +ACX_STRIPE_SUBPATH($PNETCDF_LIBS,"LIB") +PNETCDF_LIBS_R=$STRIPE +ACX_STRIPE_SUBPATH($PNETCDF_INCS,"INC") +PNETCDF_INCS_R=$STRIPE +AC_SUBST(PNETCDF_LIBS_R) +AC_SUBST(PNETCDF_INCS_R) +# +ACX_STRIPE_SUBPATH($HDF5_LIBS,"LIB") +HDF5_LIBS_R=$STRIPE +ACX_STRIPE_SUBPATH($HDF5_INCS,"INC") +HDF5_INCS_R=$STRIPE +AC_SUBST(HDF5_LIBS_R) +AC_SUBST(HDF5_INCS_R) +# +ACX_STRIPE_SUBPATH($FFT_LIBS,"LIB") +FFT_LIBS_R=$STRIPE +ACX_STRIPE_SUBPATH($FFT_INCS,"INC") +FFT_INCS_R=$STRIPE +AC_SUBST(FFT_LIBS_R) +AC_SUBST(FFT_INCS_R) +# +ACX_STRIPE_SUBPATH($BLAS_LIBS,"LIB") +BLAS_LIBS_R=$STRIPE +ACX_STRIPE_SUBPATH($BLAS_INCS,"INC") +BLAS_INCS_R=$STRIPE +AC_SUBST(BLAS_LIBS_R) +AC_SUBST(BLAS_INCS_R) +# +ACX_STRIPE_SUBPATH($LAPACK_LIBS,"LIB") +LAPACK_LIBS_R=$STRIPE +ACX_STRIPE_SUBPATH($LAPACK_INCS,"INC") +LAPACK_INCS_R=$STRIPE +AC_SUBST(LAPACK_LIBS_R) +AC_SUBST(LAPACK_INCS_R) +# +ACX_STRIPE_SUBPATH($SCALAPACK_LIBS,"LIB") +SCALAPACK_LIBS_R=$STRIPE +ACX_STRIPE_SUBPATH($SCALAPACK_INCS,"INC") +SCALAPACK_INCS_R=$STRIPE +AC_SUBST(SCALAPACK_LIBS_R) +AC_SUBST(SCALAPACK_INCS_R) +# +ACX_STRIPE_SUBPATH($BLACS_LIBS,"LIB") +BLACS_LIBS_R=$STRIPE +ACX_STRIPE_SUBPATH($BLACS_INCS,"INC") +BLACS_INCS_R=$STRIPE +AC_SUBST(BLACS_LIBS_R) +AC_SUBST(BLACS_INCS_R) +# +ACX_STRIPE_SUBPATH($PETSC_LIBS,"LIB") +PETSC_LIBS_R=$STRIPE +ACX_STRIPE_SUBPATH($PETSC_INCS,"INC") +PETSC_INCS_R=$STRIPE +AC_SUBST(PETSC_LIBS_R) +AC_SUBST(PETSC_INCS_R) +# +ACX_STRIPE_SUBPATH($SLEPC_LIBS,"LIB") +SLEPC_LIBS_R=$STRIPE +ACX_STRIPE_SUBPATH($SLEPC_INCS,"INC") +SLEPC_INCS_R=$STRIPE +AC_SUBST(SLEPC_LIBS_R) +AC_SUBST(SLEPC_INCS_R) +# +ACX_STRIPE_SUBPATH($LIBXC_LIBS,"LIB") +LIBXC_LIBS_R=$STRIPE +ACX_STRIPE_SUBPATH($LIBXC_INCS,"INC") +LIBXC_INCS_R=$STRIPE +AC_SUBST(LIBXC_LIBS_R) +AC_SUBST(LIBXC_INCS_R) +# +ACX_STRIPE_SUBPATH($BLAS_PETSC_LIBS,"LIB") +BLAS_PETSC_LIBS_R=$STRIPE +ACX_STRIPE_SUBPATH($BLAS_PETSC_INCS,"INC") +BLAS_PETSC_INCS_R=$STRIPE +AC_SUBST(BLAS_PETSC_LIBS_R) +AC_SUBST(BLAS_PETSC_INCS_R) +# +ACX_STRIPE_SUBPATH($LAPACK_PETSC_LIBS,"LIB") +LAPACK_PETSC_LIBS_R=$STRIPE +ACX_STRIPE_SUBPATH($LAPACK_PETSC_INCS,"INC") +LAPACK_PETSC_INCS_R=$STRIPE +AC_SUBST(LAPACK_PETSC_LIBS_R) +AC_SUBST(LAPACK_PETSC_INCS_R) +# ]) diff --git a/config/m4/acx_stripe_subpath.m4 b/config/m4/acx_stripe_subpath.m4 new file mode 100644 index 0000000000..ab43b9127b --- /dev/null +++ b/config/m4/acx_stripe_subpath.m4 @@ -0,0 +1,17 @@ +# +# License-Identifier: GPL +# +# Copyright (C) 2016 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# +AC_DEFUN([ACX_STRIPE_SUBPATH], +[ +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'` +if [[ -z "${1// }" ]]; then + STRIPE="$STRIPE ($2)" +fi +]) diff --git a/config/m4/acx_version.m4 b/config/m4/acx_version.m4 new file mode 100644 index 0000000000..77de35ea64 --- /dev/null +++ b/config/m4/acx_version.m4 @@ -0,0 +1,17 @@ +# +# License-Identifier: GPL +# +# Copyright (C) 2016 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# +AC_DEFUN([ACX_VERSION], +[ +cat << EOF > include/version/version.h +#define YAMBO_VERSION $SVERSION +#define YAMBO_SUBVERSION $SSUBVERSION +#define YAMBO_PATCHLEVEL $SPATCHLEVEL +#define YAMBO_REVISION $SREVISION +#define YAMBO_HASH "$SHASH" +EOF +]) diff --git a/config/m4/blas.m4 b/config/m4/blas.m4 index dbb6c4928a..e54b5192f5 100644 --- a/config/m4/blas.m4 +++ b/config/m4/blas.m4 @@ -192,23 +192,29 @@ if test x"$enable_openmp_int_linalg" = "xyes" ; then fi # Test for shared BLAS -BLAS_SO_LIBS="" +BLAS_PETSC_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"; + BLAS_PETSC_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} + +if test "$acx_blas_ok" = "yes" ; then + if test -d "${MKLROOT}" || test "${BLAS_LIBS}" = "*.so"; then + BLAS_PETSC_LIBS=${BLAS_LIBS} + else + BLAS_PETSC_LIBS=`echo "$BLAS_LIBS" | sed "s/\.a//g" | sed "s/\.so//g" | sed "s/\ \-L//g" | sed "s/\ \-l/lib/g" ` + BLAS_PETSC_LIBS="${BLAS_PETSC_LIBS}.so" + #echo "Debug: BLAS_PETSC_LIBS=$BLAS_PETSC_LIBS"; + if ! test -e $BLAS_PETSC_LIBS ; then BLAS_PETSC_LIBS="" ; fi + fi fi -blas_shared="no" -if test x"${BLAS_SO_LIBS}" = "x"; then - BLAS_SO_LIBS=${BLAS_LIBS} +# +blas_shared="0" +if test x"${BLAS_PETSC_LIBS}" = "x"; then + BLAS_PETSC_LIBS=${BLAS_LIBS} else - blas_shared="yes" + blas_shared="1" fi AC_SUBST(internal_blas) @@ -218,7 +224,7 @@ AC_SUBST(def_openmp_int_linalg) AC_SUBST(compile_blas) AC_SUBST(BLAS_LIBS) AC_SUBST(BLAS_info) -AC_SUBST(BLAS_SO_LIBS) +AC_SUBST(BLAS_PETSC_LIBS) AC_SUBST(blas_shared) ])dnl ACX_BLAS diff --git a/config/m4/cuda.m4 b/config/m4/cuda.m4 index c746fbc934..b8288ca53e 100644 --- a/config/m4/cuda.m4 +++ b/config/m4/cuda.m4 @@ -1,25 +1,9 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): AF -# -# 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) 2016 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. -# -# 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): AF # AC_DEFUN([AC_HAVE_CUDA],[ # diff --git a/config/m4/etsf_io.m4 b/config/m4/etsf_io.m4 index 110bf1cf7b..4e8d66516f 100644 --- a/config/m4/etsf_io.m4 +++ b/config/m4/etsf_io.m4 @@ -1,25 +1,9 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): AF -# -# 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) 2015 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. -# -# 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): AF # AC_DEFUN([AC_HAVE_ETSF_IO],[ diff --git a/config/m4/fft.m4 b/config/m4/fft.m4 index 6e222aa502..7f806a74c8 100644 --- a/config/m4/fft.m4 +++ b/config/m4/fft.m4 @@ -1,25 +1,9 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): AM, AF +# Copyright (C) 2014 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. -# -# 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. +# Authors (see AUTHORS file for details): AM AF # AC_DEFUN([AC_HAVE_FFT],[ diff --git a/config/m4/futile.m4 b/config/m4/futile.m4 index 819cb3f855..908b697033 100644 --- a/config/m4/futile.m4 +++ b/config/m4/futile.m4 @@ -1,25 +1,9 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2019 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. -# -# 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): DS # AC_DEFUN([AC_HAVE_FUTILE],[ diff --git a/config/m4/hdf5_f90.m4 b/config/m4/hdf5_f90.m4 index 5b4383dc10..fe0d45bd5c 100644 --- a/config/m4/hdf5_f90.m4 +++ b/config/m4/hdf5_f90.m4 @@ -1,27 +1,11 @@ # # from http://www.arsc.edu/support/news/HPCnews/HPCnews249.shtml # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): AM, AF, DS, CA +# Copyright (C) 2021 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. -# -# 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. +# Authors (see AUTHORS file for details): AM AF DS CA # AC_DEFUN([AC_HAVE_HDF5_F90],[ # @@ -86,6 +70,14 @@ 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 "$with_hdf5_libs" = "internal" ; then + # + AC_MSG_CHECKING([for HDF5]) ; + if test -d "$with_hdf5_libdir" ; then AC_MSG_RESULT([in libdir $with_hdf5_libdir]) ; + elif test -d "$with_hdf5_path" ; then AC_MSG_RESULT([in path $with_hdf5_path]) ; + elif test x"$with_hdf5_libs" != "x" ; then AC_MSG_RESULT([using $with_hdf5_libs]) ; + fi # AC_LANG([Fortran]) # @@ -98,30 +90,31 @@ 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 - # - 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 + 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" ; + 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]) ; # # Automatic detection of hdf5 libs copied from QE # @@ -141,11 +134,13 @@ if test x"$enable_hdf5" = "xyes"; then h5fc=$(command -v h5fc) fi # - if test -e $h5pfc; then + # Check for the existence of the pre-compiled library corresponding to what needed by yambo + # + if test -e $h5pfc && test $IO_LIB_VER = "parallel"; 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 + elif test -e $h5fc && test $IO_LIB_VER = "serial"; 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"; @@ -171,7 +166,9 @@ if test x"$enable_hdf5" = "xyes"; then FCFLAGS="$save_fcflags" ; LIBS="$save_libs" ; # - if test "x$hdf5" = xno; then + fi + # + if test "x$hdf5" = xno; then AC_MSG_RESULT([no]) ; AC_MSG_CHECKING([for HDF5 using automatic library list]) ; # @@ -215,6 +212,8 @@ if test x"$enable_hdf5" = "xyes"; then fi fi # + # To be fixed + # if test "x$hdf5" = xyes; then HDF5_LIBS="$try_HDF5_LIBS" ; HDF5_INCS="$try_HDF5_INCS" ; @@ -231,8 +230,9 @@ if test x"$enable_hdf5" = "xyes"; then fi # 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 + if ! test "$with_hdf5_libs" = "internal" ; then + AC_MSG_RESULT([no]) ; + fi # AC_MSG_CHECKING([for internal HDF5 library]); internal_hdf5="yes" ; @@ -242,7 +242,9 @@ 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/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_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" ; # hdf5=yes ; diff --git a/config/m4/iotk.m4 b/config/m4/iotk.m4 index 966d185e69..7572d2beef 100644 --- a/config/m4/iotk.m4 +++ b/config/m4/iotk.m4 @@ -1,25 +1,9 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): AF -# -# 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. +# Copyright (C) 2015 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): AF # AC_DEFUN([AC_HAVE_IOTK],[ @@ -127,6 +111,7 @@ AC_SUBST(PW_CPP) AC_SUBST(compile_p2y) AC_SUBST(compile_iotk) AC_SUBST(internal_iotk) +# AC_SUBST(IOTK_INCS) AC_SUBST(IOTK_LIBS) # diff --git a/config/m4/lapack.m4 b/config/m4/lapack.m4 index 6c862eb086..949c41d927 100644 --- a/config/m4/lapack.m4 +++ b/config/m4/lapack.m4 @@ -98,29 +98,36 @@ if test "$internal_lapack" = "yes"; then fi # Test for shared LAPACK -LAPACK_SO_LIBS="" +LAPACK_PETSC_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"; + LAPACK_PETSC_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} +# +if test "$acx_lapack_ok" = "yes" ; then + if test -d "${MKLROOT}" || test "${lapack_LIBS}" = "*.so"; then + LAPACK_PETSC_LIBS=${LAPACK_LIBS} + else + LAPACK_PETSC_LIBS=`echo "$LAPACK_LIBS" | sed "s/\.a//g" | sed "s/\.so//g" | sed "s/\ \-L//g" | sed "s/\ \-l/lib/g" ` + LAPACK_PETSC_LIBS="${LAPACK_PETSC_LIBS}.so" + #echo "Debug: LAPACK_PETSC_LIBS=$LAPACK_PETSC_LIBS" + if ! test -e $LAPACK_PETSC_LIBS ; then LAPACK_PETSC_LIBS="" ; fi + fi 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 +if test "x${LAPACK_PETSC_LIBS}" = "x"; then + LAPACK_PETSC_LIBS=${LAPACK_LIBS} else - lapack_shared="1" + if test "x$blas_shared" = "x1" ; then lapack_shared="1" ; fi fi AC_SUBST(internal_lapack) AC_SUBST(compile_lapack) AC_SUBST(LAPACK_LIBS) -AC_SUBST(LAPACK_SO_LIBS) +AC_SUBST(LAPACK_PETSC_LIBS) AC_SUBST(lapack_shared) ])dnl ACX_LAPACK diff --git a/config/m4/libxc.m4 b/config/m4/libxc.m4 index 188ee0a0ad..9b4c004418 100644 --- a/config/m4/libxc.m4 +++ b/config/m4/libxc.m4 @@ -36,15 +36,6 @@ AC_ARG_WITH(libxc_includedir, [AS_HELP_STRING([--with-libxc-includedir=], internal_libxc="no" compile_libxc="no" -if test -d "$with_libxc_path"; then - libxc_incdir="$with_libxc_path/include" - libxc_libdir="$with_libxc_path/lib" -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 - -LIBXC_INCS="$IFLAG$libxc_incdir" - dnl Backup LIBS and FCFLAGS acx_libxc_save_LIBS="$LIBS" acx_libxc_save_FCFLAGS="$FCFLAGS" @@ -61,39 +52,51 @@ testprog="AC_LANG_PROGRAM([],[ i = XC_EXCHANGE ])" -FCFLAGS="$LIBXC_INCS $acx_libxc_save_FCFLAGS" # set from environment variable, if not blank if test ! -z "$LIBXC_LIBS"; then LIBS="$LIBXC_LIBS" + FCFLAGS="$LIBXC_INCS $acx_libxc_save_FCFLAGS" dnl $acx_libxc_save_LIBS" AC_LINK_IFELSE($testprog, [acx_libxc_ok=yes], []) fi -# set from --with-libxc-libs flag -if test x"$acx_libxc_ok" = xno && test ! -z "$with_libxc_libs" ; then - LIBXC_LIBS="$with_libxc_libs" - LIBS="$LIBXC_LIBS" -dnl $acx_libxc_save_LIBS" - AC_LINK_IFELSE($testprog, [acx_libxc_ok=yes], []) -fi +# set from configure flags +if test x"$acx_libxc_ok" = xno ; then + # + LIBXC_LIBS="-lxcf90 -lxcf03 -lxc" + LIBXC_INCS="" + # + if test -d "$with_libxc_path"; then + libxc_incdir="$with_libxc_path/include" + libxc_libdir="$with_libxc_path/lib" + 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_incdir"; then LIBXC_INCS="$IFLAG$libxc_incdir"; fi + # + if test ! -z "$with_libxc_libs" ; then LIBXC_LIBS="$with_libxc_libs" ; fi + if test ! -z "$with_libxc_incs" ; then LIBXC_INCS="$with_libxc_incs" ; fi -# dynamic linkage, separate Fortran interface -if test x"$acx_libxc_ok" = xno; then - LIBXC_LIBS="-L$libxc_libdir -lxcf90 -lxcf03 -lxc" LIBS="$LIBXC_LIBS" -dnl $acx_libxc_save_LIBS" - AC_LINK_IFELSE($testprog, [acx_libxc_ok=yes], []) -fi + FCFLAGS="$LIBXC_INCS $acx_libxc_save_FCFLAGS" -# static linkage, separate Fortran interface -if test x"$acx_libxc_ok" = xno; then - LIBXC_LIBS="$libxc_libdir/libxcf90.a $libxc_libdir/libxcf03.a $libxc_libdir/libxc.a" - LIBS="$LIBXC_LIBS" dnl $acx_libxc_save_LIBS" AC_LINK_IFELSE($testprog, [acx_libxc_ok=yes], []) + + # 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" +dnl $acx_libxc_save_LIBS" + AC_LINK_IFELSE($testprog, [acx_libxc_ok=yes], []) + fi fi + dnl The following programs will only work with specific version of libxc testprog_5x="AC_LANG_PROGRAM([],[ use xc_f03_lib_m diff --git a/config/m4/mpi.m4 b/config/m4/mpi.m4 index d2ac8ef43b..57c4e1eff7 100644 --- a/config/m4/mpi.m4 +++ b/config/m4/mpi.m4 @@ -2,27 +2,11 @@ # Original version Available from the GNU Autoconf Macro Archive at: # http://autoconf-archive.cryp.to/macros-by-category.html # -# 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. +# License-Identifier: GPL +# +# Copyright (C) 2017 The Yambo Team +# +# Authors (see AUTHORS file for details): AM DS # mpibuild="yes" diff --git a/config/m4/netcdf_f90.m4 b/config/m4/netcdf_f90.m4 index 75e002df67..df61cc3e22 100644 --- a/config/m4/netcdf_f90.m4 +++ b/config/m4/netcdf_f90.m4 @@ -2,27 +2,11 @@ # from http://www.arsc.edu/support/news/HPCnews/HPCnews249.shtml # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org -# -# Authors (see AUTHORS file for details): AM, AF, 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. +# License-Identifier: GPL +# +# Copyright (C) 2006 The Yambo Team +# +# Authors (see AUTHORS file for details): AM AF DS # AC_DEFUN([AC_HAVE_NETCDF_F90],[ diff --git a/config/m4/petsc_slepc.m4 b/config/m4/petsc_slepc.m4 index b1d4a3ad40..e14c5035c8 100644 --- a/config/m4/petsc_slepc.m4 +++ b/config/m4/petsc_slepc.m4 @@ -1,25 +1,9 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2016 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. -# -# 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 # AC_DEFUN([AC_PETSC_SLEPC_SETUP],[ # @@ -115,7 +99,7 @@ if test -d "$with_petsc_path" || test -d "$with_petsc_libdir" || test x"$with_pe #include #include #include -#include ]), +#include ]), [petsc=yes], [petsc=no]); # if test "x$petsc" = "xyes"; then @@ -142,22 +126,36 @@ if test "x$enable_petsc" = "xyes" && test "x$petsc" = "xno" ; then # internal_petsc="yes" # + PETSC_LIBS_DN="${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libpetsc.so" ; + PETSC_LIBS_ST="${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" ; + PETSC_LIBS="$PETSC_LIBS_DN" ; else - PETSC_LIBS="${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libpetsc.a" ; + PETSC_LIBS="$PETSC_LIBS_ST" ; fi PETSC_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/${build_precision}/include" ; # if test "$use_libdl" = "yes"; then PETSC_LIBS="$PETSC_LIBS -ldl" ; fi # petsc=yes - if test -e "${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libpetsc.a" ; then + if test -e "$PETSC_LIBS_DN" ; then + PETSC_LIBS="$PETSC_LIBS_DN" ; compile_petsc="no" ; - AC_MSG_RESULT([already compiled]) ; - elif test -e "${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libpetsc.so" ; then + if test "x$lapack_shared" = "x1" ; then + AC_MSG_RESULT([dynamic already compiled]) ; + else + AC_MSG_RESULT([dynamic found, despite no dynamic lapack detected.]) ; + AC_MSG_RESULT([The compilation may fail. In case remove the dynamic petsc libs.]) ; + fi + elif test -e "$PETSC_LIBS_ST" ; then + PETSC_LIBS="$PETSC_LIBS_ST" ; compile_petsc="no" ; - AC_MSG_RESULT([already compiled]) ; + if test "x$lapack_shared" = "x1" ; then + AC_MSG_RESULT([static found, despite dynamic lapack.]) ; + AC_MSG_RESULT([You may delete the static petsc and re-run the configure to get smaller executables]) ; + else + AC_MSG_RESULT([static already compiled]) ; + fi else compile_petsc="yes" ; AC_MSG_RESULT([to be compiled]) ; @@ -248,20 +246,34 @@ if test "x$enable_slepc" = "xyes" && test "x$slepc" = "xno" && test "x$enable_pe # internal_slepc="yes"; # + SLEPC_LIBS_DN=${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libslepc.so + SLEPC_LIBS_ST=${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" ; + SLEPC_LIBS="$SLEPC_LIBS_DN -Wl,-rpath=${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib" ; else - SLEPC_LIBS="${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libslepc.a" ; + SLEPC_LIBS="$SLEPC_LIBS_ST" ; 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 + if test -e "$SLEPC_LIBS_DN" ; then + SLEPC_LIBS="$SLEPC_LIBS_DN -Wl,-rpath=${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib" ; compile_slepc="no" ; - AC_MSG_RESULT([already compiled]) ; - elif test -e "${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libslepc.so" ; then + if test "x$lapack_shared" = "x1" ; then + AC_MSG_RESULT([dynamic already compiled]) ; + else + AC_MSG_RESULT([dynamic found, despite no dynamic lapack detected.]) ; + AC_MSG_RESULT([The compilation may fail. In case remove the dynamic slepc libs.]) ; + fi + elif test -e "$SLEPC_LIBS_ST" ; then + SLEPC_LIBS="$SLEPC_LIBS_ST" ; compile_slepc="no" ; - AC_MSG_RESULT([already compiled]) ; + if test "x$lapack_shared" = "x1" ; then + AC_MSG_RESULT([static found, despite dynamic lapack.]) ; + AC_MSG_RESULT([You may delete the static slepc and re-run the configure to get smaller executables]) ; + else + AC_MSG_RESULT([static already compiled]) ; + fi else compile_slepc="yes" ; AC_MSG_RESULT([to be compiled]) ; diff --git a/config/m4/scalapack.m4 b/config/m4/scalapack.m4 index 8abb710c31..680c1a0a98 100644 --- a/config/m4/scalapack.m4 +++ b/config/m4/scalapack.m4 @@ -1,25 +1,9 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): AM +# Copyright (C) 2006 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. -# -# 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. +# Authors (see AUTHORS file for details): AM # # AC_DEFUN([AC_SLK_SETUP],[ diff --git a/config/m4/scripts.m4 b/config/m4/scripts.m4 index 487263f71f..e6b8f5ba24 100644 --- a/config/m4/scripts.m4 +++ b/config/m4/scripts.m4 @@ -1,25 +1,9 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): AM +# 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. -# -# 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. +# Authors (see AUTHORS file for details): AM # AC_DEFUN([ACX_SCRIPTS],[ # diff --git a/config/m4/yambo_driver.m4 b/config/m4/yambo_driver.m4 new file mode 100644 index 0000000000..859bd05ff9 --- /dev/null +++ b/config/m4/yambo_driver.m4 @@ -0,0 +1,25 @@ +# +# License-Identifier: GPL +# +# Copyright (C) 2016 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# +AC_DEFUN([AC_YDRIVER],[ + +DRIVER_INCS="-I$PWD/lib/yambo/Ydriver/include/ -I$PWD/include/driver" +# +AC_ARG_WITH(ydriver-branch,[AS_HELP_STRING([--with-ydriver-branch=],[Use the of the ydriver repository.],[32])],,[with_ydriver_branch=none]) +# +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 +AC_SUBST(Ydriver_LIB) +AC_SUBST(Ydriver_check) +AC_SUBST(DRIVER_INCS) +AC_SUBST(with_ydriver_branch) +]) diff --git a/config/m4/yambo_folders.m4 b/config/m4/yambo_folders.m4 index 935b4ff0ed..227d601075 100644 --- a/config/m4/yambo_folders.m4 +++ b/config/m4/yambo_folders.m4 @@ -1,25 +1,9 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): DS AM +# Copyright (C) 2017 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. -# -# 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. +# Authors (see AUTHORS file for details): DS AM # chmod u+x sbin/* # diff --git a/config/m4/yambo_remote_compilation_setup.m4 b/config/m4/yambo_remote_compilation_setup.m4 index f9ae3e7ac3..3b6d6b3814 100644 --- a/config/m4/yambo_remote_compilation_setup.m4 +++ b/config/m4/yambo_remote_compilation_setup.m4 @@ -1,25 +1,9 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2021 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. -# -# 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): DS AM # # Folders # diff --git a/config/m4/yambo_specific.m4 b/config/m4/yambo_specific.m4 index aec82af016..6127f0ee46 100644 --- a/config/m4/yambo_specific.m4 +++ b/config/m4/yambo_specific.m4 @@ -1,25 +1,9 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): DS +# Copyright (C) 2017 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. -# -# 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. +# Authors (see AUTHORS file for details): DS # # PATH FOR EXT LIBS # ============================================================================= diff --git a/config/mk/defs.mk.in b/config/mk/defs.mk.in index 4586e37730..722d651b4a 100644 --- a/config/mk/defs.mk.in +++ b/config/mk/defs.mk.in @@ -1,25 +1,9 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2018 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. -# -# 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 # ECHO =@ECHO@ IO_MODE =io_@IO_MODE@ diff --git a/config/mk/global/actions/clean.mk b/config/mk/global/actions/clean.mk index 2c1cfa016e..4db1851bce 100644 --- a/config/mk/global/actions/clean.mk +++ b/config/mk/global/actions/clean.mk @@ -1,3 +1,10 @@ +# +# License-Identifier: GPL +# +# Copyright (C) 2020 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# gitclean: clean_all @git clean -fdx clean_all: distclean @@ -10,7 +17,6 @@ clean: reset: @$(call clean_driver,"") @$(call clean_driver,"int-libs") -check: - @FILES=`git ls-files --others|grep -v .tar.gz|grep -v .sw`; for target in $$FILES ; do echo $$target; done +check-files: + @FILES=`git ls-files --others|grep -v .tar.gz|grep -v .swp`; for target in $$FILES ; do echo $$target; done @find . -empty -type d - diff --git a/config/mk/global/actions/compile_external_libraries.mk b/config/mk/global/actions/compile_external_libraries.mk index 072dede631..cf337b938a 100644 --- a/config/mk/global/actions/compile_external_libraries.mk +++ b/config/mk/global/actions/compile_external_libraries.mk @@ -1,4 +1,10 @@ # +# License-Identifier: GPL +# +# Copyright (C) 2020 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# # BLACS& SLK : Parallel compilation of blacs and scalapack fails # SLEPC&PETSC: The internal build system of petsc and slepc already compiles the two libraries in parallel. # diff --git a/config/mk/global/actions/compile_interfaces.mk b/config/mk/global/actions/compile_interfaces.mk index 3dec82de52..ce040e2815 100644 --- a/config/mk/global/actions/compile_interfaces.mk +++ b/config/mk/global/actions/compile_interfaces.mk @@ -1,4 +1,10 @@ # +# License-Identifier: GPL +# +# Copyright (C) 2020 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# # Variable definitions # I_PRECMP= @@ -24,7 +30,7 @@ $(GOALS): @$(MAKE) $(MAKEFLAGS) ext-libs @$(MAKE) $(MAKEFLAGS) int-libs @+LIBS="$(YLIBDRIVER)";LAB="$@_Ydriver_";BASE="lib/yambo/Ydriver/src";ADF="$(I_PRECMP) -D_$@";$(todo_lib);$(mk_lib) - @+LIBS="$(2YLIBS)";BASE="src";ADF="$(I_PRECMP)";$(todo_lib);$(mk_lib) + @+LIBS="$(Y_LIBS)";BASE="src";ADF="$(I_PRECMP)";$(todo_lib);$(mk_lib) @+LIBS="int_modules";BASE="interfaces";ADF="$(I_PRECMP)";$(todo_lib);$(mk_lib) - @+X2DO="$@";BASE="interfaces/$@";XLIBS="$(2YLIBS_LD)";ADF="$(I_PRECMP)";$(todo_driver) - @+X2DO="$@";BASE="interfaces/$@";XLIBS="$(2YLIBS_LD)";ADF="$(I_PRECMP)";$(mk_exe) + @+X2DO="$@";BASE="interfaces/$@";XLIBS="$(Y_LIBS_LD)";ADF="$(I_PRECMP)";$(todo_driver) + @+X2DO="$@";BASE="interfaces/$@";XLIBS="$(Y_LIBS_LD)";ADF="$(I_PRECMP)";$(mk_exe) diff --git a/config/mk/global/actions/compile_internal_libraries.mk b/config/mk/global/actions/compile_internal_libraries.mk index 7cef73655b..7a6e35f5a4 100644 --- a/config/mk/global/actions/compile_internal_libraries.mk +++ b/config/mk/global/actions/compile_internal_libraries.mk @@ -1,3 +1,10 @@ +# +# License-Identifier: GPL +# +# Copyright (C) 2020 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# qe_pseudo: @+LIBS="qe_pseudo"; BASE="lib" ; ADF="$(STAMP_DBLE)"; LAB=""; $(todo_lib); $(mk_lib) slatec: @@ -6,4 +13,3 @@ 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) - diff --git a/config/mk/global/actions/compile_yambo.mk b/config/mk/global/actions/compile_yambo.mk index 17bf994989..cdc3dc724b 100644 --- a/config/mk/global/actions/compile_yambo.mk +++ b/config/mk/global/actions/compile_yambo.mk @@ -1,37 +1,27 @@ # +# License-Identifier: GPL +# +# Copyright (C) 2020 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# # Variable definitions # PRECMP= -SRC_LIBS=$(MAIN_LIBS) -EXE_LIBS=$(MAIN_LIBS_LD) ifneq (,$(findstring yambo_sc,$(MAKECMDGOALS))) PRECMP=-D_SC - SRC_LIBS=$(PJ_SCLIBS) - EXE_LIBS=$(PJ_SCLIBS_LD) else ifneq (,$(findstring yambo_rt_iterative,$(MAKECMDGOALS))) PRECMP=-D_RT -D_RT_SCATT -D_ELPH -D_PHEL -D_ELPH_ITERATIVE - SRC_LIBS=$(PJ_RTITLIBS) - EXE_LIBS=$(PJ_RTITLIBS_LD) else ifneq (,$(findstring yambo_rt_gpl,$(MAKECMDGOALS))) PRECMP=-D_RT - SRC_LIBS=$(PJ_RT_GPL_LIBS) - EXE_LIBS=$(PJ_RT_GPL_LIBS_LD) else ifneq (,$(findstring yambo_rt,$(MAKECMDGOALS))) PRECMP=-D_RT -D_RT_SCATT -D_ELPH -D_PHEL - SRC_LIBS=$(PJ_RTLIBS) - EXE_LIBS=$(PJ_RTLIBS_LD) else ifneq (,$(findstring yambo_ph,$(MAKECMDGOALS))) PRECMP=-D_ELPH -D_PHEL - SRC_LIBS=$(PJ_PHLIBS) - EXE_LIBS=$(PJ_PHLIBS_LD) else ifneq (,$(findstring yambo_nl,$(MAKECMDGOALS))) PRECMP=-D_NL -D_RT -D_DOUBLE - SRC_LIBS=$(PJ_NLLIBS) - EXE_LIBS=$(PJ_NLLIBS_LD) else ifneq (,$(findstring yambo_qed,$(MAKECMDGOALS))) PRECMP=-D_QED -D_RT -D_RT_SCATT -D_ELPH - SRC_LIBS=$(PJ_RTLIBS) - EXE_LIBS=$(PJ_RTLIBS_LD) endif # # Compilation @@ -45,6 +35,6 @@ yambo yambo_ph yambo_sc yambo_rt yambo_rt_gpl yambo_rt_iterative yambo_nl yambo_ @$(MAKE) $(MAKEFLAGS) ext-libs @$(MAKE) $(MAKEFLAGS) int-libs @+LIBS="$(YLIBDRIVER)";LAB="$@_Ydriver_";BASE="lib/yambo/Ydriver/src";ADF="$(PRECMP) -D_yambo";$(todo_lib);$(mk_lib) - @+LIBS="$(SRC_LIBS)";BASE="src";ADF="$(PRECMP)";$(todo_lib);$(mk_lib) - @+X2DO="$@";BASE="driver";XLIBS="$(EXE_LIBS)";ADF="$(PRECMP)";$(todo_driver) - @+X2DO="$@";BASE="driver";XLIBS="$(EXE_LIBS)";ADF="$(PRECMP)";$(mk_exe) + @+LIBS="$(Y_LIBS)";BASE="src";ADF="$(PRECMP)";$(todo_lib);$(mk_lib) + @+X2DO="$@";BASE="driver";XLIBS="$(Y_LIBS_LD)";ADF="$(PRECMP)";$(todo_driver) + @+X2DO="$@";BASE="driver";XLIBS="$(Y_LIBS_LD)";ADF="$(PRECMP)";$(mk_exe) diff --git a/config/mk/global/actions/compile_yambo_libraries.mk b/config/mk/global/actions/compile_yambo_libraries.mk index 4b4ee21867..935efa2908 100644 --- a/config/mk/global/actions/compile_yambo_libraries.mk +++ b/config/mk/global/actions/compile_yambo_libraries.mk @@ -1,4 +1,10 @@ +# +# License-Identifier: GPL +# +# Copyright (C) 2020 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# Ydriver:Ydriver-dl Yio: ext-libs int-libs @+LIBS="$(YLIBIO)"; BASE="src"; ADF="-D_io_lib"; $(todo_lib); $(mk_lib) - diff --git a/config/mk/global/actions/compile_ypp.mk b/config/mk/global/actions/compile_ypp.mk index 5944f76265..a7beb5dd8b 100644 --- a/config/mk/global/actions/compile_ypp.mk +++ b/config/mk/global/actions/compile_ypp.mk @@ -1,42 +1,28 @@ # +# License-Identifier: GPL +# +# Copyright (C) 2020 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# # Variable definitions # Y_PRECMP= -Y_SRC_LIBS=$(YPP_MAIN_LIBS) -Y_EXE_LIBS=$(YPP_MAIN_LIBS_LD) -YPP_SRC_LIBS=$(YPP_LIBS) -YPP_EXE_LIBS=$(YPP_LIBS_LD) ifneq (,$(findstring ypp_sc,$(MAKECMDGOALS))) Y_PRECMP=-D_SC YPP_PRECMP=-D_YPP_SC - Y_SRC_LIBS=$(YPPSC_MAIN_LIBS) - Y_EXE_LIBS=$(YPPSC_MAIN_LIBS_LD) else ifneq (,$(findstring ypp_rt_gpl,$(MAKECMDGOALS))) Y_PRECMP=-D_RT -D_YPP_RT YPP_PRECMP=-D_YPP_RT - Y_SRC_LIBS=$(YPPRT_MAIN_LIBS) - Y_EXE_LIBS=$(YPPRT_MAIN_LIBS_LD) - YPP_SRC_LIBS=$(YPPRT_LIBS) - YPP_EXE_LIBS=$(YPPRT_LIBS_LD) else ifneq (,$(findstring ypp_rt,$(MAKECMDGOALS))) Y_PRECMP=-D_RT -D_YPP_RT -D_ELPH YPP_PRECMP=-D_YPP_RT -D_ELPH -D_YPP_ELPH - Y_SRC_LIBS=$(YPPRT_MAIN_LIBS) - Y_EXE_LIBS=$(YPPRT_MAIN_LIBS_LD) - 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_PHEL YPP_PRECMP=-D_YPP_ELPH - YPP_SRC_LIBS=$(YPPPH_LIBS) - YPP_EXE_LIBS=$(YPPPH_LIBS_LD) else ifneq (,$(findstring ypp_nl,$(MAKECMDGOALS))) Y_PRECMP=-D_YPP_RT -D_YPP_NL -D_RT -D_NL -D_DOUBLE YPP_PRECMP=-D_YPP_RT -D_YPP_NL -D_DOUBLE - Y_SRC_LIBS=$(YPPRT_MAIN_LIBS) - Y_EXE_LIBS=$(YPPRT_MAIN_LIBS_LD) - YPP_SRC_LIBS=$(YPPRT_LIBS) - YPP_EXE_LIBS=$(YPPRT_LIBS_LD) endif # # Compilation @@ -50,7 +36,7 @@ ypp ypp_ph ypp_sc ypp_rt_gpl ypp_rt ypp_nl: @$(MAKE) $(MAKEFLAGS) ext-libs @$(MAKE) $(MAKEFLAGS) int-libs @+LIBS="$(YLIBDRIVER)";LAB="$@_Ydriver_";BASE="lib/yambo/Ydriver/src";ADF="$(YPP_PRECMP) -D_ypp";$(todo_lib);$(mk_lib) - @+LIBS="$(Y_SRC_LIBS)";BASE="src";ADF="$(Y_PRECMP)";$(todo_lib);$(mk_lib) - @+LIBS="$(YPP_SRC_LIBS)";LAB="_ypp_";BASE="ypp";ADF="$(YPP_PRECMP)";$(todo_lib);$(mk_lib) - @+X2DO="$@";BASE="driver";XLIBS="$(Y_EXE_LIBS)";X_ypp_LIBS="$(YPP_EXE_LIBS)";ADF="$(YPP_PRECMP)";$(todo_driver) - @+X2DO="$@";BASE="driver";XLIBS="$(Y_EXE_LIBS)";X_ypp_LIBS="$(YPP_EXE_LIBS)";ADF="$(YPP_PRECMP)";$(mk_exe) + @+LIBS="$(Y_LIBS)";BASE="src";ADF="$(Y_PRECMP)";$(todo_lib);$(mk_lib) + @+LIBS="$(YPP_LIBS)";LAB="_ypp_";BASE="ypp";ADF="$(YPP_PRECMP)";$(todo_lib);$(mk_lib) + @+X2DO="$@";BASE="driver";XLIBS="$(Y_LIBS_LD)";X_ypp_LIBS="$(YPP_LIBS_LD)";ADF="$(YPP_PRECMP)";$(todo_driver) + @+X2DO="$@";BASE="driver";XLIBS="$(Y_LIBS_LD)";X_ypp_LIBS="$(YPP_LIBS_LD)";ADF="$(YPP_PRECMP)";$(mk_exe) diff --git a/config/mk/global/actions/dependencies.mk b/config/mk/global/actions/dependencies.mk index fd091b383f..f95ce81fcd 100644 --- a/config/mk/global/actions/dependencies.mk +++ b/config/mk/global/actions/dependencies.mk @@ -1,4 +1,12 @@ +# +# License-Identifier: GPL +# +# Copyright (C) 2021 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# dependencies: + @$(call clean_project_dependencies_stamp,$(what)) @LIB2DO="Ydriver"; $(get_external_libraries) @if ! test -e $(compdir)/config/stamps_and_lists/dependencies.stamp; then ./sbin/compilation/helper.sh -D -N $(MAKEFLAGS);\ touch $(compdir)/config/stamps_and_lists/dependencies.stamp; fi diff --git a/config/mk/global/actions/download_external_libraries.mk b/config/mk/global/actions/download_external_libraries.mk index 15b5e62b9a..5ea901760b 100644 --- a/config/mk/global/actions/download_external_libraries.mk +++ b/config/mk/global/actions/download_external_libraries.mk @@ -1,3 +1,10 @@ +# +# License-Identifier: GPL +# +# Copyright (C) 2021 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# download: @LIB2DO="all"; $(get_external_libraries) libxc-dl: diff --git a/config/mk/global/actions/help.mk b/config/mk/global/actions/help.mk index a34cbc0659..ac6bcae61f 100644 --- a/config/mk/global/actions/help.mk +++ b/config/mk/global/actions/help.mk @@ -1,3 +1,10 @@ +# +# License-Identifier: GPL +# +# Copyright (C) 2021 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# CLEANING_COMPONENTS=bin int-libs driver Ydrive src ypp interfaces conf dep help: @$(ECHO) "\n\n * * * Yambo Makefile help * * * \n" ; diff --git a/config/mk/global/defs.mk.in b/config/mk/global/defs.mk.in index 1d4cd47b66..a52547b2b6 100644 --- a/config/mk/global/defs.mk.in +++ b/config/mk/global/defs.mk.in @@ -1,25 +1,9 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2020 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. -# -# 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 # cpu = @build_cpu@ os = @build_os@ diff --git a/config/mk/global/functions/cleaning.mk b/config/mk/global/functions/cleaning.mk index a5c462f051..ea9589ae7e 100644 --- a/config/mk/global/functions/cleaning.mk +++ b/config/mk/global/functions/cleaning.mk @@ -1,11 +1,17 @@ # +# License-Identifier: GPL +# +# Copyright (C) 2020 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# # Drivers (top) # define clean_driver if [ "$(1)" = "archive" ] || [ "$(1)" = "all" ] ; then $(clean_archive); fi ;\ if [ "$(1)" = "bin" ] || [ -z "$(1)" ] || [ "$(1)" = "all" ] ; then $(clean_bins); fi;\ if [ "$(1)" = "int-libs" ] || [ "$(1)" = "all" ] ; then \ - EXTS="\.f90 \.o \.lock \.mk \.mod \.save \.tmp_source";WDIR="$(libdir)";TARG="$(INT_LIBS)";$(clean_dir_driver); \ + EXTS="\.f90 \.o \.lock \.mk \.mod \.save \.tmp_source to_save";WDIR="$(libdir)";TARG="$(INT_LIBS)";$(clean_dir_driver); \ WDIR="$(libdir)";TARG="$(INT_LIBS)";$(clean_lib_driver); \ WDIR="$(libdir)";TARG="$(INT_LIBS)";$(clean_mod_driver); \ fi;\ @@ -20,10 +26,10 @@ define clean_driver if [ "$(1)" = "stamps" ] || [ -z "$(1)" ] || [ "$(1)" = "all" ] ; then $(clean_stamps); fi; \ if [ "$(1)" = "projects-stamp" ] ; then $(clean_projects_stamp); fi; \ if [ "$(1)" = "driver" ] || [ -z "$(1)" ] || [ "$(1)" = "all" ] ; then \ - EXTS="\.f90 \.o \.lock \.mk \.mod \.save \.tmp_source";WDIR="$(compdir)";TARG="driver";$(clean_dir_driver);\ + EXTS="\.f90 \.o \.lock \.mk \.mod \.save \.tmp_source to_save";WDIR="$(compdir)";TARG="driver";$(clean_dir_driver);\ fi if [ "$(1)" = "Ydriver" ] || [ "$(1)" = "all" ] ; then \ - EXTS="\.f90 \.o \.lock \.mk \.mod \.save \.tmp_source";WDIR="$(libdir)/yambo/Ydriver/src";TARG="$(YLIBDRIVER)";$(clean_dir_driver);\ + EXTS="\.f90 \.o \.lock \.mk \.mod \.save \.tmp_source to_save";WDIR="$(libdir)/yambo/Ydriver/src";TARG="$(YLIBDRIVER)";$(clean_dir_driver);\ WDIR="$(libdir)";TARG="Ydriver";$(clean_lib_driver);\ WDIR="$(libdir)/Ydriver/src";TARG="$(YLIBDRIVER)";$(clean_mod_driver);\ fi;\ @@ -46,7 +52,7 @@ endef define clean_src_driver if [ "$(1)" = "src" ] || [ "$(1)" = "ypp" ] || [ "$(1)" = "interfaces" ] ; then \ if test -f config/stamps_and_lists/active_directories.list; then \ - TARG="";MSG="$(1)";EXTS="\.f90 \.o \.lock \.mk \.mod \.save \.tmp_source";WDIR="$(compdir)";\ + TARG="";MSG="$(1)";EXTS="\.f90 \.o \.lock \.mk \.mod \.save \.tmp_source to_save";WDIR="$(compdir)";\ for FOLD in `cat config/stamps_and_lists/active_directories.list|grep $(1)`;do TARG="$$TARG $$FOLD";done;\ $(clean_dir_driver);$(clean_lib_driver);$(clean_mod_driver); \ fi;\ @@ -127,10 +133,12 @@ define clean_config rm -fr $(prefix)/*.log;\ rm -fr $(prefix)/*.status;\ rm -fr $(prefix)/autom4te.cache;\ + rm -fr $(prefix)/include/version/version.h;\ rm -fr $(prefix)/config/mk/local/static_variables.mk;\ rm -fr $(prefix)/lib/archive/Makefile;\ rm -fr $(prefix)/src/tools/.objects;\ rm -fr $(prefix)/src/wf_and_fft/sgfft.F;\ + rm -fr $(prefix)/lib/archive/git.list;\ rm -fr $(prefix)/sbin/compilation/helper.inc.sh endef define clean_bins @@ -167,9 +175,15 @@ endef define clean_dependencies $(ECHO) "\t[CLEANING] Dependencies" ; \ find . \( -name '*.rules' -o -name 'modules.list' -o -name 'modulesdep.list'\ - -o -name 'global_modules_dep.list' -o -name 'local_modules.dep' \) | xargs rm -f ;\ + -o -name 'global_modules_dep.list' -o -name 'local_modules*.dep' \) | xargs rm -f ;\ rm -fr $(prefix)/config/stamps_and_lists/dependencies.stamp endef +define clean_project_dependencies_stamp + if [ "$(1)" = "update" ]; then $(ECHO) "\t[CLEANING] Project dependencies stamp" ; \ + rm -f $(prefix)/config/stamps_and_lists/dependencies.stamp; \ + rm -f $(prefix)/config/stamps_and_lists/project_dependencies.stamp; \ + fi +endef define clean_log_and_Ydriver_folder $(ECHO) "\t[CLEANING] folders and log" ; \ rm -fr $(srcdir)/lib/yambo;\ diff --git a/config/mk/global/functions/get_libraries.mk b/config/mk/global/functions/get_libraries.mk index c1424a787a..a1db5fa551 100644 --- a/config/mk/global/functions/get_libraries.mk +++ b/config/mk/global/functions/get_libraries.mk @@ -1,4 +1,11 @@ -# Download external libs # +# +# License-Identifier: GPL +# +# Copyright (C) 2020 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# +# Download external libs define get_external_libraries mkdir -p lib/archive; \ cd lib/archive; \ diff --git a/config/mk/global/functions/global_check.mk b/config/mk/global/functions/global_check.mk index 7e66af2550..987910dbbe 100644 --- a/config/mk/global/functions/global_check.mk +++ b/config/mk/global/functions/global_check.mk @@ -1,3 +1,10 @@ +# +# License-Identifier: GPL +# +# Copyright (C) 2021 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# define global_check - ./sbin/compilation/helper.sh -G -- $(xcpp) + ./sbin/check_packages.sh endef diff --git a/config/mk/global/functions/help.mk b/config/mk/global/functions/help.mk index c1f8438903..bec97dee5e 100644 --- a/config/mk/global/functions/help.mk +++ b/config/mk/global/functions/help.mk @@ -1,3 +1,10 @@ +# +# License-Identifier: GPL +# +# Copyright (C) 2021 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# define yambo_help $(ECHO) "\n This is $(y_version)"; if [ "$(1)" = "header" ] || [ -z "$(1)" ] ; then \ @@ -17,6 +24,7 @@ define yambo_help $(ECHO) -n " [rt-project] "; for target in $(RT_PROJ); do $(ECHO) -n " $$target" ; done;$(ECHO) ;\ $(ECHO) -n " [nl-project] "; for target in $(NL_PROJ); do $(ECHO) -n " $$target" ; done;$(ECHO) ;\ $(ECHO) -n " [rtext-project] "; for target in $(RTE_PROJ); do $(ECHO) -n " $$target" ; done;$(ECHO) ;\ + $(ECHO) -n " [mod-project] "; for target in $(MOD_PROJ); do $(ECHO) -n " $$target" ; done;$(ECHO) ;\ $(ECHO) "\n *** GPL components *** ";\ $(ECHO) -n " [gpl] "; for target in $(GPL); do $(ECHO) -n "$$target" ; done;$(ECHO) ;\ $(ECHO) "\n *** Libraries ***"; \ @@ -26,13 +34,17 @@ define yambo_help $(ECHO) -n " [yambo-int-libs]"; for target in $(YAMBO_INT_LIBS); do $(ECHO) -n " $$target" ; done;$(ECHO) ;\ $(ECHO) "\n *** Utils ***";\ $(ECHO) -n " [utils] "; for target in $(UTILS); do $(ECHO) -n " $$target" ; done;$(ECHO) ;\ + $(ECHO) "\n *** Files & Packages ***" ;\ + $(ECHO) " make check-packages = check the packages required (and optional) for Yambo to compile correctly";\ + $(ECHO) " make check-files = list all git untracked files and empty directories.";\ $(ECHO) "\n *** Cleaning ***" ;\ $(ECHO) " The cleaning procedure of yambo is divided in several modules: bin int-libs driver Ydriver src ypp interfaces conf dep";\ $(ECHO) " Each of these module can be called by using";\ $(ECHO) " make clean what= \n";\ $(ECHO) " make clean = remove all modules except int-libs, ext-libs, Ydriver, dependencies and configure files.";\ $(ECHO) " make clean_all = remove all modules. Complete cleaning.";\ - $(ECHO) " make reset = clean + int-libs.";\ + $(ECHO) " make reset = clean + int-libs.";\ + $(ECHO) " make gitclean = clean all git untracked files.";\ $(ECHO);\ fi if [ "$(1)" = "intro" ] ; then \ diff --git a/config/mk/global/functions/mk_exe.mk b/config/mk/global/functions/mk_exe.mk index 3ef9768169..7eb28c2324 100644 --- a/config/mk/global/functions/mk_exe.mk +++ b/config/mk/global/functions/mk_exe.mk @@ -1,6 +1,13 @@ +# +# License-Identifier: GPL +# +# Copyright (C) 2020 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# define mk_exe - LLIBS="";for exe in $$XLIBS; do LLIBS="$$LLIBS -l$$exe" ; done ; \ - for exe in $$X_ypp_LIBS; do LLIBS="$$LLIBS -l_ypp_$$exe" ; done ; \ + LLIBS="";for lib in $$XLIBS; do if test -f $(compdir)/lib/lib$$lib.a; then LLIBS="$$LLIBS -l$$lib" ; fi; done ; \ + for lib in $$X_ypp_LIBS; do if test -f $(compdir)/lib/lib_ypp_$$lib.a; then LLIBS="$$LLIBS -l_ypp_$$lib" ; fi ; done ; \ for exe in $$X2DO; do \ if test ! -f $(compdir)/config/stamps_and_lists/$$exe.stamp && test ! -f $(compdir)/config/stamps_and_lists/compilation_stop_$$exe.stamp; then \ DLIBS="-ldriver";for lib in $(YLIBDRIVER_LD); do DLIBS="$$DLIBS -l$$exe$$lib" ; done ; \ diff --git a/config/mk/global/functions/mk_external_lib.mk b/config/mk/global/functions/mk_external_lib.mk index 497c059f78..114cb6a1b5 100644 --- a/config/mk/global/functions/mk_external_lib.mk +++ b/config/mk/global/functions/mk_external_lib.mk @@ -1,3 +1,10 @@ +# +# License-Identifier: GPL +# +# Copyright (C) 2020 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# define mk_external_lib for lib in $$LIBS; do \ if test ! -f "$(libdir)/lib$$lib.a" ; then \ diff --git a/config/mk/global/functions/mk_lib.mk b/config/mk/global/functions/mk_lib.mk index 9d779a20cd..bbde715902 100644 --- a/config/mk/global/functions/mk_lib.mk +++ b/config/mk/global/functions/mk_lib.mk @@ -1,3 +1,10 @@ +# +# License-Identifier: GPL +# +# Copyright (C) 2021 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# define mk_lib for lib in $$LIBS; do \ if test ! -f $(compdir)/config/stamps_and_lists/lib$$LAB$$lib.a.stamp; then \ diff --git a/config/mk/global/functions/todo.mk b/config/mk/global/functions/todo.mk index 48b66ee548..a41991f6c2 100644 --- a/config/mk/global/functions/todo.mk +++ b/config/mk/global/functions/todo.mk @@ -1,11 +1,17 @@ +# +# License-Identifier: GPL +# +# Copyright (C) 2021 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# define todo_lib for lib in $$LIBS; do \ - $(ECHO) "\t[$$BASE/$$lib] $$lib (checking work to be done)"; \ + $(ECHO) "\t[$$BASE/$$lib] $$lib (setup)"; \ ./sbin/compilation/helper.sh -n -t lib$$LAB$$lib -d $$BASE/$$lib -N $(MAKEFLAGS) -m $(fast) -g $@ -- $(xcpp) $$ADF;\ done endef define todo_driver - $(ECHO) "\t[$$BASE] $$X2DO (checking work to be done)";\ + $(ECHO) "\t[$$BASE] $$X2DO (setup)";\ ./sbin/compilation/helper.sh -n -t $$X2DO -d $$BASE -N $(MAKEFLAGS) -g $@ -- $(xcpp) $$ADF endef - diff --git a/config/mk/global/libraries.mk b/config/mk/global/libraries.mk index 7165d1f322..eae9c62daa 100644 --- a/config/mk/global/libraries.mk +++ b/config/mk/global/libraries.mk @@ -1,4 +1,10 @@ # +# License-Identifier: GPL +# +# Copyright (C) 2020 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# # EXT_LIBS imported # ifeq ($(wildcard config/mk/global/defs.mk),config/mk/global/defs.mk) @@ -13,79 +19,30 @@ YLIBDRIVER_LD = _Ydriver_options _Ydriver_interface _Ydriver_main YLIBIO = modules Yio YLIBIO_LD = $(YLIBIO) # -# Source code +# Yambo folders +#=============== # -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) \ - 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 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_SCLIBS = $(MAIN_LIBS) collisions hamiltonian sc -PJ_SCLIBS_LD = $(MAIN_LIBS_LD) hamiltonian collisions sc - -PJ_RT_GPL_LIBS = $(BASIC_LIBS) interpolate real_time_control qp_control setup \ - tddft dipoles pol_function qp acfdt bse collisions hamiltonian \ - real_time_hamiltonian real_time_propagation real_time_initialize real_time_drivers -PJ_RT_GPL_LIBS_LD= $(BASIC_LIBS_LD) interpolate real_time_control qp_control setup \ - tddft dipoles pol_function qp acfdt bse hamiltonian collisions \ - real_time_hamiltonian real_time_propagation real_time_initialize real_time_drivers - -PJ_RTITLIBS = $(BASIC_LIBS) interpolate qp_control setup \ - tddft dipoles pol_function el-ph qp acfdt bse collisions hamiltonian \ +Y_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 interpolate qp_control setup \ + tddft dipoles pol_function el-ph qp acfdt bse collisions hamiltonian sc \ real_time_control real_time_hamiltonian real_time_propagation real_time_lifetimes real_time_iterative_el-ph \ - real_time_initialize ph-el real_time_drivers -PJ_RTITLIBS_LD = $(BASIC_LIBS_LD) interpolate real_time_control qp_control setup \ - tddft dipoles pol_function el-ph qp acfdt bse hamiltonian collisions \ + real_time_initialize ph-el real_time_drivers nloptics +Y_LIBS_LD = tools memory allocations communicate modules matrices linear_algebra bz_ops parallel parser output common timing Yio io $(IO_MODE) \ + xc_functionals interface stop_and_restart wf_and_fft coulomb interpolate real_time_control qp_control setup \ + tddft dipoles pol_function el-ph qp acfdt bse hamiltonian collisions sc \ real_time_hamiltonian real_time_propagation real_time_lifetimes real_time_iterative_el-ph \ - real_time_initialize ph-el real_time_drivers - -PJ_RTLIBS = $(BASIC_LIBS) interpolate qp_control setup \ - tddft dipoles pol_function el-ph qp acfdt bse collisions hamiltonian \ - real_time_control real_time_hamiltonian real_time_propagation real_time_lifetimes \ - real_time_initialize ph-el real_time_drivers -PJ_RTLIBS_LD = $(BASIC_LIBS_LD) interpolate real_time_control qp_control setup \ - tddft dipoles pol_function el-ph qp acfdt bse hamiltonian collisions \ - real_time_hamiltonian real_time_propagation real_time_lifetimes \ - real_time_initialize ph-el real_time_drivers - -PJ_NLLIBS = $(PJ_RTLIBS) nloptics -PJ_NLLIBS_LD = $(PJ_RTLIBS_LD) nloptics -# -# YAMBO sources needed by Interfaces -# -2YLIBS = driver tools modules memory allocations matrices linear_algebra parallel parser communicate output common timing Yio io $(IO_MODE) \ - setup interface stop_and_restart bz_ops -2YLIBS_LD = tools memory allocations communicate modules matrices linear_algebra parallel parser output common timing Yio io $(IO_MODE) \ - setup interface stop_and_restart bz_ops + real_time_initialize ph-el real_time_drivers nloptics # -# YPP +# Yambo folders needed by Interfaces +#===================================== # -YPP_BASIC_LIBS = modules interface qp plotting k-points symmetries bits electrons dipoles -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 -YPPRT_LIBS = $(YPP_BASIC_LIBS) el-ph real_time excitons -YPPRT_LIBS_LD = $(YPP_BASIC_LIBS_LD) el-ph real_time excitons +2Y_LIBS = driver tools modules memory allocations matrices linear_algebra parallel parser communicate output common timing Yio io $(IO_MODE) \ + setup interface stop_and_restart bz_ops +2Y_LIBS_LD = tools memory allocations communicate modules matrices linear_algebra parallel parser output common timing Yio io $(IO_MODE) \ + setup interface stop_and_restart bz_ops # -# YAMBO sources needed by YPP +# YPP folders +#=============== # -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 -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 \ - dipoles pol_function el-ph qp bse collisions hamiltonian -YPPRT_MAIN_LIBS_LD = $(BASIC_LIBS_LD) real_time_control interpolate qp_control setup interface \ - dipoles pol_function el-ph qp bse hamiltonian collisions -YPPNL_MAIN_LIBS = $(BASIC_LIBS) real_time_control interpolate qp_control setup interface \ - dipoles pol_function el-ph qp bse collisions hamiltonian nloptics -YPPNL_MAIN_LIBS_LD = $(BASIC_LIBS_LD) real_time_control interpolate qp_control setup interface \ - dipoles pol_function el-ph qp bse hamiltonian collisions nloptics +YPP_LIBS = modules interface qp plotting k-points symmetries bits electrons dipoles el-ph real_time excitons +YPP_LIBS_LD = $(YPP_LIBS) diff --git a/config/mk/global/no_configure_help.mk b/config/mk/global/no_configure_help.mk index 580303ff50..8a82a62141 100644 --- a/config/mk/global/no_configure_help.mk +++ b/config/mk/global/no_configure_help.mk @@ -1,3 +1,10 @@ +# +# License-Identifier: GPL +# +# Copyright (C) 2021 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# $(info ) $(info * * * Yambo Makefile * * *) $(info ) diff --git a/config/mk/global/targets.mk b/config/mk/global/targets.mk index 0f424b0675..6833e2abac 100644 --- a/config/mk/global/targets.mk +++ b/config/mk/global/targets.mk @@ -1,3 +1,10 @@ +# +# License-Identifier: GPL +# +# Copyright (C) 2020 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# ifeq ($(do_p2y),yes) p2y = p2y endif @@ -14,7 +21,7 @@ SC_PROJ = yambo_sc ypp_sc RT_PROJ = yambo_rt ypp_rt NL_PROJ = yambo_nl ypp_nl RTE_PROJ = yambo_rt yambo_rt_iterative yambo_qed ypp_rt -MAIN = $(CORE) $(PH_PROJ) $(SC_PROJ) $(RT_PROJ) $(NL_PROJ) +MAIN = $(CORE) $(PH_PROJ) $(SC_PROJ) $(RT_PROJ) $(NL_PROJ) ALL = $(CORE) $(PH_PROJ) $(SC_PROJ) $(RTE_PROJ) $(GPL) $(NL_PROJ) BROKEN = yambo_phdyn SCRIPTS = ydb.pl diff --git a/config/mk/local/defs.mk.in b/config/mk/local/defs.mk.in index 67423534c8..5d83a2608a 100644 --- a/config/mk/local/defs.mk.in +++ b/config/mk/local/defs.mk.in @@ -1,25 +1,9 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2016 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. -# -# 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 # compdir =@compdir@ os =@build_os@ diff --git a/config/mk/local/functions.mk b/config/mk/local/functions.mk index c3b81ee51e..ec1d4d21ab 100644 --- a/config/mk/local/functions.mk +++ b/config/mk/local/functions.mk @@ -1,4 +1,10 @@ # +# License-Identifier: GPL +# +# Copyright (C) 2021 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# # Functions #=========== # @@ -12,7 +18,7 @@ endef # Linking #--------- define link - $(PREFIX)(echo "$(fc) $(fcflags) $(lf90include) $(lf90libinclude) -o $(target) driver.o $(objs) $(libs)" >> $(STDLOG) ;\ + $(PREFIX)(echo "$(fc) $(fcflags) $(lf90include) $(lf90libinclude) -o $(target) driver.o $(objs) $(libs)" >> $(STDLOG) ;\ eval $(fc) $(fcflags) $(lf90include) $(lf90libinclude) -o $(target) driver.o $(objs) $(libs) >> $(STDLOG) 2>&1;\ $(ECHO) "\t[$(wdir)] $(target) (link)";\ if test -f $(target); then \ @@ -78,12 +84,16 @@ define modmove done) endef define mk_lib - $(PREFIX)(echo "$(ar) $(arflags) $(target) $(objs)" >> $(STDLOG) ) - $(PREFIX)(eval $(ar) $(arflags) $(target) $(objs) >> $(STDLOG) 2>&1 ) - $(PREFIX)(echo "mv $(target) $(libdir)" >> $(STDLOG) ) - $(PREFIX)(mv $(target) $(libdir)) - $(PREFIX)(chmod u+x $(libdir)/$(target)) - $(PREFIX)($(ECHO) "\t[$(wdir)] $(target) (lib)") + $(PREFIX)(for object in $(objs); do if test -f $$object; then \ + echo "$(ar) $(arflags) $(target) $$object" >> $(STDLOG); \ + eval $(ar) $(arflags) $(target) $$object >> $(STDLOG) 2>&1 ; \ + fi; done) + $(PREFIX)(if test -f $(target); then \ + echo "mv $(target) $(libdir)" >> $(STDLOG); \ + mv $(target) $(libdir); \ + chmod u+x $(libdir)/$(target); \ + $(ECHO) "\t[$(wdir)] $(target) (lib)"; \ + fi) $(PREFIX)(touch $(compdir)/config/stamps_and_lists/$(target).stamp) endef # diff --git a/config/mk/local/makefile b/config/mk/local/makefile index 27de2206f1..9c2dfeb905 100644 --- a/config/mk/local/makefile +++ b/config/mk/local/makefile @@ -1,25 +1,9 @@ # -# Copyright (C) 2000-2021 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): AM +# 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. -# -# 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. +# Authors (see AUTHORS file for details): HM # # VARIABLES (static and dynamical) # @@ -38,7 +22,7 @@ include $(compdir)/config/setup # # VARIABLES # -idriver=$(IFLAG)$(libdir)/yambo/Ydriver/include $(IFLAG)$(includedir)/driver +idriver=$(IFLAG)$(libdir)/yambo/Ydriver/include $(IFLAG)$(includedir)/driver $(IFLAG)$(includedir)/version lf90include=$(IFLAG)$(includedir) $(IFLAG)$(includedir)/headers/common $(IFLAG)$(includedir)/headers/parser $(idriver) lf90libinclude=$(iiotk) $(ipnetcdf) $(inetcdff) $(inetcdf) $(ipetsc) $(islepc) $(ihdf5) $(ilibxc) $(ifft) $(ifutile) $(iyaml) $(idriver) mfiles=find . -maxdepth 1 -name '*.mod' diff --git a/config/mk/local/operations.mk b/config/mk/local/operations.mk index ffa3cfff2a..4f1c971715 100644 --- a/config/mk/local/operations.mk +++ b/config/mk/local/operations.mk @@ -1,3 +1,10 @@ +# +# License-Identifier: GPL +# +# Copyright (C) 2021 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# exe: $(objs) $(driver) $(link) diff --git a/config/mk/local/rules.mk b/config/mk/local/rules.mk index d0fe879107..c115ca7d57 100644 --- a/config/mk/local/rules.mk +++ b/config/mk/local/rules.mk @@ -1,4 +1,10 @@ # +# License-Identifier: GPL +# +# Copyright (C) 2021 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# # Suffixes # .SUFFIXES: .F .f90 .c .f .o .a diff --git a/config/report.in b/config/report.in index cedba40370..038899184a 100644 --- a/config/report.in +++ b/config/report.in @@ -11,7 +11,7 @@ # [CMP] @compdir@ # [TGT] @prefix@ # [BIN] @exec_prefix@/bin -# [LIB] @extlibs_path@ +# [LIB] @extlibs_path@/@FCKIND@/@FC@ # # [EDITOR] @editor@ # [ MAKE ] @MAKE@ @@ -42,37 +42,41 @@ # # - LIBRARIES - # -# [@Ydriver_check@] Ydriver : @Ydriver_LIB@ -# [@FUTILE_check@] FUTILE : @FUTILE_LIBS@ -# @FUTILE_INCS@ -# [@YAML_check@] YAML : @YAML_LIBS@ -# @YAML_INCS@ -# [@IOTK_check@] IOTK : @IOTK_LIBS@ (QE @PW_VER@) -# @IOTK_INCS@ -# [@ETSF_check@] ETSF_IO : @ETSF_LIBS@ -# @ETSF_INCS@ -# [@NETCDF_check@] NETCDF : @NETCDFF_LIBS@ @NETCDF_LIBS@ @PNETCDF_LIBS@ -# @NETCDFF_INCS@ @NETCDF_INCS@ @PNETCDF_INCS@ -# [@HDF5_check@] HDF5 : @HDF5_LIBS@ -# @HDF5_INCS@ +# [@Ydriver_check@] Ydriver : @Ydriver_LIB@ +# [@FUTILE_check@] FUTILE : @FUTILE_LIBS_R@ +# @FUTILE_INCS_R@ +# [@YAML_check@] YAML : @YAML_LIBS_R@ +# @YAML_INCS_R@ +# [@IOTK_check@] IOTK : @IOTK_LIBS_R@ (QE @PW_VER@) +# @IOTK_INCS_R@ +# [@ETSF_check@] ETSF_IO : @ETSF_LIBS_R@ +# @ETSF_INCS_R@ +# [@NETCDF_check@] NETCDFF : @NETCDFF_LIBS_R@ +# @NETCDFF_INCS_R@ +# [@NETCDF_check@] NETCDF : @NETCDF_LIBS_R@ +# @NETCDF_INCS_R@ +# [@NETCDF_check@] PNETCDF : @PNETCDF_LIBS_R@ +# @PNETCDF_INCS_R@ +# [@HDF5_check@] HDF5 : @HDF5_LIBS_R@ +# @HDF5_INCS_R@ # # > MATH: @FFT_info@ @BLAS_info@ # -# [@FFT_check@] FFT : @FFT_LIBS@ -# @FFT_INCS@ -# [@BLAS_check@] BLAS : @BLAS_LIBS@ -# [@LAPACK_check@] LAPACK : @LAPACK_LIBS@ -# [@SLK_check@] SCALAPACK : @SCALAPACK_LIBS@ -# [@BLACS_check@] BLACS : @BLACS_LIBS@ -# [@PETSC_check@] PETSC : @PETSC_LIBS@ -# @PETSC_INCS@ -# [@SLEPC_check@] SLEPC : @SLEPC_LIBS@ -# @SLEPC_INCS@ +# [@BLAS_check@] BLAS : @BLAS_LIBS_R@ (for petsc: @BLAS_PETSC_LIBS_R@) +# [@LAPACK_check@] LAPACK : @LAPACK_LIBS_R@ (for petsc: @LAPACK_PETSC_LIBS_R@) +# [@SLK_check@] SCALAPACK : @SCALAPACK_LIBS_R@ +# [@BLACS_check@] BLACS : @BLACS_LIBS_R@ +# [@FFT_check@] FFT : @FFT_LIBS_R@ +# @FFT_INCS_R@ +# [@PETSC_check@] PETSC : @PETSC_LIBS_R@ +# @PETSC_INCS_R@ +# [@SLEPC_check@] SLEPC : @SLEPC_LIBS_R@ +# @SLEPC_INCS_R@ # # > OTHERs # -# [@LIBXC_check@] LibXC : @LIBXC_LIBS@ -# @LIBXC_INCS@ +# [@LIBXC_check@] LibXC : @LIBXC_LIBS_R@ +# @LIBXC_INCS_R@ # [@MPI_check@] MPI : @MPI_LIBS@ @MPI_info@ # @MPI_INCS@ # diff --git a/config/setup.in b/config/setup.in index 3cb9488e56..4b7aea716d 100644 --- a/config/setup.in +++ b/config/setup.in @@ -1,3 +1,10 @@ +# +# License-Identifier: GPL +# +# Copyright (C) 2006 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# @SET_MAKE@ #======================================================== # @PACKAGE_STRING@ setup @@ -23,6 +30,7 @@ fc_version = @FCVERSION@ mpi_kind = @MPIKIND@ fcflags = @FCFLAGS@ @FCMFLAG@ @OPENMPLIBS@ @CUDA_FLAGS@ fcuflags = @FCUFLAGS@ @FCMFLAG@ @CUDA_FLAGS@ +slkfcflags = @SLK_FC_FLAGS@ f90suffix = @F90SUFFIX@ f77 = @F77@ fflags = @FFLAGS@ @@ -42,8 +50,8 @@ libdir = @compdir@/lib includedir = @compdir@/include lblas = @BLAS_LIBS@ llapack = @LAPACK_LIBS@ -lblasso = @BLAS_SO_LIBS@ -llapackso = @LAPACK_SO_LIBS@ +lblaspetsc = @BLAS_PETSC_LIBS@ +llapackpetsc= @LAPACK_PETSC_LIBS@ lblacs = @BLACS_LIBS@ lscalapack = @SCALAPACK_LIBS@ lslepc = @SLEPC_LIBS@ diff --git a/configure b/configure index a3d94f027e..b7953932bf 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.21682 h.e50ac5c58. +# Generated by GNU Autoconf 2.69 for Yambo 5.1.0 r.22271 h.22e95509bc. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.1.0 r.21682 h.e50ac5c58' -PACKAGE_STRING='Yambo 5.1.0 r.21682 h.e50ac5c58' +PACKAGE_VERSION='5.1.0 r.22271 h.22e95509bc' +PACKAGE_STRING='Yambo 5.1.0 r.22271 h.22e95509bc' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -625,6 +625,42 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS compdir +LAPACK_PETSC_INCS_R +LAPACK_PETSC_LIBS_R +BLAS_PETSC_INCS_R +BLAS_PETSC_LIBS_R +LIBXC_INCS_R +LIBXC_LIBS_R +SLEPC_INCS_R +SLEPC_LIBS_R +PETSC_INCS_R +PETSC_LIBS_R +BLACS_INCS_R +BLACS_LIBS_R +SCALAPACK_INCS_R +SCALAPACK_LIBS_R +LAPACK_INCS_R +LAPACK_LIBS_R +BLAS_INCS_R +BLAS_LIBS_R +FFT_INCS_R +FFT_LIBS_R +HDF5_INCS_R +HDF5_LIBS_R +PNETCDF_INCS_R +PNETCDF_LIBS_R +NETCDF_INCS_R +NETCDF_LIBS_R +NETCDFF_INCS_R +NETCDFF_LIBS_R +ETSF_INCS_R +ETSF_LIBS_R +FUTILE_INCS_R +FUTILE_LIBS_R +YAML_INCS_R +YAML_LIBS_R +IOTK_INCS_R +IOTK_LIBS_R MPI_info MPI_check LIBXC_check @@ -738,12 +774,12 @@ FFT_INCS FFT_LIBS fft_cfactor lapack_shared -LAPACK_SO_LIBS +LAPACK_PETSC_LIBS LAPACK_LIBS compile_lapack internal_lapack blas_shared -BLAS_SO_LIBS +BLAS_PETSC_LIBS BLAS_info BLAS_LIBS compile_blas @@ -788,6 +824,7 @@ NETCDFFLAGS OMPFLAGS FCMFLAG FUFLAGS +SLK_FC_FLAGS FCUFLAGS UFLAGS INTELVERSION @@ -866,6 +903,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -1035,6 +1073,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}' @@ -1287,6 +1326,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=* \ @@ -1424,7 +1472,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. @@ -1537,7 +1585,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.21682 h.e50ac5c58 to adapt to many kinds of systems. +\`configure' configures Yambo 5.1.0 r.22271 h.22e95509bc to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1577,6 +1625,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] @@ -1602,7 +1651,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.1.0 r.21682 h.e50ac5c58:";; + short | recursive ) echo "Configuration of Yambo 5.1.0 r.22271 h.22e95509bc:";; esac cat <<\_ACEOF @@ -1811,7 +1860,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.1.0 r.21682 h.e50ac5c58 +Yambo configure 5.1.0 r.22271 h.22e95509bc generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2490,7 +2539,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.21682 h.e50ac5c58, which was +It was created by Yambo $as_me 5.1.0 r.22271 h.22e95509bc, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2841,8 +2890,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="21682" -SHASH="e50ac5c58" +SREVISION="22271" +SHASH="22e95509bc" @@ -2895,27 +2944,11 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # 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. +# 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) 2021 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): DS AM # # Folders # @@ -2956,27 +2989,11 @@ if [ "$compdir" != "$srcdir" ] && [ "$srcdir" != "." ] ; then fi # -# 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. +# 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) 2017 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): DS # # PATH FOR EXT LIBS # ============================================================================= @@ -4397,27 +4414,11 @@ fi fi # -# 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. +# 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, 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 # @@ -4435,27 +4436,11 @@ fi # # 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. +# 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) 2006 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 # ################################################ # Check size of a pointer @@ -4491,52 +4476,20 @@ fi # -# 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. +# 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) 2008 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 # # -# 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. +# 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) 2008 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 # @@ -4600,77 +4553,29 @@ fi # -# 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. +# 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) 2007 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 # # -# 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. +# 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, 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 # # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): AM +# Copyright (C) 2010 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. -# -# 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. +# Authors (see AUTHORS file for details): AM # # ################################################ # Set FC FLAGS @@ -4682,101 +4587,46 @@ fi # Original version Available from the GNU Autoconf Macro Archive at: # http://autoconf-archive.cryp.to/macros-by-category.html # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org -# -# Authors (see AUTHORS file for details): AM, DS +# 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) 2006 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. -# -# 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 DS # # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org -# -# Authors (see AUTHORS file for details): AF -# -# 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. +# 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, 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): AF # # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): AM +# 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. -# -# 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. +# Authors (see AUTHORS file for details): AM # # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL +# +# Copyright (C) 2016 The Yambo Team # # 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. + + +# +# 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) 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 # @@ -4784,42 +4634,35 @@ fi # Report # # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL +# +# Copyright (C) 2016 The Yambo Team # # 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. + + +# +# 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) 2006 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 # # ============================================================================ -# Echo - -ECHO=" " -case `sh -c 'echo "\tx"'` in -*t*) - ECHO='echo -e';; -*) - ECHO='echo';; -esac - +# version.m4 -> version.h + +cat << EOF > include/version/version.h +#define YAMBO_VERSION $SVERSION +#define YAMBO_SUBVERSION $SSUBVERSION +#define YAMBO_PATCHLEVEL $SPATCHLEVEL +#define YAMBO_REVISION $SREVISION +#define YAMBO_HASH "$SHASH" +EOF +# # ============================================================================ # Current branch @@ -5338,7 +5181,6 @@ $as_echo "#define realloc rpl_realloc" >>confdefs.h fi -# AC_FUNC_SETVBUF_REVERSE # This is reported as obsolete { $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 : @@ -6805,13 +6647,13 @@ if test x"$enable_debug_flags" = "x"; then enable_debug_flags="no"; fi HDF5_MODE="production"; # def_compiler= +SLK_FC_FLAGS="" # case "${host}" in i?86*linux*) case "${FC}" in *pgf9* | *ftn* | *pgfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" - #FUFLAGS="-O0 -g -Mbackslash" + SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" FUFLAGS="-O0 -Mbackslash" FCMFLAG="-Mnomain" OMPFLAGS="-mp" @@ -6820,7 +6662,7 @@ i?86*linux*) DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame -Mbackslash" ;; *nvfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" FUFLAGS="-O0 -Mbackslash" FCMFLAG="-Mnomain" OMPFLAGS="-mp" @@ -6849,6 +6691,7 @@ i?86*linux*) *gfortran*) SYSFLAGS="-O3 -g -mtune=native" FUFLAGS="-O0 -mtune=native" + SLK_FC_FLAGS="-fallow-argument-mismatch" FCMFLAG="" OMPFLAGS="-fopenmp" NETCDFFLAGS="-DgFortran" @@ -6866,7 +6709,7 @@ i?86*linux*) ;; *2021* ) CPU_FLAG=" " - OMPFLAGS="-qopenmp" + OMPFLAGS="-qopenmp -parallel" FCMFLAG="-nofor-main" ;; *17* | *18* | *19* ) @@ -6901,7 +6744,7 @@ i?86*linux*) *86*apple* ) case "${FC}" in *pgf9* | *ftn* | *pgfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" FUFLAGS="-O0 -g -Mbackslash" FCMFLAG="-Mnomain" OMPFLAGS="-mp" @@ -6909,7 +6752,7 @@ i?86*linux*) DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" ;; *nvfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" FUFLAGS="-O0 -g -Mbackslash" FCMFLAG="-Mnomain" OMPFLAGS="-mp" @@ -6920,6 +6763,7 @@ i?86*linux*) *gfortran*) SYSFLAGS="-O3 -g -mtune=native" FUFLAGS="-O0 -g -mtune=native" + SLK_FC_FLAGS="-fallow-argument-mismatch" FCMFLAG="" OMPFLAGS="-fopenmp" NETCDFFLAGS="-DgFortran" @@ -6958,7 +6802,8 @@ i?86*linux*) ia64*linux* ) case "${FC}" in *pgf9* | *ftn* | *pgfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" + #SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" FUFLAGS="-O0 -g -Mbackslash" FCMFLAG="-Mnomain" OMPFLAGS="-mp" @@ -6967,7 +6812,7 @@ ia64*linux* ) DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" ;; *nvfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" FUFLAGS="-O0 -g -Mbackslash" FCMFLAG="-Mnomain" OMPFLAGS="-mp" @@ -6978,6 +6823,7 @@ ia64*linux* ) *gfortran*) SYSFLAGS="-O3 -g -mtune=native" FUFLAGS="-O0 -g -mtune=native" + SLK_FC_FLAGS="-fallow-argument-mismatch" FCMFLAG="" OMPFLAGS="-fopenmp" NETCDFFLAGS="-DgFortran" @@ -7050,6 +6896,7 @@ ia64*linux* ) *gfortran*) SYSFLAGS="-O3 -g -mtune=native" FUFLAGS="-O0 -g -mtune=native" + SLK_FC_FLAGS="-fallow-argument-mismatch" FCMFLAG="" OMPFLAGS="-fopenmp" NETCDFFLAGS="-DgFortran" @@ -7081,7 +6928,7 @@ ia64*linux* ) ;; *2020* | *2021* ) CPU_FLAG=" " - OMPFLAGS="-qopenmp" + OMPFLAGS="-qopenmp -parallel" FCMFLAG="-nofor-main" CFLAGS="-O2 -std=gnu99" ;; @@ -7133,7 +6980,7 @@ alphaev*) powerpc64*linux* ) case "${FC}" in *pgf9* | *ftn* | *pgfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" FUFLAGS="-O0 -g -Mbackslash" FCMFLAG="-Mnomain" OMPFLAGS="-mp" @@ -7142,7 +6989,7 @@ powerpc64*linux* ) DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" ;; *nvfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" FUFLAGS="-O0 -g -Mbackslash" FCMFLAG="-Mnomain" OMPFLAGS="-mp" @@ -7153,6 +7000,7 @@ powerpc64*linux* ) *gfortran*) SYSFLAGS="-O3 -g -mtune=native" FUFLAGS="-O0 -g -mtune=native" + SLK_FC_FLAGS="-fallow-argument-mismatch" FCMFLAG="" OMPFLAGS="-fopenmp" NETCDFFLAGS="-DgFortran" @@ -7237,6 +7085,7 @@ $as_echo "$NETCDFFLAGS" >&6; } + # acx_save_fcflags="$FCFLAGS" FCFLAGS="$acx_save_fcflags $F90EXTFLAGS" @@ -8218,6 +8067,9 @@ 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* ) @@ -8365,16 +8217,16 @@ cat > conftest.F << EOF_ 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 -i "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 -i "warning" conftest.er2`" || test -n "`grep "command line remark" conftest.er2`" ) ; then acx_FC_ok=no ; FPP_TESTS_PASSED=no; @@ -8643,27 +8495,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Scripts # # -# 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. +# 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, 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 # @@ -8674,27 +8510,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Original version Available from the GNU Autoconf Macro Archive at: # http://autoconf-archive.cryp.to/macros-by-category.html # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): AM, DS +# Copyright (C) 2017 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. -# -# 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. +# Authors (see AUTHORS file for details): AM DS # mpibuild="yes" @@ -9689,54 +9509,22 @@ url_ydb=https://github.com/yambo-code/ydb.git # from http://www.arsc.edu/support/news/HPCnews/HPCnews249.shtml # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org -# -# Authors (see AUTHORS file for details): AM, AF, DS +# 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) 2006 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. -# -# 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 AF DS # # # from http://www.arsc.edu/support/news/HPCnews/HPCnews249.shtml # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org -# -# 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 -# 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. +# 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) 2021 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 AF DS CA # @@ -9762,153 +9550,57 @@ url_ydb=https://github.com/yambo-code/ydb.git # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): AM, AF +# Copyright (C) 2014 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. -# -# 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. +# Authors (see AUTHORS file for details): AM AF # # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): DS +# Copyright (C) 2019 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. -# -# 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. +# Authors (see AUTHORS file for details): DS # # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org -# -# 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) 2015 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. -# -# 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): AF # # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org -# -# Authors (see AUTHORS file for details): AF -# -# 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. +# 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) 2015 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): AF # # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2006 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 # # # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org -# -# Authors (see AUTHORS file for details): AM +# 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) 2016 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. -# -# 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 # @@ -11161,23 +10853,29 @@ if test x"$enable_openmp_int_linalg" = "xyes" ; then fi # Test for shared BLAS -BLAS_SO_LIBS="" +BLAS_PETSC_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"; + BLAS_PETSC_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} + +if test "$acx_blas_ok" = "yes" ; then + if test -d "${MKLROOT}" || test "${BLAS_LIBS}" = "*.so"; then + BLAS_PETSC_LIBS=${BLAS_LIBS} + else + BLAS_PETSC_LIBS=`echo "$BLAS_LIBS" | sed "s/\.a//g" | sed "s/\.so//g" | sed "s/\ \-L//g" | sed "s/\ \-l/lib/g" ` + BLAS_PETSC_LIBS="${BLAS_PETSC_LIBS}.so" + #echo "Debug: BLAS_PETSC_LIBS=$BLAS_PETSC_LIBS"; + if ! test -e $BLAS_PETSC_LIBS ; then BLAS_PETSC_LIBS="" ; fi + fi fi -blas_shared="no" -if test x"${BLAS_SO_LIBS}" = "x"; then - BLAS_SO_LIBS=${BLAS_LIBS} +# +blas_shared="0" +if test x"${BLAS_PETSC_LIBS}" = "x"; then + BLAS_PETSC_LIBS=${BLAS_LIBS} else - blas_shared="yes" + blas_shared="1" fi @@ -11680,23 +11378,30 @@ if test "$internal_lapack" = "yes"; then fi # Test for shared LAPACK -LAPACK_SO_LIBS="" +LAPACK_PETSC_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"; + LAPACK_PETSC_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} +# +if test "$acx_lapack_ok" = "yes" ; then + if test -d "${MKLROOT}" || test "${lapack_LIBS}" = "*.so"; then + LAPACK_PETSC_LIBS=${LAPACK_LIBS} + else + LAPACK_PETSC_LIBS=`echo "$LAPACK_LIBS" | sed "s/\.a//g" | sed "s/\.so//g" | sed "s/\ \-L//g" | sed "s/\ \-l/lib/g" ` + LAPACK_PETSC_LIBS="${LAPACK_PETSC_LIBS}.so" + #echo "Debug: LAPACK_PETSC_LIBS=$LAPACK_PETSC_LIBS" + if ! test -e $LAPACK_PETSC_LIBS ; then LAPACK_PETSC_LIBS="" ; fi + fi 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 +if test "x${LAPACK_PETSC_LIBS}" = "x"; then + LAPACK_PETSC_LIBS=${LAPACK_LIBS} else - lapack_shared="1" + if test "x$blas_shared" = "x1" ; then lapack_shared="1" ; fi fi @@ -12387,7 +12092,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu #include #include #include -#include +#include end _ACEOF if ac_fn_fc_try_compile "$LINENO"; then : @@ -12424,24 +12129,42 @@ $as_echo_n "checking for internal Petsc library... " >&6; } # internal_petsc="yes" # + PETSC_LIBS_DN="${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libpetsc.so" ; + PETSC_LIBS_ST="${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" ; + PETSC_LIBS="$PETSC_LIBS_DN" ; else - PETSC_LIBS="${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libpetsc.a" ; + PETSC_LIBS="$PETSC_LIBS_ST" ; fi PETSC_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/${build_precision}/include" ; # if test "$use_libdl" = "yes"; then PETSC_LIBS="$PETSC_LIBS -ldl" ; fi # petsc=yes - if test -e "${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libpetsc.a" ; then + if test -e "$PETSC_LIBS_DN" ; then + PETSC_LIBS="$PETSC_LIBS_DN" ; compile_petsc="no" ; - { $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 + 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; } ; + 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; } ; + fi + elif test -e "$PETSC_LIBS_ST" ; then + PETSC_LIBS="$PETSC_LIBS_ST" ; compile_petsc="no" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } ; + 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; } ; + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: static already compiled" >&5 +$as_echo "static already compiled" >&6; } ; + fi else compile_petsc="yes" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 @@ -12552,22 +12275,40 @@ $as_echo_n "checking for internal Slepc library... " >&6; } # internal_slepc="yes"; # + SLEPC_LIBS_DN=${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libslepc.so + SLEPC_LIBS_ST=${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" ; + SLEPC_LIBS="$SLEPC_LIBS_DN -Wl,-rpath=${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib" ; else - SLEPC_LIBS="${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libslepc.a" ; + SLEPC_LIBS="$SLEPC_LIBS_ST" ; 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 + if test -e "$SLEPC_LIBS_DN" ; then + SLEPC_LIBS="$SLEPC_LIBS_DN -Wl,-rpath=${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib" ; compile_slepc="no" ; - { $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 + 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; } ; + 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; } ; + fi + elif test -e "$SLEPC_LIBS_ST" ; then + SLEPC_LIBS="$SLEPC_LIBS_ST" ; compile_slepc="no" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } ; + 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; } ; + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: static already compiled" >&5 +$as_echo "static already compiled" >&6; } ; + fi else compile_slepc="yes" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 @@ -13197,6 +12938,18 @@ 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 "$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; } ; + fi # ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -13213,27 +12966,26 @@ 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 - # - { $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 + 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" ; + 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 @@ -13244,11 +12996,13 @@ else fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; - # - FCFLAGS="$save_fcflags" ; - LIBS="$save_libs" ; - # - else + # + 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; } ; # # Automatic detection of hdf5 libs copied from QE # @@ -13269,11 +13023,13 @@ $as_echo_n "checking for HDF5 using h5pfc/h5fc system compilers... " >&6; } ; h5fc=$(command -v h5fc) fi # - if test -e $h5pfc; then + # Check for the existence of the pre-compiled library corresponding to what needed by yambo + # + if test -e $h5pfc && test $IO_LIB_VER = "parallel"; 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 + elif test -e $h5fc && test $IO_LIB_VER = "serial"; 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"; @@ -13310,7 +13066,9 @@ rm -f core conftest.err conftest.$ac_objext \ FCFLAGS="$save_fcflags" ; LIBS="$save_libs" ; # - if test "x$hdf5" = xno; then + 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 @@ -13367,6 +13125,8 @@ rm -f core conftest.err conftest.$ac_objext \ fi fi # + # To be fixed + # if test "x$hdf5" = xyes; then HDF5_LIBS="$try_HDF5_LIBS" ; HDF5_INCS="$try_HDF5_INCS" ; @@ -13385,10 +13145,10 @@ $as_echo "yes - serial lib found" >&6; } ; fi # if test "x$hdf5" = xno; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + if ! test "$with_hdf5_libs" = "internal" ; 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 + fi # { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal HDF5 library" >&5 $as_echo_n "checking for internal HDF5 library... " >&6; }; @@ -13399,7 +13159,9 @@ $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/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_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" ; # hdf5=yes ; @@ -14386,6 +14148,7 @@ fi +# # @@ -14558,15 +14321,6 @@ fi internal_libxc="no" compile_libxc="no" -if test -d "$with_libxc_path"; then - libxc_incdir="$with_libxc_path/include" - libxc_libdir="$with_libxc_path/lib" -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 - -LIBXC_INCS="$IFLAG$libxc_incdir" - acx_libxc_save_LIBS="$LIBS" acx_libxc_save_FCFLAGS="$FCFLAGS" @@ -14583,11 +14337,11 @@ testprog=" program main end" -FCFLAGS="$LIBXC_INCS $acx_libxc_save_FCFLAGS" # set from environment variable, if not blank if test ! -z "$LIBXC_LIBS"; then LIBS="$LIBXC_LIBS" + FCFLAGS="$LIBXC_INCS $acx_libxc_save_FCFLAGS" cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF @@ -14598,24 +14352,29 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -# set from --with-libxc-libs flag -if test x"$acx_libxc_ok" = xno && test ! -z "$with_libxc_libs" ; then - LIBXC_LIBS="$with_libxc_libs" - 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$ac_exeext conftest.$ac_ext -fi +# set from configure flags +if test x"$acx_libxc_ok" = xno ; then + # + LIBXC_LIBS="-lxcf90 -lxcf03 -lxc" + LIBXC_INCS="" + # + if test -d "$with_libxc_path"; then + libxc_incdir="$with_libxc_path/include" + libxc_libdir="$with_libxc_path/lib" + 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_incdir"; then LIBXC_INCS="$IFLAG$libxc_incdir"; fi + # + if test ! -z "$with_libxc_libs" ; then LIBXC_LIBS="$with_libxc_libs" ; fi + if test ! -z "$with_libxc_incs" ; then LIBXC_INCS="$with_libxc_incs" ; fi -# dynamic linkage, separate Fortran interface -if test x"$acx_libxc_ok" = xno; then - LIBXC_LIBS="-L$libxc_libdir -lxcf90 -lxcf03 -lxc" LIBS="$LIBXC_LIBS" + FCFLAGS="$LIBXC_INCS $acx_libxc_save_FCFLAGS" + cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF @@ -14624,13 +14383,12 @@ if ac_fn_fc_try_link "$LINENO"; then : 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_libxc_ok" = xno; then - LIBXC_LIBS="$libxc_libdir/libxcf90.a $libxc_libdir/libxcf03.a $libxc_libdir/libxc.a" - LIBS="$LIBXC_LIBS" - cat > conftest.$ac_ext <<_ACEOF + # 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 : @@ -14638,8 +14396,10 @@ if ac_fn_fc_try_link "$LINENO"; then : fi 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 @@ -15108,6 +14868,423 @@ fi +# +# STRIPE [LIB] from paths +# + +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'` +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'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +IOTK_INCS_R=$STRIPE + + +# + +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'` +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'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +YAML_INCS_R=$STRIPE + + +# + +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'` +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'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +FUTILE_INCS_R=$STRIPE + + +# + +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'` +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'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +ETSF_INCS_R=$STRIPE + + +# + +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'` +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'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +NETCDFF_INCS_R=$STRIPE + + +# + +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'` +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'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +NETCDF_INCS_R=$STRIPE + + +# + +TMP1=`echo $PNETCDF_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 + +PNETCDF_LIBS_R=$STRIPE + +TMP1=`echo $PNETCDF_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 + +PNETCDF_INCS_R=$STRIPE + + +# + +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'` +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'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +HDF5_INCS_R=$STRIPE + + +# + +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'` +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'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +FFT_INCS_R=$STRIPE + + +# + +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'` +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'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +BLAS_INCS_R=$STRIPE + + +# + +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'` +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'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +LAPACK_INCS_R=$STRIPE + + +# + +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'` +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'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +SCALAPACK_INCS_R=$STRIPE + + +# + +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'` +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'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +BLACS_INCS_R=$STRIPE + + +# + +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'` +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'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +PETSC_INCS_R=$STRIPE + + +# + +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'` +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'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +SLEPC_INCS_R=$STRIPE + + +# + +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'` +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'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +LIBXC_INCS_R=$STRIPE + + +# + +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'` +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'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +BLAS_PETSC_INCS_R=$STRIPE + + +# + +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'` +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'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +LAPACK_PETSC_INCS_R=$STRIPE + + +# # ============================================================================ # Compilation dir @@ -15624,7 +15801,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.21682 h.e50ac5c58, which was +This file was extended by Yambo $as_me 5.1.0 r.22271 h.22e95509bc, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15686,7 +15863,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.21682 h.e50ac5c58 +Yambo config.status 5.1.0 r.22271 h.22e95509bc configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -16408,27 +16585,11 @@ fi # Folders # # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): DS AM +# Copyright (C) 2017 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. -# -# 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. +# Authors (see AUTHORS file for details): DS AM # chmod u+x sbin/* # diff --git a/doc/doxygen/000_doxygen_example.F b/doc/doxygen/000_doxygen_example.F index 8389528281..4d723d918c 100644 --- a/doc/doxygen/000_doxygen_example.F +++ b/doc/doxygen/000_doxygen_example.F @@ -1,9 +1,4 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org -! -! Authors (see AUTHORS file for details): AM -! !> @ch (Name added through macro expansion) !> @author Mr. Ed !> - 10/01/2015 Added bug diff --git a/driver/yambo.F b/driver/yambo.F index 6076606f4a..717da11b36 100644 --- a/driver/yambo.F +++ b/driver/yambo.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 DS ! integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir,js) ! @@ -31,7 +15,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_X,& +& l_optics,l_chi,l_em1s,l_ppa,l_mpa,l_bss,l_bse,l_em1d,l_X,& & 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 @@ -57,8 +41,8 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d ! ! 4 response function & energies types: x s d p ! - type(X_t) ::X(4) - type(w_samp) ::Xw(4) + type(X_t) ::X(5) + type(w_samp) ::Xw(5) ! type(DIPOLE_t) :: Dip ! @@ -144,8 +128,10 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d ! ! COLOUMB DRIVER !================ + ! In non-linear optics we do not need bare_qpg + ! it will be loaded only if required ! - call col_driver(maxval((/wf_ng,QP_ng_Sx,QP_ng_SH/)),q) + if(.not.l_nl_optics) call col_driver(maxval((/wf_ng,QP_ng_Sx,QP_ng_SH/)),q) ! ! reset the section numbering !============================= @@ -160,7 +146,7 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d ! DIPOLES !========= ! - driver_now= any((/l_em1d,l_em1s,l_ppa,l_optics,l_life.and.l_elel_corr,l_dipoles,l_real_time,& + driver_now= any((/l_em1d,l_em1s,l_ppa,l_mpa,l_optics,l_life.and.l_elel_corr,l_dipoles,l_real_time,& & l_sc_run,l_nl_optics/)).and.Dip%iq(1)==1 ! if (driver_now) call DIPOLE_driver(DIPen, Xk, q, Dip) @@ -183,12 +169,15 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d if ( l_em1s ) i_X_kind=2 if ( l_em1d .or.(l_life.and.l_elel_corr) ) i_X_kind=3 if ( l_ppa ) i_X_kind=4 + if ( l_mpa ) i_X_kind=5 if ( i_X_kind==0 ) then i_X_kind=1 if ( i_X_kind_existing_DB >0 ) i_X_kind=i_X_kind_existing_DB endif ! - driver_now=l_em1s.or.(l_em1d.and..not.l_life).or.l_ppa.or.l_X + driver_now=l_em1s.or.(l_em1d.and..not.l_life).or.l_ppa.or.l_mpa.or.l_X + ! + if(l_nl_optics.and.driver_now) call error('Please run the calculation of em1s/d/x in a separate run') ! if (driver_now) i_err=X_dielectric_matrix(Xen,Xk,q,X(i_X_kind),Xw(i_X_kind),Dip,.false.) if (driver_now) call mem_manager_report diff --git a/driver/ypp.F b/driver/ypp.F index 6d817f05d4..2906592548 100644 --- a/driver/ypp.F +++ b/driver/ypp.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! integer function ypp(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir,js) ! @@ -27,7 +11,8 @@ integer function ypp(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir use stderr, ONLY:write_to_log,STRING_same use parallel_m, ONLY:ncpu,myid use electrons, ONLY:levels,E_reset,n_bands,default_nel - use R_lattice, ONLY:bz_samp,bz_samp_reset,nkibz,ng_vec,nXkibz,nqibz,k_pt,q_pt + use R_lattice, ONLY:bz_samp,bz_samp_reset,nkibz,ng_vec,nXkibz,nqibz,k_pt,q_pt, & +& X_scattering,sigma_scattering use D_lattice, ONLY:input_GS_Tel,alat,nsym use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD_CL,NONE,DUMP @@ -173,11 +158,14 @@ integer function ypp(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir ! BZ sampling index ! call section('*','K-point grid') + + X_scattering =.TRUE. #if defined _YPP_ELPH if(l_gkkp_db.or.l_sp_wf.or.l_mean_potential) then ! I need qindx_S to expand gkkp and load WF #else if(l_sp_wf.or.l_mean_potential) then #endif + sigma_scattering=.TRUE. call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/1,2,3,4/),MODE=DUMP,ID=ID) else call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/1,2,3/),MODE=DUMP,ID=ID) diff --git a/driver/ypp_project.dep b/driver/ypp_project.dep new file mode 100644 index 0000000000..92c29af4f7 --- /dev/null +++ b/driver/ypp_project.dep @@ -0,0 +1,2 @@ + ypp.o + diff --git a/include/branch.inc.in b/include/branch.inc.in index f824f64628..f8822c3365 100644 --- a/include/branch.inc.in +++ b/include/branch.inc.in @@ -1 +1,8 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2019 The Yambo Team +! +! Authors (see AUTHORS file for details): AM +! code_branch="@Y_BRANCH@" diff --git a/include/driver/editor.h.in b/include/driver/editor.h.in index 284fa881d5..69b2626084 100644 --- a/include/driver/editor.h.in +++ b/include/driver/editor.h.in @@ -1,24 +1,8 @@ /* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org + License-Identifier: GPL - 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. + Copyright (C) 2019 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 */ char *editor="@editor@ "; diff --git a/include/driver/fortran_driver.h b/include/driver/fortran_driver.h index b419e66a32..d4f987d7b5 100644 --- a/include/driver/fortran_driver.h +++ b/include/driver/fortran_driver.h @@ -1,25 +1,9 @@ /* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org + License-Identifier: GPL - 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. + Copyright (C) 2019 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): DS */ /* Tool drivers diff --git a/include/driver/tool.h b/include/driver/tool.h index f7271ee6f0..d6438e810d 100644 --- a/include/driver/tool.h +++ b/include/driver/tool.h @@ -1,25 +1,9 @@ /* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org + License-Identifier: GPL - 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. + Copyright (C) 2019 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): DS tool & desc diff --git a/include/driver/yambo_driver.h b/include/driver/yambo_driver.h index f2ef5bb39c..e6f33c8361 100644 --- a/include/driver/yambo_driver.h +++ b/include/driver/yambo_driver.h @@ -1,25 +1,9 @@ /* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org + License-Identifier: GPL - 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. + Copyright (C) 2019 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 */ int load_environments(char *file_name); void options_control(struct options_struct options[],int *i_opt); diff --git a/include/headers/common/collisions.h b/include/headers/common/collisions.h index 39f5e57c70..49900831f3 100644 --- a/include/headers/common/collisions.h +++ b/include/headers/common/collisions.h @@ -1,25 +1,9 @@ /* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org + License-Identifier: GPL - 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. + Copyright (C) 2019 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): DS */ #if defined _PAR_IO #define io_COLLs_header io_COLLISIONS_header diff --git a/include/headers/common/dev_defs.h b/include/headers/common/dev_defs.h index 2b58aae521..a0602c53bc 100644 --- a/include/headers/common/dev_defs.h +++ b/include/headers/common/dev_defs.h @@ -1,27 +1,12 @@ /* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): AF + 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. - - 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. + Authors (see AUTHORS file for details): AF */ +#include #ifdef __STDC__ # define CAT(a,b) a##b @@ -50,11 +35,24 @@ #define DEV_ATTR DEV_ATTRIBUTE #define DEV_PIN DEV_PINNED -!#ifdef CUDA -! #define YAMBO_CUDA_OR_OMP(priv_list,nloop) !$cuf kernel do(nloop) <<<*,*>>> -! #define YAMBO_CUDA_OR_OMP_END -!#else -! #define YAMBO_CUDA_OR_OMP(priv_list,nloop) !$omp parallel do default(shared), private(private_list), collapse(nloop) -! #define YAMBO_CUDA_OR_OMP_END !$omp end parallel do -!#endif + +#if defined _OPENACC +# define DEV_ACC $acc +# define _HAVE_DEVICE +#else +# define DEV_ACC !!!! +#endif + +#if defined _CUDA +# define DEV_CUF $cuf +# define _HAVE_DEVICE +#else +# define DEV_CUF !!!! +#endif + +#if defined _OPENMP && !defined (_HAVE_DEVICE) +# define DEV_OMP $omp +#else +# define DEV_OMP !!!! +#endif diff --git a/include/headers/common/dev_defs_nocuda.h b/include/headers/common/dev_defs_nocuda.h index af64383770..61969042a1 100644 --- a/include/headers/common/dev_defs_nocuda.h +++ b/include/headers/common/dev_defs_nocuda.h @@ -1,25 +1,9 @@ /* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - 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. - - 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) 2016 The Yambo Team + + Authors (see AUTHORS file for details): AF */ @@ -42,6 +26,7 @@ #define DEV_ATTR DEV_ATTRIBUTE #define DEV_PIN DEV_PINNED -!#define YAMBO_CUDA_OR_OMP(priv_list,nloop) !$omp parallel do default(shared), private(priv_list), collapse(nloop) -!#define YAMBO_CUDA_OR_OMP_END !$omp end parallel do +#define DEV_ACC !!!! +#define DEV_CUF !!!! +#define DEV_OMP $omp diff --git a/include/headers/common/dev_undefs.h b/include/headers/common/dev_undefs.h index 4fa3e2a870..713c42dd47 100644 --- a/include/headers/common/dev_undefs.h +++ b/include/headers/common/dev_undefs.h @@ -1,25 +1,9 @@ /* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - 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. - - 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) 2016 The Yambo Team + + Authors (see AUTHORS file for details): AF */ @@ -35,6 +19,6 @@ #undef DEV_ATTR #undef DEV_PIN -!#undef YAMBO_CUDA_OR_OMP -!#undef YAMBO_CUDA_OR_OMP_END - +#undef DEV_ACC +#undef DEV_OMP +#undef DEV_CUF diff --git a/include/headers/common/device_macros.h b/include/headers/common/device_macros.h index 3d6bdba2ce..277789589d 100644 --- a/include/headers/common/device_macros.h +++ b/include/headers/common/device_macros.h @@ -5,7 +5,20 @@ # endif #endif +#if defined(_OPENACC) +# ifndef __OPENACC +# define __OPENACC +# endif +#endif + +#if defined(_OPENMP5) +# ifndef __OPENMP5 +# define __OPENMP5 +# endif +#endif + #if defined(__CUDA) || defined(__OPENACC) || defined(__OPENMP5) # define __HAVE_DEVICE +# define _HAVE_DEVICE #endif diff --git a/include/headers/common/have_malloc.h.in b/include/headers/common/have_malloc.h.in index 96c4c5f58f..d97527b36b 100644 --- a/include/headers/common/have_malloc.h.in +++ b/include/headers/common/have_malloc.h.in @@ -1,26 +1,9 @@ /* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): AM + 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. - - 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) 2016 The Yambo Team + Authors (see AUTHORS file for details): AM */ /* do we have the mallinfo structure (see clib/memstat.c) ? */ diff --git a/include/headers/common/memory.h b/include/headers/common/memory.h index 28d14fb242..4ee5bc8620 100644 --- a/include/headers/common/memory.h +++ b/include/headers/common/memory.h @@ -1,30 +1,17 @@ /* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): HM 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. - - 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. + Authors (see AUTHORS file for details): HM AM */ use memory, ONLY:MEM_err,MEM_msg,MEM_count,MEM_global_mesg,IPL implicit none - + + integer(IPL) :: Sz_mem__ + integer :: i_mem__ + #if defined _MPI /* MPI only part */ @@ -163,7 +150,10 @@ #define YAMBO_FREE(x) \ if (.not.allocated(x)) &NEWLINE& call MEM_free(QUOTES x QUOTES,int(-1,KIND=IPL))NEWLINE \ - if ( allocated(x)) &NEWLINE& call MEM_free(QUOTES x QUOTES,size(x,KIND=IPL))NEWLINE \ + if ( allocated(x)) then NEWLINE Sz_mem__ =1 NEWLINE \ + do i_mem__ = 1,size(shape(x)) NEWLINE Sz_mem__ = Sz_mem__*size(x,i_mem__,KIND=IPL) NEWLINE enddo NEWLINE \ + call MEM_free(QUOTES x QUOTES,Sz_mem__ )NEWLINE \ + endif NEWLINE \ if ( allocated(x)) &NEWLINE& deallocate(x) #define YAMBO_FREE_P(x) \ if (.not.associated(x)) &NEWLINE& call MEM_free(QUOTES x QUOTES,int(-1,KIND=IPL))NEWLINE \ diff --git a/include/headers/common/wrapper.h b/include/headers/common/wrapper.h index 9992a42fa5..4b1c08355e 100644 --- a/include/headers/common/wrapper.h +++ b/include/headers/common/wrapper.h @@ -1,25 +1,9 @@ /* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org + License-Identifier: GPL - 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. + Copyright (C) 2019 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): DS */ /* C wrapper diff --git a/config/version/version.m4 b/include/version/version.m4 similarity index 59% rename from config/version/version.m4 rename to include/version/version.m4 index a4c228ab2e..89bccb663f 100644 --- a/config/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.21876 h.7fe3130aa, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.22315 h.cf5cb0857, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="21876" -SHASH="7fe3130aa" +SREVISION="22315" +SHASH="cf5cb0857" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/interfaces/a2y/a2y.F b/interfaces/a2y/a2y.F index df15320be0..98d9f2c6d4 100644 --- a/interfaces/a2y/a2y.F +++ b/interfaces/a2y/a2y.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CH DS HM -! -! 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) 2006 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. -! -! 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): CH DS HM ! integer function a2y(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir,js) ! diff --git a/interfaces/a2y/a2y_db1.F b/interfaces/a2y/a2y_db1.F index 4a510034c4..fc04bcee5a 100644 --- a/interfaces/a2y/a2y_db1.F +++ b/interfaces/a2y/a2y_db1.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CH DS HM -! -! 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) 2006 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. -! -! 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): CH DS HM ! subroutine a2y_db1(en,k,ncid) ! diff --git a/interfaces/a2y/a2y_kb_pp.F b/interfaces/a2y/a2y_kb_pp.F index e0a26fc83c..1f39ca466e 100644 --- a/interfaces/a2y/a2y_kb_pp.F +++ b/interfaces/a2y/a2y_kb_pp.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CH HM -! -! 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) 2006 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. -! -! 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): CH HM ! subroutine a2y_kb_pp( ikibz, ncid ) ! diff --git a/interfaces/a2y/a2y_wf.F b/interfaces/a2y/a2y_wf.F index 0331ea0c84..6a3581086f 100644 --- a/interfaces/a2y/a2y_wf.F +++ b/interfaces/a2y/a2y_wf.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CH DS HM -! -! 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. +! Copyright (C) 2006 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): CH DS HM ! subroutine a2y_wf(wf_disk,i_sp_pol,ikibz,ib_grp, ncid) ! diff --git a/interfaces/a2y/netcdf_data.F b/interfaces/a2y/netcdf_data.F index 4a060b32cb..5e13b91426 100644 --- a/interfaces/a2y/netcdf_data.F +++ b/interfaces/a2y/netcdf_data.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CH HM -! -! 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) 2006 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. -! -! 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): CH HM ! module netcdf_data ! diff --git a/interfaces/c2y/c2y.F b/interfaces/c2y/c2y.F index 487022d18e..dff0c83cf7 100644 --- a/interfaces/c2y/c2y.F +++ b/interfaces/c2y/c2y.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DV -! -! 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. +! Copyright (C) 2006 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): DV ! integer function c2y(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir,js) ! diff --git a/interfaces/c2y/c2y_db1.F b/interfaces/c2y/c2y_db1.F index f824c8014e..9799217379 100644 --- a/interfaces/c2y/c2y_db1.F +++ b/interfaces/c2y/c2y_db1.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL +! +! Copyright (C) 2010 The Yambo Team ! ! Authors (see AUTHORS file for details): DV -! -! 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 c2y_db1(en,k,file_name_) ! diff --git a/interfaces/c2y/c2y_file_name.F b/interfaces/c2y/c2y_file_name.F index 977a4c0952..afa3c39c16 100644 --- a/interfaces/c2y/c2y_file_name.F +++ b/interfaces/c2y/c2y_file_name.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DV -! -! 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. +! Copyright (C) 2006 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): DV ! integer function c2y_file_name(inf,file_name_) ! diff --git a/interfaces/c2y/c2y_wf.F b/interfaces/c2y/c2y_wf.F index 6e06c251ff..3bc8fe245d 100644 --- a/interfaces/c2y/c2y_wf.F +++ b/interfaces/c2y/c2y_wf.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DV -! -! 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. +! Copyright (C) 2010 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): DV ! subroutine c2y_wf(wf_disk,i_sp_pol,ikibz,ib_grp,KSS_file_name) ! diff --git a/interfaces/e2y/e2y.F b/interfaces/e2y/e2y.F index 94def0c092..6389d32d7d 100644 --- a/interfaces/e2y/e2y.F +++ b/interfaces/e2y/e2y.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CH 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. +! Copyright (C) 2006 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. -! -! 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): CH DS ! integer function e2y(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir,js) ! diff --git a/interfaces/e2y/e2y_db1.F b/interfaces/e2y/e2y_db1.F index ee91d4c37b..45c7a26868 100644 --- a/interfaces/e2y/e2y_db1.F +++ b/interfaces/e2y/e2y_db1.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CH 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. +! Copyright (C) 2006 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. -! -! 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): CH DS ! subroutine e2y_db1(en,k,ncid) ! diff --git a/interfaces/e2y/e2y_kb_pp.F b/interfaces/e2y/e2y_kb_pp.F index 076b185d97..b74b84e2d0 100644 --- a/interfaces/e2y/e2y_kb_pp.F +++ b/interfaces/e2y/e2y_kb_pp.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CH -! -! 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) 2006 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. -! -! 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): CH ! subroutine e2y_kb_pp( ikibz, ncid ) ! diff --git a/interfaces/e2y/e2y_wf.F b/interfaces/e2y/e2y_wf.F index 563ccec140..e25970630f 100644 --- a/interfaces/e2y/e2y_wf.F +++ b/interfaces/e2y/e2y_wf.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CH 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. +! Copyright (C) 2006 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): CH DS ! subroutine e2y_wf(wf_disk,i_sp_pol,ikibz,ib_grp, ncid) !============================================== diff --git a/interfaces/e2y/e2y_wf_components.F b/interfaces/e2y/e2y_wf_components.F index e74c8a9aac..b195b8a85b 100644 --- a/interfaces/e2y/e2y_wf_components.F +++ b/interfaces/e2y/e2y_wf_components.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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): DS ! subroutine e2y_wf_components(ncid) !============================================== diff --git a/interfaces/e2y/etsf_data.F b/interfaces/e2y/etsf_data.F index cf7b89ac2f..9901c003a4 100644 --- a/interfaces/e2y/etsf_data.F +++ b/interfaces/e2y/etsf_data.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CH -! -! 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) 2006 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. -! -! 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): CH ! module etsf_data ! diff --git a/interfaces/int_modules/mod_com2y.F b/interfaces/int_modules/mod_com2y.F index 7e3549398a..e42298891c 100644 --- a/interfaces/int_modules/mod_com2y.F +++ b/interfaces/int_modules/mod_com2y.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 ! module mod_com2y ! diff --git a/interfaces/int_modules/mod_wf2y.F b/interfaces/int_modules/mod_wf2y.F index c0d4f9e510..90432c662e 100644 --- a/interfaces/int_modules/mod_wf2y.F +++ b/interfaces/int_modules/mod_wf2y.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2008 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. -! -! 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 ! module mod_wf2y ! diff --git a/interfaces/int_modules/mod_xc2y.F b/interfaces/int_modules/mod_xc2y.F index 056f790754..fa7965cb30 100644 --- a/interfaces/int_modules/mod_xc2y.F +++ b/interfaces/int_modules/mod_xc2y.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG,DV +! Copyright (C) 2010 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. -! -! 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. +! Authors (see AUTHORS file for details): MG DV ! module mod_xc2y ! diff --git a/interfaces/p2y/PP_PWscf_comp.F b/interfaces/p2y/PP_PWscf_comp.F index b242169bdf..593d983f2a 100644 --- a/interfaces/p2y/PP_PWscf_comp.F +++ b/interfaces/p2y/PP_PWscf_comp.F @@ -1,24 +1,10 @@ -! Self-energies and eXcitations (SaX) -! Copyright (C) 2006 SaX developers team ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL +! +! Copyright (C) 2013 The Yambo Team +! Copyright (C) 2006 SaX developers team ! -! Authors (see AUTHORS file for details): DS -! -! 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +! Authors (see AUTHORS file for details): AF ! subroutine PP_PWscf_comp(basis,atoms) use pw_basis_module diff --git a/interfaces/p2y/PP_PWscf_comp_nlcc.F b/interfaces/p2y/PP_PWscf_comp_nlcc.F index 507f2088d8..05180a26a7 100644 --- a/interfaces/p2y/PP_PWscf_comp_nlcc.F +++ b/interfaces/p2y/PP_PWscf_comp_nlcc.F @@ -1,24 +1,10 @@ -! Self-energies and eXcitations (SaX) -! Copyright (C) 2006 SaX developers team ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL +! +! Copyright (C) 2013 The Yambo Team +! Copyright (C) 2006 SaX developers team ! ! Authors (see AUTHORS file for details): AF -! -! 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ! subroutine PP_PWscf_comp_nlcc(basis,atoms) use pw_basis_module diff --git a/interfaces/p2y/mod_p2y.F b/interfaces/p2y/mod_p2y.F index 91b7d700bc..5f811e96cd 100644 --- a/interfaces/p2y/mod_p2y.F +++ b/interfaces/p2y/mod_p2y.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, AF, DV +! Copyright (C) 2007 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. -! -! 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. +! Authors (see AUTHORS file for details): AM AF DV ! module P2Ym ! diff --git a/interfaces/p2y/mod_pw_data.F b/interfaces/p2y/mod_pw_data.F index 89d5c46120..af2146d984 100644 --- a/interfaces/p2y/mod_pw_data.F +++ b/interfaces/p2y/mod_pw_data.F @@ -1,26 +1,10 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL +! +! Copyright (C) 2006 The Yambo Team ! ! Authors (see AUTHORS file for details): CH ! -! 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 pw_data use pars, only : DP save diff --git a/interfaces/p2y/p2y.F b/interfaces/p2y/p2y.F index da1275eb5b..7dab8b0d3b 100644 --- a/interfaces/p2y/p2y.F +++ b/interfaces/p2y/p2y.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CH, AF -! -! 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) 2006 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. -! -! 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): CH AF ! integer function p2y(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir,js) ! diff --git a/interfaces/p2y/p2y_atmproj.F b/interfaces/p2y/p2y_atmproj.F index a285d914ed..859d80f55c 100644 --- a/interfaces/p2y/p2y_atmproj.F +++ b/interfaces/p2y/p2y_atmproj.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DS,DV -! -! 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) 2018 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. -! -! 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): DSDV ! subroutine p2y_atmproj(filename,k) ! diff --git a/interfaces/p2y/p2y_db1.F b/interfaces/p2y/p2y_db1.F index b7fa7c1514..2631b279b3 100644 --- a/interfaces/p2y/p2y_db1.F +++ b/interfaces/p2y/p2y_db1.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CH -! -! 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. +! Copyright (C) 2006 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): CH ! subroutine p2y_db1(en,k) ! diff --git a/interfaces/p2y/p2y_pseudo.F b/interfaces/p2y/p2y_pseudo.F index edebd96ffc..7a34679f85 100644 --- a/interfaces/p2y/p2y_pseudo.F +++ b/interfaces/p2y/p2y_pseudo.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CH, DS, AF, IM -! -! 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) 2013 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. -! -! 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): CH DS AF IM ! subroutine p2y_pseudo(k) ! diff --git a/interfaces/p2y/p2y_wf.F b/interfaces/p2y/p2y_wf.F index a86b6c0338..75399475bb 100644 --- a/interfaces/p2y/p2y_wf.F +++ b/interfaces/p2y/p2y_wf.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CH, AF -! -! 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) 2006 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. -! -! 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): CH AF ! subroutine p2y_wf(wf_disk,i_sp_pol,ikibz, ib_grp) ! diff --git a/interfaces/p2y/pw_pseudo_read.F b/interfaces/p2y/pw_pseudo_read.F index b881c66c6c..5c4d39585c 100644 --- a/interfaces/p2y/pw_pseudo_read.F +++ b/interfaces/p2y/pw_pseudo_read.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AF, CH +! Copyright (C) 2018 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. -! -! 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. +! Authors (see AUTHORS file for details): AF CH ! !---------------------------------------------------------------------------- module pw_pseudo_read_m diff --git a/interfaces/p2y/qe_pseudo_init.F b/interfaces/p2y/qe_pseudo_init.F index fbc48da785..a8fe0c790a 100644 --- a/interfaces/p2y/qe_pseudo_init.F +++ b/interfaces/p2y/qe_pseudo_init.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AF, IM -! -! 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) 2018 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. -! -! 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): AF IM ! subroutine qe_pseudo_init() ! diff --git a/interfaces/p2y/qexpt_p2y.F b/interfaces/p2y/qexpt_p2y.F index 4251282b8a..eee0d74cdd 100644 --- a/interfaces/p2y/qexpt_p2y.F +++ b/interfaces/p2y/qexpt_p2y.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CH -! -! 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. +! Copyright (C) 2006 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): CH ! module pw_export_module use pw_data diff --git a/interfaces/p2y/qexsd_p2y.F b/interfaces/p2y/qexsd_p2y.F index ce76981725..a1dd4a8f88 100644 --- a/interfaces/p2y/qexsd_p2y.F +++ b/interfaces/p2y/qexsd_p2y.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AF -! -! 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. +! Copyright (C) 2006 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): AF ! #if defined _P2Y_QEXSD_HDF5 # define _QE_HDF5 @@ -1881,7 +1865,11 @@ logical function fmt_is_qexsd_xml(dirname) ! 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, -! or http://www.gnu.org/copyleft/gpl.txt . +! License-Identifier: GPL +! +! Copyright (C) 2006 The Yambo Team +! +! Authors (see AUTHORS file for details): AF ! !---------------------------------------------- ! diff --git a/lib/archive/Makefile.loc b/lib/archive/Makefile.loc index 1136ef9a1f..e4c142742d 100644 --- a/lib/archive/Makefile.loc +++ b/lib/archive/Makefile.loc @@ -149,8 +149,7 @@ define copy_driver touch $(srcdir)/lib/yambo/$(1)-installed.stamp; \ fi ;\ if [ "$(srcdir)" != "$(compdir)" ]; then \ - rm -rf $(compdir)/lib/yambo/$(1) ; \ if ! test -d $(compdir)/lib/yambo; then mkdir -p $(compdir)/lib/yambo; fi; \ - cp -R $(srcdir)/lib/yambo/$(1) $(compdir)/lib/yambo/$(1); \ + if ! test -d $(compdir)/lib/yambo/$(1); then cp -R $(srcdir)/lib/yambo/$(1) $(compdir)/lib/yambo/$(1); fi; \ fi endef 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/config/m4/ydriver.m4 b/lib/archive/Ydriver-src/config/defs.mk.in similarity index 57% rename from config/m4/ydriver.m4 rename to lib/archive/Ydriver-src/config/defs.mk.in index 834f597e6b..f2fb392032 100644 --- a/config/m4/ydriver.m4 +++ b/lib/archive/Ydriver-src/config/defs.mk.in @@ -1,6 +1,6 @@ # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# Copyright (C) 2000-2022 the YAMBO team +# http://www.yambo-code.org # # Authors (see AUTHORS file for details): AM # @@ -20,22 +20,12 @@ # 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_YDRIVER],[ - -DRIVER_INCS="-I$PWD/lib/yambo/Ydriver/include/ -I$PWD/include/driver" -# -AC_ARG_WITH(ydriver-branch,[AS_HELP_STRING([--with-ydriver-branch=],[Use the of the ydriver repository.],[32])],,[with_ydriver_branch=none]) -# -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 -AC_SUBST(Ydriver_LIB) -AC_SUBST(Ydriver_check) -AC_SUBST(DRIVER_INCS) -AC_SUBST(with_ydriver_branch) -]) +# +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/include/driver/version.h b/lib/archive/Ydriver-src/example/include/example_driver.h similarity index 86% rename from include/driver/version.h rename to lib/archive/Ydriver-src/example/include/example_driver.h index 734494cdc1..a542a51db9 100644 --- a/include/driver/version.h +++ b/lib/archive/Ydriver-src/example/include/example_driver.h @@ -21,10 +21,4 @@ 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 21877 -#define YAMBO_HASH "53df35f2c" - +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/lib/archive/git.list.in b/lib/archive/git.list.in index 04b17c723b..8280563f21 100644 --- a/lib/archive/git.list.in +++ b/lib/archive/git.list.in @@ -1,5 +1,9 @@ # -# GIT's repositories and branches +# License-Identifier: GPL +# +# Copyright (C) 2022 The Yambo Team +# +# Authors (see AUTHORS file for details): AM # git_Ydriver=git@github.com:yambo-code/Ydriver.git branch_Ydriver=@with_ydriver_branch@ diff --git a/lib/fftqe/fftqe_defs.h.in b/lib/fftqe/fftqe_defs.h.in index 1b1c6735cb..a9921f62c5 100644 --- a/lib/fftqe/fftqe_defs.h.in +++ b/lib/fftqe/fftqe_defs.h.in @@ -1,4 +1,10 @@ - +/* + License-Identifier: GPL + + Copyright (C) 2014 The Yambo Team + + Authors (see AUTHORS file for details): AF +*/ #define C_POINTER integer*@SIZEOF_INT_P@ diff --git a/lib/hdf5/Makefile.loc b/lib/hdf5/Makefile.loc index 19da944fdf..c49256704b 100644 --- a/lib/hdf5/Makefile.loc +++ b/lib/hdf5/Makefile.loc @@ -17,7 +17,7 @@ include ../config/external_libs_defs.mk # # Flags # -CONFFLAGS=--prefix=$(LIBPATH) \ +CONFFLAGS=--prefix=$(LIBPATH) --libdir=$(LIBPATH)/lib \ --enable-fortran --disable-shared --enable-static --without-pic --disable-cxx $(hdf5_opt) \ CC="$(cc)" CPP="$(cpp)" CFLAGS="$(cflags)" FC="$(fc)" --enable-build-mode=$(hdf5_mode) CPPFLAGS="$(netcdf_aux)" # diff --git a/lib/iotk/Makefile.loc b/lib/iotk/Makefile.loc index 03a2e3ce2a..f4bc0c49c8 100644 --- a/lib/iotk/Makefile.loc +++ b/lib/iotk/Makefile.loc @@ -17,7 +17,8 @@ include ../config/external_libs_defs.mk # # redefinitions # -CONFFLAGS=--prefix=$(LIBPATH) IOTK_SAFEST="yes" IOTK_MAX_RANK=4 MAKE=$(make) +CONFFLAGS=--prefix=$(LIBPATH) --libdir=$(LIBPATH)/lib \ + IOTK_SAFEST="yes" IOTK_MAX_RANK=4 MAKE=$(make) # # MAIN target # diff --git a/lib/iotk/make_iotk.inc.in b/lib/iotk/make_iotk.inc.in index 458f441d43..f2110eb7c5 100644 --- a/lib/iotk/make_iotk.inc.in +++ b/lib/iotk/make_iotk.inc.in @@ -1,3 +1,10 @@ +# +# License-Identifier: GPL +# +# Copyright (C) 2015 The Yambo Team +# +# Authors (see AUTHORS file for details): AF +# # @configure_input@ # ----------------------------- @@ -12,12 +19,6 @@ (eval $(FC) $(FCFLAGS) -c $*@F90SUFFIX@ ) > /dev/null @rm -f $*@F90SUFFIX@ -#.f.o: -# $(F77) $(FFLAGS) -c $< -# -#.c.o: -# $(CC) $(CFLAGS) -c $< -# # ----------------------------- # compiler definitions diff --git a/lib/libxc/Makefile.loc b/lib/libxc/Makefile.loc index 1e028e36d9..58fd4b4117 100644 --- a/lib/libxc/Makefile.loc +++ b/lib/libxc/Makefile.loc @@ -17,7 +17,7 @@ include ../config/external_libs_defs.mk # # Flags # -CONFFLAGS=--prefix=$(LIBPATH) \ +CONFFLAGS=--prefix=$(LIBPATH) --libdir=$(LIBPATH)/lib \ CC="$(cc)" \ CFLAGS="$(cflags)" \ FC="$(fc)" \ diff --git a/lib/netcdf/Makefile.loc b/lib/netcdf/Makefile.loc index eb51409d3d..11da98406a 100644 --- a/lib/netcdf/Makefile.loc +++ b/lib/netcdf/Makefile.loc @@ -18,7 +18,8 @@ include ../config/external_libs_defs.mk # # Configure flags # -CONFFLAGS=--prefix=$(LIBPATH) --without-pic --enable-static --disable-shared --disable-dap $(netcdf_opt) \ +CONFFLAGS=--prefix=$(LIBPATH) --libdir=$(LIBPATH)/lib \ + --without-pic --enable-static --disable-shared --disable-dap $(netcdf_opt) \ CC="$(cc)" \ CPP="$(cpp)" \ CFLAGS="$(cflags)" \ diff --git a/lib/netcdff/Makefile.loc b/lib/netcdff/Makefile.loc index 60a88d2f68..89afaa4d46 100644 --- a/lib/netcdff/Makefile.loc +++ b/lib/netcdff/Makefile.loc @@ -18,7 +18,7 @@ include ../config/external_libs_defs.mk # # Configure flags # -CONFFLAGS=--prefix=$(LIBPATH) \ +CONFFLAGS=--prefix=$(LIBPATH) --libdir=$(LIBPATH)/lib \ --without-pic --enable-static --disable-shared \ CC="$(cc)" \ CFLAGS="$(cflags)" \ diff --git a/lib/petsc/Makefile.loc b/lib/petsc/Makefile.loc index 6361b5b750..7b2c8e9f80 100644 --- a/lib/petsc/Makefile.loc +++ b/lib/petsc/Makefile.loc @@ -23,7 +23,7 @@ CONFFLAGS=--prefix="$(LIBPATH)" \ --with-x=0 \ --with-cxx=0 \ --with-shared-libraries=$(spetsc) \ - --with-blaslapack-lib="$(llapackso) $(lblasso)" \ + --with-blaslapack-lib="$(llapackpetsc) $(lblaspetsc)" \ --with-scalar-type="complex" \ --with-precision="${yprecision}" \ --with-cc=$(cc) --with-fc=$(fc) diff --git a/lib/qe_pseudo/qe_auxdata.F b/lib/qe_pseudo/qe_auxdata.F index 1cc7356638..8b022d2dc6 100644 --- a/lib/qe_pseudo/qe_auxdata.F +++ b/lib/qe_pseudo/qe_auxdata.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AF, IM -! -! 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) 2018 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. -! -! 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): AF IM ! module control_flags logical :: gamma_only diff --git a/lib/qe_pseudo/qe_pseudo_module.F b/lib/qe_pseudo/qe_pseudo_module.F index 4903512904..4f4668cf45 100644 --- a/lib/qe_pseudo/qe_pseudo_module.F +++ b/lib/qe_pseudo/qe_pseudo_module.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AF -! -! 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. +! Copyright (C) 2018 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): AF ! module qe_pseudo_m use parameters, only : ntypx diff --git a/lib/scalapack/SLmake.inc_lib b/lib/scalapack/SLmake.inc_lib index efc4db48a5..3215b07bcd 100644 --- a/lib/scalapack/SLmake.inc_lib +++ b/lib/scalapack/SLmake.inc_lib @@ -32,7 +32,7 @@ CDEFS = -DAdd_ FC = $(fc) CC = $(cc) NOOPT = $(fcuflags) -FCFLAGS = $(fcflags) +FCFLAGS = $(fcflags) $(slkfcflags) CCFLAGS = $(ccflags) FCLOADER = $(fc) CCLOADER = $(cc) diff --git a/sbin/CUDA_MPI_launcher.sh b/sbin/CUDA_MPI_launcher.sh index 061e6c2038..4964d53709 100755 --- a/sbin/CUDA_MPI_launcher.sh +++ b/sbin/CUDA_MPI_launcher.sh @@ -1,26 +1,10 @@ #!/bin/bash # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): AF -# -# 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) 2018 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. -# -# 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): AF # LRANK=$OMPI_COMM_WORLD_LOCAL_RANK APP=$* diff --git a/sbin/check_packages.sh b/sbin/check_packages.sh new file mode 100755 index 0000000000..336a9e6a99 --- /dev/null +++ b/sbin/check_packages.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# +# License-Identifier: GPL +# +# Copyright (C) 2016 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# +RED='\033[0;31m' +BLUE='\033[0;34m' +NC='\033[0m' +# +repeat(){ + for i in {1..90}; do echo -en "$1"; done + echo +} +# +for app in install build-essential ca-certificates curl file \ +make gcc g++ gfortran git gnupg2 iproute2 \ +unzip m4 wget git zlib1g-dev ssh +do + res=`apt-cache policy $app |grep Installed|grep none` + if [ ! -z "$res" ]; then + MISS="$MISS $app" + fi +done +if [ ! -z $MISS ] ; then + repeat "=" + echo -e "${RED}Missing required packages:${NC}" + repeat "=" + echo $MISS + echo +fi +# +for app in libmkl-avx libmkl-avx2 libmkl-avx512 libmkl-core libmkl-def \ +libmkl-dev libmkl-gf-ilp64 libmkl-gf-lp64 libmkl-gnu-thread +do + res=`apt-cache policy $app |grep Installed|grep none` + if [ ! -z "$res" ]; then + MISS="$MISS $app" + fi +done +repeat "=" +echo -e "${BLUE}Missing optional packages:${NC}" +repeat "=" +echo $MISS +echo + diff --git a/sbin/compilation/check_object_childs.sh b/sbin/compilation/check_object_childs.sh index fe883caf9f..3c7f3bbd05 100755 --- a/sbin/compilation/check_object_childs.sh +++ b/sbin/compilation/check_object_childs.sh @@ -1,51 +1,40 @@ #!/bin/bash # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2018 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. -# -# 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 # # This script: # - tags the library to be compiled # - remove the object file # -# # Check for OBJ childs (non zero only if OBJ is a module)... # -file=$obj +source ./sbin/compilation/verbosity.sh "check_object_childs.sh on $file_src: calling object_remove.sh remove $1" source ./sbin/compilation/object_remove.sh "remove" $1 # +if [ -z $file_o ] ; then return; fi +# # Check for OBJ childs (non zero only if OBJ is a module)... # -first_level_dep= -if grep -q "$obj" $compdir/config/stamps_and_lists/global_modules_dep.list; then +file_o_base=`basename $file_o` +# +first_level_dep="" +if grep -q "$file_o_base" $compdir/config/stamps_and_lists/global_modules_dep.list; then # - deps=`grep -w $obj $compdir/config/stamps_and_lists/global_modules_dep.list | awk '{print $1}'` + deps=`grep -w $file_o_base $compdir/config/stamps_and_lists/global_modules_dep.list | awk '{print $1}'` for dep in $deps do - if test "$dep" == "$obj"; then continue; fi + if test "$dep" == "$file_o_base"; then continue; fi first_level_dep+=" $dep" done # - for file in $first_level_dep + for first_dep_file in $first_level_dep do - source ./sbin/compilation/object_remove.sh "remove_child" $1 + source ./sbin/compilation/name_me.sh $first_dep_file "search" + source ./sbin/compilation/verbosity.sh "check_object_childs.sh: on $file_o_src (child). calling object_remove.sh remove $1" + source ./sbin/compilation/object_remove.sh "remove" $1 done fi diff --git a/sbin/compilation/check_updated_locks.sh b/sbin/compilation/check_updated_locks.sh index 3d6024cef9..95a7fc5df6 100755 --- a/sbin/compilation/check_updated_locks.sh +++ b/sbin/compilation/check_updated_locks.sh @@ -1,26 +1,10 @@ #!/bin/bash # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2021 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 # lock_files=`find $dir -name '*.lock'` sorted_locks=$(echo "$lock_files"|tr " " "\n"|sort|uniq|tr "\n" " ") @@ -33,14 +17,11 @@ for lock in $sorted_locks do lock=`echo $lock | sed "s/.lock//"` lock=`basename $lock` - lock_string="${lock} ${lock_string}" - if test -f "$dir/${lock}_project.dep"; then - save_dir="${lock}_${save_dir}" + if [[ -f "$dir/${lock}_project.dep" ]]; then + lock_string="${lock} ${lock_string}" + save_dir="${lock}_${save_dir}" fi done -if [[ -z $lock_string ]] ; then - return -fi save_dir="${save_dir}.save" # # -D* -> string @@ -50,9 +31,9 @@ restore_dir="objects" for flag in $sorted_precomps do flag=`echo $flag | sed "s/\-D_//"` - flag_string="${flag} ${flag_string}" - if test -f "$dir/${flag}_project.dep"; then - restore_dir="${flag}_${restore_dir}" + if [[ -f "$dir/${flag}_project.dep" ]]; then + flag_string="${flag} ${flag_string}" + restore_dir="${flag}_${restore_dir}" fi done restore_dir="${restore_dir}.save" @@ -67,22 +48,24 @@ unmatched="$missing $new" # Now new nor missing -> exit # if [[ -z $new ]] && [[ -z $missing ]]; then + source ./sbin/compilation/verbosity.sh "check_updated_locks.sh: No new or missing projects" return fi # -if [ "$VERB" == 1 ] ; then - echo "D" $dir - echo "L" $lock_string - echo "F" $flag_string - echo "M" $missing - echo "N" $new - echo "SAVE" $save_dir - echo "RESTORE" $restore_dir -fi +# Ydriver is to be recompiled anyway as the library name depends on the executable and cannot be saved +if [[ "$target" == *"_Ydriver_"* ]] ; then DIR_is_to_recompile=1; fi +# +source ./sbin/compilation/verbosity.sh "locks" # +# Save & Restore source ./sbin/compilation/object_save_and_restore.sh -if [ "$FOLDER_OK" == 1 ] ; then - return ; +# +if [ "$DIR_saved" == "yes" ] ; then + source ./sbin/compilation/verbosity.sh "check_updated_locks.sh: $dir has been saved" +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 @@ -91,21 +74,16 @@ for lock in $unmatched do # if test -f "$dir/${lock}_project.dep"; then - deps=`cat $dir/${lock}_project.dep` ; - refs=$deps ; - if [ -f $dir/$restore_dir/files.dep ] ; then refs=`cat $dir/$restore_dir/files.dep` ; fi - for file in $deps; do - if [[ "$refs" == *"$file"* ]]; then - if [ "$VERB" == 1 ] ; then echo "$step preparing $file"; fi - DIR_is_to_recompile=1 - if [ "$lock" == "DOUBLE" ]; then - obj=$file - source ./sbin/compilation/object_remove.sh "remove" "locks" - continue; - fi - obj=$file - source ./sbin/compilation/check_object_childs.sh "locks" + deps=`cat $dir/${lock}_project.dep` + 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 [ "$lock" == "DOUBLE" ]; then + source ./sbin/compilation/object_remove.sh "remove" "locks" + continue; fi + source ./sbin/compilation/check_object_childs.sh "locks" done fi # diff --git a/sbin/compilation/check_updated_sources.sh b/sbin/compilation/check_updated_sources.sh index 3908a7b696..11b5b60562 100755 --- a/sbin/compilation/check_updated_sources.sh +++ b/sbin/compilation/check_updated_sources.sh @@ -1,33 +1,17 @@ #!/bin/bash # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2018 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 # -if test -f $compdir/config/stamps_and_lists/$goal.stamp; then +if test -f $compdir/config/stamps_and_lists/${goal}.stamp; then candidates=`find $srcdir/$dir -type f -name "*.F" -newer $compdir/config/stamps_and_lists/${goal}.stamp` candidates+=`find $srcdir/$dir -type f -name "*.f" -newer $compdir/config/stamps_and_lists/${goal}.stamp` candidates+=`find $srcdir/$dir -type f -name "*.c" -newer $compdir/config/stamps_and_lists/${goal}.stamp` fi -if test -f $compdir/config/stamps_and_lists/$target.stamp; then +if test -f $compdir/config/stamps_and_lists/${target}.stamp; then candidates=`find $srcdir/$dir -type f -name "*.F" -newer $compdir/config/stamps_and_lists/${target}.stamp` candidates+=`find $srcdir/$dir -type f -name "*.f" -newer $compdir/config/stamps_and_lists/${target}.stamp` candidates+=`find $srcdir/$dir -type f -name "*.c" -newer $compdir/config/stamps_and_lists/${target}.stamp` @@ -37,11 +21,13 @@ if test -f $compdir/config/stamps_and_lists/${target}.a.stamp; then candidates+=`find $srcdir/$dir -type f -name "*.f" -newer $compdir/config/stamps_and_lists/${target}.a.stamp` candidates+=`find $srcdir/$dir -type f -name "*.c" -newer $compdir/config/stamps_and_lists/${target}.a.stamp` fi -for file in $candidates +if [ ! -z "$candidates" ]; then + source ./sbin/compilation/verbosity.sh "check_updated_sources.sh: there are sources to check" +fi +for candidate in $candidates do - if [ "$VERB" == 1 ] ; then echo "$file updated and to be recompiled"; fi - file_name=`basename $file` - obj=`echo $file_name | sed "s/\.F/\.o/" | sed "s/\.c/\.o/" | sed "s/\.f/\.o/"` + source ./sbin/compilation/verbosity.sh "check_updated_sources.sh: search for $candidate childs" + source ./sbin/compilation/name_me.sh $candidate "no_search" DIR_is_to_recompile=1 source ./sbin/compilation/check_object_childs.sh "sources" done diff --git a/sbin/compilation/configure_generated_files.sh b/sbin/compilation/configure_generated_files.sh index 61cf6f47cb..8bb421edac 100755 --- a/sbin/compilation/configure_generated_files.sh +++ b/sbin/compilation/configure_generated_files.sh @@ -1,26 +1,10 @@ #!/bin/bash # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): HM 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. +# Copyright (C) 2018 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. -# -# 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): HM AM # # dependencies.sh -- script that computes dependencies on Fortran 90 modules/projects # modified from the moduledep.sh distributed with Quantum ESPRESSO and added the project part diff --git a/sbin/compilation/dependencies.sh b/sbin/compilation/dependencies.sh index f57fc7f800..b85f94a108 100755 --- a/sbin/compilation/dependencies.sh +++ b/sbin/compilation/dependencies.sh @@ -1,26 +1,10 @@ #!/bin/bash # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2016 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. -# -# 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 DS # # dependencies.sh -- script that computes dependencies on Fortran 90 modules/projects # modified from the moduledep.sh distributed with Quantum ESPRESSO and added the project part @@ -38,8 +22,6 @@ done Nd=`echo $directories | wc -w` Nd=$((Nd-1)) # -BASE=$PWD -# proj_dep_stamp=config/stamps_and_lists/project_dependencies.stamp if [ ! -f $proj_dep_stamp ] ; then idir=0 @@ -69,7 +51,6 @@ do ((i=i%N)); ((i++==0)) && wait idir=$((idir+1)) source ./sbin/compilation/dependencies_element.sh & - # done wait echo @@ -87,19 +68,21 @@ do cd $BASE continue fi -# Modules. Step II: create a local list of modules dependencies -#=============================================================== -# replace module names with file names -# by applying the file of substitution patterns just created -sed -f $compdir/config/stamps_and_lists/modules.rules modulesdep.list | -awk '{if ($1 != $3) print}' | # remove self dependencies -sort | uniq | # remove duplicates -sed 's/@.*@//' >> $compdir/config/stamps_and_lists/global_modules_dep.list -sed -f modules.rules modulesdep.list | -awk '{if ($1 != $3) print}' | # remove self dependencies -sort | uniq | # remove duplicates -sed 's/@.*@//' > local_modules.dep -cd $BASE + # Modules. Step II: create a local list of modules dependencies + #=============================================================== + # replace module names with file names + # by applying the file of substitution patterns just created + sed -f $compdir/config/stamps_and_lists/modules.rules modulesdep.list | + awk '{if ($1 != $3) print}' | # remove self dependencies + sort | uniq | # remove duplicates + sed 's/@.*@//' >> $compdir/config/stamps_and_lists/global_modules_dep.list + if test `cat modules.rules | wc -l` -gt 0; then + sed -f modules.rules modulesdep.list | + awk '{if ($1 != $3) print}' | # remove self dependencies + sort | uniq | # remove duplicates + sed 's/@.*@//' > local_modules.dep + fi + cd $BASE done echo diff --git a/sbin/compilation/dependencies_element.sh b/sbin/compilation/dependencies_element.sh index d1a3a6751c..6b19cddc50 100755 --- a/sbin/compilation/dependencies_element.sh +++ b/sbin/compilation/dependencies_element.sh @@ -1,26 +1,10 @@ #!/bin/bash # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2016 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. -# -# 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 DS # # dependencies.sh -- script that computes dependencies on Fortran 90 modules/projects # modified from the moduledep.sh distributed with Quantum ESPRESSO and added the project part diff --git a/sbin/compilation/dependencies_project.sh b/sbin/compilation/dependencies_project.sh index 85bddfeb37..a54a6ee290 100755 --- a/sbin/compilation/dependencies_project.sh +++ b/sbin/compilation/dependencies_project.sh @@ -1,26 +1,10 @@ #!/bin/bash # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# 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 DS # # dependencies.sh -- script that computes dependencies on Fortran 90 modules/projects # modified from the moduledep.sh distributed with Quantum ESPRESSO and added the project part @@ -48,43 +32,55 @@ if [ ${#sources} -eq 2 ]; then continue fi # +cp .objects objects.c +$cpp $cppflags $precomp_flags objects.c > no_pj.mk +# # Projects #========== -for PJ in _SC _RT _RT_SCATT _ELPH _ELPH_ITERATIVE _PHEL _NL _QED _YPP_ELPH _YPP_RT _YPP_NL _YPP_SC _yambo _ypp _a2y _p2y _c2y _DOUBLE +for PJ in _SC _RT _RT_SCATT _ELPH _ELPH_ITERATIVE _PHEL _NL _QED _YPP_ELPH _YPP_RT _YPP_NL _YPP_SC _yambo _ypp _a2y _p2y _c2y _DOUBLE _MODELS do + # + $cpp $cppflags $precomp_flags -D$PJ objects.c > $PJ.mk # sources_pj_dependent="" for file in $sources do + obj=`echo $file| sed 's/\.F/\.o/g'| sed 's/\.c/\.o/g'| sed 's/\.f/\.o/g'` if [ "$PJ" == "_DOUBLE" ] ; then - obj=`echo $file| sed 's/\.F/\.o/g'| sed 's/\.c/\.o/g'| sed 's/\.f/\.o/g'` sources_pj_dependent+=" ${obj}\n" + continue elif [ "$PJ" == "_NL" ] ; then if test `grep $PJ $file | grep '#' | grep -v _YPP_NL | wc -l` -ge 1 ; then - obj=`echo $file| sed 's/\.F/\.o/g'| sed 's/\.c/\.o/g'| sed 's/\.f/\.o/g'` sources_pj_dependent+=" ${obj}\n" + continue fi elif [ "$PJ" == "_RT" ] ; then if test `grep $PJ $file | grep '#' | grep -v _RT_SCATT | grep -v _YPP_RT | wc -l` -ge 1 ; then - obj=`echo $file| sed 's/\.F/\.o/g'| sed 's/\.c/\.o/g'| sed 's/\.f/\.o/g'` sources_pj_dependent+=" ${obj}\n" + continue fi elif [ "$PJ" == "_ELPH" ] ; then if test `grep $PJ $file | grep '#' | grep -v _ELPH_ITERATIVE | grep -v _YPP_ELPH | wc -l` -ge 1 ; then - obj=`echo $file| sed 's/\.F/\.o/g'| sed 's/\.c/\.o/g'| sed 's/\.f/\.o/g'` sources_pj_dependent+=" ${obj}\n" + continue fi elif [ "$PJ" == "_SC" ] ; then - if test `grep $PJ $file | grep '#' | grep -v _SCALAPACK | grep -v _YPP_SC | wc -l` -ge 1 ; then - obj=`echo $file| sed 's/\.F/\.o/g'| sed 's/\.c/\.o/g'| sed 's/\.f/\.o/g'` + if test `grep $PJ $file | grep '#' | grep -v _SCALAPACK | grep -v _RT_SCATT | grep -v _YPP_SC | wc -l` -ge 1 ; then sources_pj_dependent+=" ${obj}\n" + continue fi elif test `grep $PJ $file | grep '#' | wc -l` -ge 1 ; then - obj=`echo $file| sed 's/\.F/\.o/g'| sed 's/\.c/\.o/g'| sed 's/\.f/\.o/g'` sources_pj_dependent+=" ${obj}\n" + continue + fi + if test `grep -vxFf no_pj.mk $PJ.mk | grep -v '#' | grep $obj| wc -l` -ge 1 ; then + sources_pj_dependent+=" ${obj}\n" fi + # done # + rm -f $PJ.mk + # if [ ${#sources_pj_dependent} -gt 1 ]; then PREFIX=`echo $PJ | sed 's/_//'` dep_proj_file=$compdir/$CDIR/${PREFIX}_project.dep @@ -94,5 +90,7 @@ do # done # +rm -f objects.c no_pj.mk +# cd $BASE # diff --git a/sbin/compilation/fix_locks.sh b/sbin/compilation/fix_locks.sh index 1ba28581f5..c0a51acafa 100755 --- a/sbin/compilation/fix_locks.sh +++ b/sbin/compilation/fix_locks.sh @@ -1,42 +1,26 @@ #!/bin/bash # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2006 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): DS # # for lock in $missing ; do - # - # Remove old lock - # - if [ "$VERB" == 1 ] ; then echo "rm -f $dir/$lock.lock"; fi + # + # Remove old lock + # + source ./sbin/compilation/verbosity.sh "fix_locks.sh: rm -f $dir/$lock.lock" rm -f $dir/$lock.lock # done # for lock in $new ; do - # - # Add new lock - # - if [ "$VERB" == 1 ] ; then echo "touch $dir/$lock.lock"; fi + # + # Add new lock + # + source ./sbin/compilation/verbosity.sh "fix_locks.sh: touch $dir/$lock.lock" touch $dir/$lock.lock # done diff --git a/sbin/compilation/global_conf_check.sh b/sbin/compilation/global_conf_check.sh index b2071e5414..92d4cc9589 100755 --- a/sbin/compilation/global_conf_check.sh +++ b/sbin/compilation/global_conf_check.sh @@ -1,26 +1,10 @@ #!/bin/bash # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): HM 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. +# Copyright (C) 2021 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. -# -# 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): HM AM # lock_files=`find $compdir/config/stamps_and_lists/ -name '*.lock'` sorted_locks=$(echo "$lock_files"|tr " " "\n"|sort|uniq|tr "\n" " ") @@ -59,8 +43,8 @@ fi # # Check for missing/new precomp flags # -missing=`comm -23 <(tr ' ' $'\n' <<< $lock_string | sort) <(tr ' ' $'\n' <<< $flag_string | sort)` -new=`comm -23 <(tr ' ' $'\n' <<< $flag_string | sort) <(tr ' ' $'\n' <<< $lock_string | sort)` +missing=`comm -23 <(tr ' ' $'\n' <<< $lock_string | sort| uniq) <(tr ' ' $'\n' <<< $flag_string | sort| uniq)` +new=`comm -23 <(tr ' ' $'\n' <<< $flag_string | sort| uniq) <(tr ' ' $'\n' <<< $lock_string | sort| uniq)` # for lock in $missing do diff --git a/sbin/compilation/helper.inc.sh.in b/sbin/compilation/helper.inc.sh.in index 3c2f899e47..ba56240aea 100755 --- a/sbin/compilation/helper.inc.sh.in +++ b/sbin/compilation/helper.inc.sh.in @@ -1,26 +1,10 @@ #!/bin/bash # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2018 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. -# -# 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 # cpp="@CPP@" cppflags="@CPPFLAGS_yambo@" @@ -29,3 +13,4 @@ compdir="@compdir@" srcdir="@abs_top_srcdir@" KEEPSRC="@enable_keep_src@" INCLUDEDIR="@includedir@" +IO_dir="io_@IO_MODE@" diff --git a/sbin/compilation/helper.sh b/sbin/compilation/helper.sh index c44f9f4960..fec7ca47e9 100755 --- a/sbin/compilation/helper.sh +++ b/sbin/compilation/helper.sh @@ -1,49 +1,30 @@ #!/bin/bash # -# 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. -# -VERB=0 +# License-Identifier: GPL # +# Copyright (C) 2021 The Yambo Team +# +# Authors (see AUTHORS file for details): AM DS # make sure there is no locale setting creating unneeded differences. # LC_ALL=C export LC_ALL # +BASE=$PWD +# ARGS=$@; source ./sbin/compilation/helper.inc.sh # # OPTIONS source ./sbin/compilation/options.sh # +# Verbosity +source ./sbin/compilation/verbosity.sh "init" +# # Projects source ./sbin/compilation/projects.sh # -if [ "$VERB" == 1 ] ; then - echo "cdir is $cdir" - echo "target is $target" - echo "lib is $lib" - echo "goal is $goal" -fi +source ./sbin/compilation/verbosity.sh "options" # if [ "$global" == "yes" ] ; then source ./sbin/compilation/global_conf_check.sh @@ -56,42 +37,48 @@ if [ "$target" == "$goal" ] ; then fi fi # +# IO(avoid)path +# +if [ "$IO_dir" == "io_serial" ] ; then IO_no_dir="io_parallel"; fi +if [ "$IO_dir" == "io_parallel" ] ; then IO_no_dir="io_serial"; fi +# # Check what has to be done if [ "$new" == "yes" ] && [[ -f $compdir/config/stamps_and_lists/active_directories.list ]] ; then dirs_to_check=`cat $compdir/config/stamps_and_lists/active_directories.list` for dir in $dirs_to_check do if [[ "$dir" == "./$cdir" ]]; then + # + # Global logicals + # + DIR_saved="" + DIR_restored="" DIR_is_to_recompile=0 - FOLDER_OK=0 if [ ! "$mode" == "fast" ] ; then - source ./sbin/compilation/check_updated_locks.sh + source ./sbin/compilation/verbosity.sh "helper.sh: call check_update_locks.sh" + source ./sbin/compilation/check_updated_locks.sh fi + source ./sbin/compilation/verbosity.sh "helper.sh: call check_update_sources.sh" source ./sbin/compilation/check_updated_sources.sh if [ "$DIR_is_to_recompile" == 1 ] ; then - if [ $VERB = 1 ] ; then echo "$dir is to be recompiled $goal, $target" ; fi + source ./sbin/compilation/verbosity.sh "helper.sh: locks force $dir to be recompiled" source ./sbin/compilation/stamp_remove.sh "goal" source ./sbin/compilation/stamp_remove.sh "target.a" source ./sbin/compilation/stamp_remove.sh "exe" - fi - # The driver library always needs to be recompiled since it is not copied in the save folders - # due to the name which depends on the exectuable. This causes the exe to be relinked. - # Without I could avoid to remove the "exe" stamp. - # However in such case I should remove somehow the copiling stamp. - if [[ "$dir" == *"yambo/Ydriver"* ]] && [ "$FOLDER_OK" == 0 ]; then - source ./sbin/compilation/stamp_remove.sh "target.a" - source ./sbin/compilation/stamp_remove.sh "exe" + else + source ./sbin/compilation/verbosity.sh "helper.sh: $dir must NOT to be recompiled" fi fi done + # # remove broken links + # count_lib_files=`ls -1 lib/*.a 2>/dev/null | wc -l` if [ $count_lib_files -gt 0 ]; then for lib_file in lib/*.a ; do if [ ! -e $lib_file ]; then rm $lib_file ; fi done fi - exit 0 fi # # Dependencies? @@ -102,7 +89,10 @@ if [ "$dep" == "yes" ] ; then fi # # CHECK -if [ ! -f $cdir/$ofile ]; then exit 0; fi +if [ ! -f $cdir/$ofile ]; then + source ./sbin/compilation/verbosity.sh "WARNING helper.sh: $cdir/$ofile is not there. Exiting" + exit 0 +fi # # CLEAN if [ -f $cdir/Makefile ] ; then rm -f $cdir/Makefile ; fi @@ -120,11 +110,6 @@ do touch $cdir/${flag}.lock done # -if [ "$VERB" == 1 ] ; then - echo "libs are $libs" - echo "precomp flags are $precomp_flags" -fi -# # Makefile (I): variables cat < $cdir/dyn_variables.mk compdir =$compdir @@ -134,16 +119,17 @@ wdir =$cdir EOF # # Makefile (II): OBJECTS list +source ./sbin/compilation/verbosity.sh "helper.sh. objects.mk=$cpp $cppflags $precomp_flags -D_$DTARG $cdir/objects.c" cp $cdir/.objects $cdir/objects.c DTARG=`echo $target | sed "s/\.a//" | sed "s/\-//"` $cpp $cppflags $precomp_flags -D_$DTARG $cdir/objects.c > $cdir/objects.mk rm -f $cdir/objects.c # -# Makefile (II): common vars +# Makefile (III): common vars rm_command="@rm -f \$*\$(f90suffix)" if [ "$KEEPSRC" == "yes" ]; then rm_command=" "; fi ; # -# Makefile creation: (III) special sources +# Makefile creation: (IV) special sources source ./sbin/compilation/special_sources.sh # cat < $compdir/config/mk/local/static_variables.mk @@ -162,6 +148,21 @@ FC_NOOPT_SRC =$FC_NOOPT_SRC FC_LOCAL_SRC =$FC_LOCAL_SRC EOF # -# Makefile (III): copy makefile +# Makefile (V): copy makefile cp config/mk/local/makefile $cdir/Makefile # +# Makefile (VI): clean orphan _to_save files +# +# Some files scheduled to be moved can still be unmoved. This happens if the _to_save flag is added +# to a file that has no explicit dependence on the projects (see for example ypp/dipoles/DIPOLES_ypp_driver). +# In this case the file cannot be saved in a project dependent folder and needs to be removed. +# +if [ "$mode" == "x" ] ; then + files_to_remove=`find $compdir -type f -name "*_to_save"` + for file in $files_to_remove + do + source ./sbin/compilation/verbosity.sh "helper.sh: rm $file" + rm -f $file + done +fi + diff --git a/sbin/compilation/libraries.sh b/sbin/compilation/libraries.sh index 5371724801..064e58e8bb 100755 --- a/sbin/compilation/libraries.sh +++ b/sbin/compilation/libraries.sh @@ -1,26 +1,10 @@ #!/bin/bash # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2006 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 # libs=" " for arg in $ARGS @@ -32,7 +16,6 @@ do esac done # -# llocal="-lqe_pseudo -lmath77 -lslatec -llocal" lPLA="\$(lscalapack) \$(lblacs) \$(llapack) \$(lblas)" lSL="\$(lslepc) \$(lpetsc)" diff --git a/sbin/compilation/name_me.sh b/sbin/compilation/name_me.sh new file mode 100755 index 0000000000..7358c6cd3c --- /dev/null +++ b/sbin/compilation/name_me.sh @@ -0,0 +1,102 @@ +#!/bin/bash +# +# License-Identifier: GPL +# +# Copyright (C) 2023 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# +# Take the basaname +# +if [ "$2" == "search" ]; then + file=`basename $1` +else + file=$1 +fi +# +# Different kinds +# +file_o=`echo $file | sed 's/.$/o/'` +file_F=`echo $file | sed 's/.$/F/'` +file_f=`echo $file | sed 's/.$/f/'` +file_f90=`echo $file | sed 's/.$/f90/'` +file_c=`echo $file | sed 's/.$/c/'` +file_src="" +# +if [[ ! "$compdir" == "$srcdir" ]] ; then + c_string=`echo $compdir | sed 's/\//_SLASH_/g' | sed 's/\./_DOT_/g'` + s_string=`echo $srcdir | sed 's/\//_SLASH_/g' | sed 's/\./_DOT_/g'` +fi +# +if [ "$2" == "search" ]; then + file_F_src=`find $srcdir -name $file_F -not -path "/*objects.save/*" -not -path "*archive*" -not -path "*$IO_no_dir*"` +else + file_F_src=$file_F +fi +if [ ! -z $file_F_src ]; then + file_src=$file_F_src + file_o_src=`echo $file_F_src | sed 's/\.F/\.o/'` + if [[ ! "$compdir" == "$srcdir" ]] ; then + file_o_src=`echo $file_o_src | sed 's/\//_SLASH_/g' | sed 's/\./_DOT_/g'` + file_o_src=`echo $file_o_src | sed "s/$s_string/$c_string/g"` + file_o_src=`echo $file_o_src | sed 's/_SLASH_/\//g' | sed 's/_DOT_/\./g'` + fi + if [ -z $file_o_src ] ; then file_o=""; fi + file_f90_src=`echo $file_F_src | sed 's/.F/.f90/'` + if [ -z $file_f90_src ] ; then file_f90=""; fi + file_c="" + file_c_src="" + file_f="" + file_f_src="" + source ./sbin/compilation/verbosity.sh "filename" + return +fi +# +if [ "$2" == "search" ]; then + file_c_src=`find $srcdir -name $file_c -not -path "/*objects.save/*" -not -path "*archive*" -not -path "*$IO_no_dir*"` +else + file_c_src=$file_c +fi +if [ ! -z $file_c_src ]; then + file_src=$file_c_src + file_o_src=`echo $file_c_src | sed 's/\.c/\.o/'` + if [[ ! "$compdir" == "$srcdir" ]] ; then + file_o_src=`echo $file_o_src | sed 's/\//_SLASH_/g' | sed 's/\./_DOT_/g'` + file_o_src=`echo $file_o_src | sed "s/$s_string/$c_string/g"` + file_o_src=`echo $file_o_src | sed 's/_SLASH_/\//g' | sed 's/_DOT_/\./g'` + fi + if [ -z $file_o_src ] ; then file_o=""; fi + file_F="" + file_F_src="" + file_f90="" + file_f90_src="" + file_f="" + file_f_src="" + source ./sbin/compilation/verbosity.sh "filename" + return +fi +# +if [ "$2" == "search" ]; then + file_f_src=`find $srcdir -name $file_f -not -path "/*objects.save/*" -not -path "*archive*" -not -path "*$IO_no_dir*"` +else + file_f_src=$file_f +fi +if [ ! -z $file_f_src ]; then + file_src=$file_f_src + file_o_src=`echo $file_f_src | sed 's/\.f/\.o/'` + if [[ ! "$compdir" == "$srcdir" ]] ; then + file_o_src=`echo $file_o_src | sed 's/\//_SLASH_/g' | sed 's/\./_DOT_/g'` + file_o_src=`echo $file_o_src | sed "s/$s_string/$c_string/g"` + file_o_src=`echo $file_o_src | sed 's/_SLASH_/\//g' | sed 's/_DOT_/\./g'` + fi + if [ -z $file_o_src ] ; then file_o=""; fi + file_F="" + file_F_src="" + file_f90="" + file_f90_src="" + file_c="" + file_c_src="" + source ./sbin/compilation/verbosity.sh "filename" + return +fi +# diff --git a/sbin/compilation/object_remove.sh b/sbin/compilation/object_remove.sh index 0375bc734e..51eafa68b4 100755 --- a/sbin/compilation/object_remove.sh +++ b/sbin/compilation/object_remove.sh @@ -1,141 +1,77 @@ #!/bin/bash # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# 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 DS # -operate=$1 +mode=$1 # -file_obj=`echo $file | sed 's/.$/o/'` -if [ "$file_obj" != "driver.o" ] ; then - file_with_path_obj=`find $compdir -name $file_obj -not -path "/*objects.save/*"`; -else - if [ "$VERB" == 1 ] ; then - echo "WARNING driver.o case is problematic. " - echo "Mode is $operate. Skipping it." - echo "driver.o is created at the linking step. " - echo "See config/mk/local/functions.mk, define_link" - fi +if [[ "$file_o" == "driver.o" ]] ; then + source ./sbin/compilation/verbosity.sh "object_remove.sh: WARNING driver.o case is problematic." + source ./sbin/compilation/verbosity.sh "object_remove.sh: mode is $mode. Skipping it" + source ./sbin/compilation/verbosity.sh "object_remove.sh: driver.o is created at the linking step. See config/mk/local/functions.mk, define_link" return fi # -if [ -z "$file_with_path_obj" ] ; then - if [ "$operate" == "remove_child" ]; then return ; fi - # if the object does not exist yet, I set the path from the external loop - if [ "$operate" == "remove" ]; then - if [ "$VERB" == 1 ] ; then - echo "Remove mode and $file_obj not found" - echo "Setting to external value" - fi - file_with_path_obj=$compdir/$dir/$file_obj - fi -fi -# -path_obj=`dirname $file_with_path_obj` -# -file_src=`echo $file | sed 's/.$/F/'` -file_with_path_src=`echo $file_with_path_obj | sed 's/.$/F/'` -if [[ "$compdir" != "$srcdir" ]] && [[ "$srcdir" != "." ]] ; then - # replace compdir with srcdir in file_with_path_src - file_with_path_src=${srcdir}${file_with_path_src/$compdir/} -fi -if [ ! -f "$file_with_path_src" ] ; then - file_src=`echo $file | sed "s/.$/c/"` - file_with_path_src=`echo $file_with_path_src | sed 's/.$/c/'` - file_f90="" - file_with_path_f90="" +if [ ! -z "$file_o_src" ] ; then + file_o_path=`dirname $file_o_src` + ldir=`dirname $file_o_src` + llib=`basename $ldir` else - file_f90=`echo $file | sed 's/.$/f90/'` - file_with_path_f90=`echo $file_with_path_obj | sed 's/.$/f90/'` -fi -if [ ! -f "$file_with_path_src" ] ; then - file_src=`echo $file | sed "s/.$/f/"` - file_with_path_src=`echo $file_with_path_src | sed 's/.$/f/'` -fi -# -if [ ! -f "$file_with_path_src" ] ; then - echo "$file_src not found for src in $operate mode in $srcdir" - echo "full path was set to $file_with_path_src" -fi -# -ldir=`dirname $file_with_path_obj` -llib=`basename $ldir` -# -if [ "$VERB" == 1 ] ; then - echo "source file name is $file_src" - echo "source file with path is $file_with_path_src" - echo "f90 file name is $file_f90" - echo "f90 file with path is $file_with_path_f90" - echo "obj file name is $file_obj" - echo "obj file with path is $file_with_path_obj" - echo "obj path is $path_obj" - echo "dir is $dir" - echo "ldir is $ldir" - #echo "operate is $operate" + ldir=`dirname $file_src` + llib=`basename $ldir` + source ./sbin/compilation/stamp_remove.sh "lib" + return fi # -if [[ "$path_obj" == *"${dir/\./}" ]] || [ "$2" == "locks" ]; then - if [ $VERB == 1 ] ; then echo "remove lib | rm -f config/stamps_and_lists/lib${llib}.a.stamp" ; fi +if [[ "$file_o_path" == *"${dir/\./}" ]] || [ "$2" == "locks" ]; then source ./sbin/compilation/stamp_remove.sh "lib" fi # -if [[ -f "$file_with_path_obj" ]] ; then +if [[ -f "$file_o_src" ]] ; then # - if [ "$VERB" == 1 ] ; then - if [[ "$path_obj" == *"${dir/\./}" ]]; then echo "remove object | rm -f $file_with_path_obj"; fi - echo "remove f90 source | rm -f $file_with_path_f90" + if [[ "$file_o_path" == *"${dir/\./}" ]]; then + source ./sbin/compilation/verbosity.sh "object_remove.sh: remove $file_o_src" + rm -f $file_o_src + fi + if [[ -f "$file_f90_src" ]] ; then + source ./sbin/compilation/verbosity.sh "object_remove.sh: remove $file_f90_src" + rm -f $file_f90_src fi - if [[ "$path_obj" == *"${dir/\./}" ]]; then rm $file_with_path_obj ; fi - if [ -f "$file_with_path_f90" ] ; then rm -f $file_with_path_f90 ; fi # - if [ "$2" == "locks" ] && [[ ! "$path_obj" == *"${dir/\./}" ]]; then - if [ "$VERB" == 1 ] ; then echo "remove object | mv $file_with_path_obj ${file_with_path_obj}_to_remove "; fi - mv $file_with_path_obj ${file_with_path_obj}_to_remove + if [[ "$2" == "locks" ]] && [[ ! "$file_o_path" == *"${dir/\./}" ]]; then + source ./sbin/compilation/verbosity.sh "object_remove.sh: $file_o_src -> ${file_o_src}_to_save" + mv $file_o_src ${file_o_src}_to_save fi # # In sources mode remove all corresponding saved objects # if [ "$2" == "sources" ]; then # - if [ "$VERB" == 1 ] ; then echo "touch file source | touch $file_with_path_src" ; fi - if [ -f "$file_with_path_src" ] ; then touch $file_with_path_src ; fi - # - if [ "$VERB" == 1 ] ; then - echo "remove stored objects in .save folders | rm $path_obj/*objects.save/$file_obj" - echo "remove .f90 files in .save folders | $path_obj/*objects.save/$file_f90" - echo "remove .a libraries in | rm $path_obj/*objects.save/*.a" + if [[ -f "$file_src" ]] ; then + source ./sbin/compilation/verbosity.sh "object_remove.sh: touch $file_src" + touch $file_src fi # - count=`ls -1 $path_obj/*objects.save/*.a 2>/dev/null | wc -l` - if [ $count != 0 ]; then rm -f $path_obj/*objects.save/*.a ; fi - count=`ls -1 $path_obj/*objects.save/$file_obj 2>/dev/null | wc -l` + count=`ls -1 $file_o_path/*objects.save/*.a 2>/dev/null | wc -l` + if [ $count != 0 ]; then + source ./sbin/compilation/verbosity.sh "object_remove.sh: remove objects.save .a files ($count)" + rm -f $file_o_path/*objects.save/*.a + fi + file_o_base=`basename $file_o` + count=`ls -1 $file_o_path/*objects.save/$file_o_base 2>/dev/null | wc -l` if [ $count != 0 ] ; then - if [ "$VERB" == 1 ] ; then echo "rm -f $path_obj/*objects.save/$file_obj" ; fi - rm -f $path_obj/*objects.save/$file_obj + source ./sbin/compilation/verbosity.sh "object_remove.sh: remove objects.save $file_o_base ($count)" + rm -f $file_o_path/*objects.save/$file_o_base fi if [ ! "$file_f90" == "" ]; then - count=`ls -1 $path_obj/*objects.save/$file_f90 2>/dev/null | wc -l` + file_f90_base=`basename $file_f90` + count=`ls -1 $file_o_path/*objects.save/$file_f90_base 2>/dev/null | wc -l` if [ $count != 0 ] ; then - if [ "$VERB" == 1 ] ; then echo "rm -f $path_obj/*objects.save/$file_f90" ; fi - rm -f $path_obj/*objects.save/$file_f90 + source ./sbin/compilation/verbosity.sh "object_remove.sh: remove objects.save $file_f90_base ($count)" + rm -f $file_o_path/*objects.save/$file_f90_base fi fi fi @@ -143,35 +79,36 @@ fi # # Remove corresponding mod files # -if [[ -f "$file_with_path_src" ]] ; then - modfile=`grep -i module $file_with_path_src | grep -i -v end | grep -i -v use | grep -i -v procedure | grep -v !` +if [[ -f "$file_src" ]] ; then + modfile=`grep -i module $file_src | grep -i -v end | grep -i -v use | grep -i -v procedure | grep -v !` + source ./sbin/compilation/verbosity.sh "object_remove.sh: modules to remove originated by $file_src: $modfile" for modname_tmp in $modfile; do # Global modname=`echo "$modname_tmp" | tr '[:upper:]' '[:lower:]'` - if [ -f "$compdir/include/$modname.mod" ]; then - if [ "$VERB" == 1 ] ; then echo "remove global module | rm -f $compdir/include/$modname.mod"; fi + if [[ -f "$compdir/include/$modname.mod" ]]; then + source ./sbin/compilation/verbosity.sh "object_remove.sh: remove $compdir/include/$modname.mod" rm -f $compdir/include/$modname.mod fi # Local - if [ -f "$path_obj/$modname.mod" ]; then + if [[ -f "$file_o_path/$modname.mod" ]]; then # - if [[ "$path_obj" == *"${dir/\./}" ]]; then - if [ "$VERB" == 1 ]; then echo "remove local module | rm -f $path_obj/$modname.mod"; fi - rm -f $path_obj/$modname.mod ; + if [[ "$file_o_path" == *"${dir/\./}" ]]; then + source ./sbin/compilation/verbosity.sh "object_remove.sh: remove $file_o_path/$modname.mod" + rm -f $file_o_path/$modname.mod ; fi # - if [ "$2" == "locks" ] && [[ ! "$path_obj" == *"${dir/\./}" ]]; then - if [ "$VERB" == 1 ] ; then echo "remove local module | mv $path_obj/$modname.mod $path_obj/$modname.mod_to_remove "; fi - mv $path_obj/$modname.mod $path_obj/$modname.mod_to_remove + if [ "$2" == "locks" ] && [[ ! "$file_o_path" == *"${dir/\./}" ]]; then + source ./sbin/compilation/verbosity.sh "object_remove.sh: $file_o_path/$modname.mod -> $file_o_path/$modname.mod_to_save" + mv $file_o_path/$modname.mod $file_o_path/$modname.mod_to_save fi # # In sources mode remove all corresponding saved modules # if [ "$2" == "sources" ]; then - count=`ls -1 $path_obj/*objects.save/$modname.mod 2>/dev/null | wc -l` + count=`ls -1 $file_o_path/*objects.save/$modname.mod 2>/dev/null | wc -l` if [ $count != 0 ]; then - if [ "$VERB" == 1 ] ; then echo "remove module in .save folders | rm $path_obj/*objects.save/$modname.mod" ; fi - rm $path_obj/*objects.save/$modname.mod + source ./sbin/compilation/verbosity.sh "object_remove.sh: remove $file_o_path/*objects.save/$modname.mod" + rm $file_o_path/*objects.save/$modname.mod fi fi fi diff --git a/sbin/compilation/object_save_and_restore.sh b/sbin/compilation/object_save_and_restore.sh index ab7822594e..78f828f4e6 100755 --- a/sbin/compilation/object_save_and_restore.sh +++ b/sbin/compilation/object_save_and_restore.sh @@ -1,171 +1,130 @@ #!/bin/bash # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): AM +# Copyright (C) 2022 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. -# -# 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. +# Authors (see AUTHORS file for details): AM DS # path_back=$PWD -# -#defined library name -# library="${target}.a" -if [[ "$goal" == "$target" ]] ; then - if [ "$VERB" == 1 ] ; then - echo "goal= $goal, target= $target"; - echo "here I'm doing the driver folder, but there is no connected library"; - fi +# +if [[ "$goal" == "$target" ]]; then + source $compdir/sbin/compilation/verbosity.sh "goal(=target)= $goal . Here I'm doing the driver folder, but there is no connected library" + library="NONE" +fi +if [[ "$target" == *"_Ydriver_"* ]] ; then + source $compdir/sbin/compilation/verbosity.sh "Ydriver => no library saving" library="NONE" fi -if [ "$VERB" == 1 ] ; then echo "library is $library" ; fi +source $compdir/sbin/compilation/verbosity.sh "object_save_and_restore.sh is running in $library using $dir/$restore_dir (restore) $dir/$save_dir (save)" +# +# Let's count +# +count_obj=`ls -1 $dir/*.o 2>/dev/null | wc -l` +count_mod=`ls -1 $dir/*.mod 2>/dev/null | wc -l` +count_f90=`ls -1 $dir/*.f90 2>/dev/null | wc -l` +count_obj_ts=`ls -1 $dir/*.o_to_save 2>/dev/null | wc -l` +count_mod_ts=`ls -1 $dir/*.mod_to_save 2>/dev/null | wc -l` +count_obj_res=`ls -1 $dir/$restore_dir/*.o 2>/dev/null | wc -l` +count_mod_res=`ls -1 $dir/$restore_dir/*.mod 2>/dev/null | wc -l` +count_f90_res=`ls -1 $dir/$restore_dir/*.f90 2>/dev/null | wc -l` # # Save files # -if [ ! -f $dir/$save_dir/$library ] && [[ ! $dir == *"yambo/Ydriver"* ]] ; then - if [ "$VERB" == 1 ] ; then echo "Saving files " ; fi - if [ ! -d $dir/$save_dir ] ; then - if [ "$VERB" == 1 ] ; then echo "mkdir -p $dir/$save_dir" ; fi - mkdir -p $dir/$save_dir - fi - deps_rm="" - count_obj_tr=`ls -1 $dir/*.o_to_remove 2>/dev/null | wc -l` - count_mod_tr=`ls -1 $dir/*.mod_to_remove 2>/dev/null | wc -l` - if [ $count_obj_tr != 0 ] || [ $count_mod_tr != 0 ] ; then - if [ ! -f $dir/$save_dir/files.dep ] ; then - cd $dir - for file in *.o_to_remove; do - deps_rm="$deps_rm ${file/_to_remove/}" - done - for mod in *.o_to_remove; do - deps_rm="$deps_rm ${mod/_to_remove/}" - done - cd $path_back - fi - if [ $count_obj_tr != 0 ]; then rm $dir/*.o_to_remove ; fi - if [ $count_mod_tr != 0 ]; then rm $dir/*.mod_to_remove ; fi - fi - count_obj=`ls -1 $dir/*.o 2>/dev/null | wc -l` - count_mod=`ls -1 $dir/*.mod 2>/dev/null | wc -l` - count_f90=`ls -1 $dir/*.f90 2>/dev/null | wc -l` - if [ $count_obj != 0 ] || [ $count_mod != 0 ] || [ $count_obj_tr != 0 ] || [ $count_mod_tr != 0 ] ; then - if [ ! -f $dir/$save_dir/files.dep ] ; then - cd $dir; - deps=`ls *.o *.mod 2>/dev/null`; - deps="$deps $deps_rm" - for file in $deps; do echo " $file" >> "$save_dir/files.dep"; done - cd $path_back ; - if [ $count_obj != 0 ] ; then cp $dir/*.o $dir/$save_dir/ ; fi - if [ $count_mod != 0 ] ; then cp $dir/*.mod $dir/$save_dir/ ; fi - if [ $count_f90 != 0 ] ; then cp $dir/*.f90 $dir/$save_dir/ ; fi - else - deps=`cat $dir/$save_dir/files.dep` - cd $dir/$save_dir - found=`ls *.o *.mod 2>/dev/null` - cd $path_back - missing_files=`comm -23 <(tr ' ' $'\n' <<< $deps | sort) <(tr ' ' $'\n' <<< $found | sort)` - for file in $missing_files ; do - if [ -f $dir/$file ] ; then cp $dir/$file $dir/$save_dir ; fi - filef90=`echo $file | sed 's/.$/f90/'` - if [ -f $dir/$filef90 ] ; then cp $dir/$filef90 $dir/$save_dir ; fi - done - fi - fi - if [ -f lib/$library ] ; then - cp $compdir/lib/$library $dir/$save_dir - fi +if [ ! -d $dir/$save_dir ] ; then + source $compdir/sbin/compilation/verbosity.sh "object_save_and_restore.sh: mkdir $save_dir" + mkdir -p $dir/$save_dir +fi +cd $dir +if [ $count_obj != 0 ]; then + for tos in *.o; do + source $compdir/sbin/compilation/verbosity.sh "object_save_and_restore.sh: saving $tos" + if ! test -L $tos; then cp -u $tos $save_dir; fi + done +fi +if [ $count_mod != 0 ]; then + for tos in *.mod; do + source $compdir/sbin/compilation/verbosity.sh "object_save_and_restore.sh: saving $tos" + if ! test -L $tos; then cp -u $tos $save_dir; fi + done +fi +if [ $count_f90 != 0 ]; then + for tos in *.f90; do + source $compdir/sbin/compilation/verbosity.sh "object_save_and_restore.sh: saving $tos" + if ! test -L $tos; then cp -u $tos $save_dir; fi + done +fi +if [ $count_obj_ts != 0 ]; then + for tos in *.o_to_save; do + source $compdir/sbin/compilation/verbosity.sh "object_save_and_restore.sh: saving and removing $tos" + if ! test -L $tos; then mv $tos $save_dir/${tos/_to_save}; fi + done +fi +if [ $count_mod_ts != 0 ]; then + for tos in *.mod_to_save; do + source $compdir/sbin/compilation/verbosity.sh "object_save_and_restore.sh: saving and removing $tos" + if ! test -L $tos; then mv $tos $save_dir/${tos/_to_save}; fi + source $compdir/sbin/compilation/verbosity.sh "object_save_and_restore.sh: removing" $compdir/include/${tos/_to_save} + rm -f $compdir/include/${tos/_to_save} + done +fi +cd $path_back +if [[ -f "$compdir/lib/$library" ]]; then + source $compdir/sbin/compilation/verbosity.sh "object_save_and_restore.sh: moving $compdir/lib/$library to $dir/$save_dir" + if ! test -L $compdir/lib/$library; then mv $compdir/lib/$library $dir/$save_dir; fi fi # # Restore files # -if [[ -d $dir/$restore_dir/ ]] && [[ ! $dir == *"yambo/Ydriver"* ]] ; then - # Restore operation starts - # remove files from previous compilation - count_obj=`ls -1 $dir/*.o 2>/dev/null | wc -l` - count_mod=`ls -1 $dir/*.mod 2>/dev/null | wc -l` - count_f90=`ls -1 $dir/*.f90 2>/dev/null | wc -l` - if [ $count_obj != 0 ]; then - if [ "$VERB" == 1 ] ; then echo "Removing $dir/*.o " ; fi - rm $dir/*.o ; - fi - if [ "$count_mod" -gt "0" ] ; then - if [ "$VERB" == 1 ] ; then echo "Removing $dir/*.mod " ; fi - cd $dir - for mod in *.mod ; do - rm $compdir/include/$mod +if [[ -d $dir/$restore_dir ]] && [[ ! "$restore_dir" == "$save_dir" ]] ; then + cd $dir + if [ $count_obj_res != 0 ]; then + for tos in $restore_dir/*.o; do + tos_b=`basename $tos` + source $compdir/sbin/compilation/verbosity.sh "object_save_and_restore.sh: removing $tos_b in $dir" + rm -f $tos_b + source $compdir/sbin/compilation/verbosity.sh "object_save_and_restore.sh: linking $tos to $dir" + ln -s $tos . done - rm *.mod - cd $path_back fi - if [ $count_f90 != 0 ]; then - if [ "$VERB" == 1 ] ; then echo "Removing $dir/*.mod " ; fi - rm $dir/*.f90 + if [ $count_mod_res != 0 ]; then + for tos in $restore_dir/*.mod; do + tos_b=`basename $tos` + source $compdir/sbin/compilation/verbosity.sh "object_save_and_restore.sh: removing $tos_b in $dir" + rm -f $tos_b + source $compdir/sbin/compilation/verbosity.sh "object_save_and_restore.sh: linking $tos to $dir" + ln -s $tos . + source $compdir/sbin/compilation/verbosity.sh "object_save_and_restore.sh: removing $tos_b in $compdir/include" + cd $compdir/include + rm -f $tos_b + source $compdir/sbin/compilation/verbosity.sh "object_save_and_restore.sh: linking $compdir/$dir/$tos to $compdir/include" + ln -s $compdir/$dir/$tos ./ + cd $path_back + cd $dir + done fi - if [ ! "$library" == "NONE" ] && [ -f $compdir/lib/$library ]; then - if [ "$VERB" == 1 ] ; then echo "Removing $compdir/lib/$library " ; fi - rm -f $compdir/lib/$library + if [ $count_f90_res != 0 ]; then + for tos in $restore_dir/*.f90; do + tos_b=`basename $tos` + source $compdir/sbin/compilation/verbosity.sh "object_save_and_restore.sh: removing $tos_b in $dir" + rm -f $tos_b + source $compdir/sbin/compilation/verbosity.sh "object_save_and_restore.sh: linking $tos to $dir" + ln -s $tos . + done fi - # check for files - if [ ! -f $dir/$restore_dir/files.dep ]; then - deps="" + cd $path_back + if [[ -f $dir/$restore_dir/$library ]] && [[ ! "$library" == "NONE" ]]; then + source $compdir/sbin/compilation/verbosity.sh "object_save_and_restore.sh: removing $library in $compdir/lib" + cd $compdir/lib + rm -f $library + source $compdir/sbin/compilation/verbosity.sh "object_save_and_restore.sh: linking $compdir/$dir/$restore_dir/$library to $compdir/lib" + ln -s $compdir/$dir/$restore_dir/$library ./ + DIR_restored="yes" else - deps=`cat $dir/$restore_dir/files.dep` - fi - found="" - missing_files=`comm -23 <(tr ' ' $'\n' <<< $deps | sort) <(tr ' ' $'\n' <<< $found | sort)` - count_obj_res=`ls -1 $dir/$restore_dir/*.o 2>/dev/null | wc -l` - count_mod_res=`ls -1 $dir/$restore_dir/*.mod 2>/dev/null | wc -l` - count_f90_res=`ls -1 $dir/$restore_dir/*.f90 2>/dev/null | wc -l` - if [ $count_obj_res != 0 ] || [ $count_mod_res != 0 ] ; then - cd $dir/$restore_dir - found=`ls *.o *.mod 2>/dev/null` - cd $path_back - missing_files=`comm -23 <(tr ' ' $'\n' <<< $deps | sort) <(tr ' ' $'\n' <<< $found | sort)` - cd $dir - if [ $count_obj_res != 0 ] ; then ln -s $restore_dir/*.o ./ ; fi - if [ $count_f90_res != 0 ] ; then ln -s $restore_dir/*.f90 ./ ; fi - if [ $count_mod_res != 0 ] ; then - # modules need to be linked also inside $compdir/include - for mod in $restore_dir/*.mod ; do - ln -s $mod ./ - mod_filename=`basename $mod` - cd $compdir/include - if test -f $mod_filename ; then rm $mod_filename; fi - ln -s $compdir/$dir/$mod_filename ./ - cd $path_back/$dir - done - fi - cd $path_back - fi - if [[ ! "$missing_files" == "" ]] && [ ! "$library" == "NONE" ]; then - rm -f $dir/$restore_dir/$library - DIR_is_to_recompile=1 - fi - if [[ -f $dir/$restore_dir/$library ]] || [ "$library" == "NONE" ]; then - if [[ -f $dir/$restore_dir/$library ]] ; then - cd $compdir/lib - ln -s $compdir/$dir/$restore_dir/$library ./ - cd $path_back - fi - if [[ "$missing_files" == "" ]] ; then - FOLDER_OK=1 - source ./sbin/compilation/fix_locks.sh - fi + DIR_restored="no" fi + cd $path_back + source $compdir/sbin/compilation/fix_locks.sh fi + diff --git a/sbin/compilation/options.sh b/sbin/compilation/options.sh index a40b704ec0..8e6dfc61ed 100755 --- a/sbin/compilation/options.sh +++ b/sbin/compilation/options.sh @@ -1,26 +1,10 @@ #!/bin/bash # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2006 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 # while getopts ":d:t:o:m:nDGN:g:" opt; do case $opt in diff --git a/sbin/compilation/projects.sh b/sbin/compilation/projects.sh index 80c467f414..0eb86dee7c 100755 --- a/sbin/compilation/projects.sh +++ b/sbin/compilation/projects.sh @@ -1,26 +1,10 @@ #!/bin/bash # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2006 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 # for arg in $ARGS do diff --git a/sbin/compilation/special_sources.sh b/sbin/compilation/special_sources.sh index 0a7263abd4..97649f5c82 100755 --- a/sbin/compilation/special_sources.sh +++ b/sbin/compilation/special_sources.sh @@ -1,26 +1,10 @@ #!/bin/bash # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2006 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 # F77_NOOPT_SRC="xerbla.o slamch.o" FC_LOCAL_SRC="sgfft.o" diff --git a/sbin/compilation/stamp_remove.sh b/sbin/compilation/stamp_remove.sh index 42bc5b695a..bfc2ce7d90 100755 --- a/sbin/compilation/stamp_remove.sh +++ b/sbin/compilation/stamp_remove.sh @@ -1,40 +1,15 @@ #!/bin/bash # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2018 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. -# -# 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 # -if [ $1 == "goal" ] ; then - if [ "$VERB" == 1 ] ; then echo "remove goal | rm -f $compdir/config/stamps_and_lists/${goal}.stamp"; fi - rm -f $compdir/config/stamps_and_lists/${goal}.stamp -fi -if [ $1 == "target.a" ] ; then - if [ "$VERB" == 1 ] ; then echo "remove target | rm -f $compdir/config/stamps_and_lists/${target}.a.stamp"; fi - rm -f $compdir/config/stamps_and_lists/${target}.a.stamp -fi -if [ $1 == "lib" ] ; then - if [ "$VERB" == 1 ] ; then echo "remove lib | rm -f $compdir/config/stamps_and_lists/lib${llib}.a.stamp"; fi - rm -f $compdir/config/stamps_and_lists/lib${llib}.a.stamp -fi -if [ $1 == "exe" ] ; then - stamp=`find $compdir/config/stamps_and_lists/ -name "compiling*" | sed "s/compiling_//"` - rm -f $stamp -fi +if [ $1 == "goal" ] && [ ! -z $goal ] ; then stamp=$compdir/config/stamps_and_lists/${goal}.stamp ; fi +if [ $1 == "target.a" ] && [ ! -z $target ] ; then stamp=$compdir/config/stamps_and_lists/${target}.a.stamp ; fi +if [ $1 == "lib" ] && [ ! -z $llib ] ; then stamp=$compdir/config/stamps_and_lists/lib${llib}.a.stamp; fi +if [ $1 == "lib" ] && [ ! -z $llib ] && [[ "$file_src" == *"${ypp/\./}" ]] ; then stamp=$compdir/config/stamps_and_lists/lib_ypp_${llib}.a.stamp; fi +if [ $1 == "exe" ] ; then stamp=`find $compdir/config/stamps_and_lists/ -name "compiling*" | sed "s/compiling_//"`; fi +source ./sbin/compilation/verbosity.sh "stamp_remove.sh (mode $1) running on $dir: remove $stamp" +rm -f $stamp diff --git a/sbin/compilation/verbosity.sh b/sbin/compilation/verbosity.sh new file mode 100755 index 0000000000..15f4f30ad5 --- /dev/null +++ b/sbin/compilation/verbosity.sh @@ -0,0 +1,59 @@ +#!/bin/bash +# +# License-Identifier: GPL +# +# Copyright (C) 2023 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# +VERB=0 +# +if [ "$VERB" == 0 ] ; then return; fi +# +# Log files +if [ "$1" == "init" ] ; then + mkdir -p compilation_log + vlog="$compdir/compilation_log/todo.log" + if [ "$mode" == "l" ]; then vlog="$compdir/compilation_log/do.log"; fi + return +fi +# +if [ "$1" == "options" ] ; then + echo "####################################################################################" >> $vlog + echo "${1}: current dir is $cdir" >> $vlog + echo "${1}: mode is $mode" >> $vlog + if [ ! -z $new ]; then echo "${1}: NEW procedure" >> $vlog; fi + if [ ! -z $dep ]; then echo "${1}: Deps procedure" >> $vlog; fi + if [ ! -z $target ]; then echo "${1}: target is $target" >> $vlog; fi + if [ ! -z $goal ]; then echo "${1}: goal is $goal" >> $vlog; fi + if [ ! -z $ofile ]; then echo "${1}: ofile is $ofile" >> $vlog; fi + if [ ! -z $global ]; then echo "${1}: global compilation" $vlog; fi + if [ ! -z $lib ]; then echo "${1}: lib is $lib" >> $vlog; fi + if [ ! -z $NARG ]; then echo "${1}: ARG is $NARG" >> $vlog; fi + return +fi +# +if [ "$1" == "locks" ] ; then + echo "DIR " $dir >> $vlog + echo "LOCKS(old) " $lock_string >> $vlog + echo "LOCKS(new) " $flag_string >> $vlog + echo "MISSING " $missing >> $vlog + echo "NEW " $new >> $vlog + echo "SAVE " $save_dir >> $vlog + echo "RESTORE " $restore_dir >> $vlog + return +fi +# +if [ "$1" == "filename" ] ; then + echo "file " $file >> $vlog + if [ ! -z $file_o ]; then echo ".o " $file_o_src >> $vlog; fi + if [ ! -z $file_c ]; then echo ".c " $file_c_src >> $vlog; fi + if [ ! -z $file_f ]; then echo ".f " $file_f_src >> $vlog; fi + if [ ! -z $file_f90 ]; then echo ".f90 " $file_f90_src >> $vlog; fi + if [ ! -z $file_F ]; then echo ".F " $file_F_src >> $vlog; fi + if [ ! -z $file_src ]; then echo "(file_src) " $file_src >> $vlog; fi + return +fi +# +echo "$1" >> $vlog +# diff --git a/sbin/developer_tools/clean_unused_variables.tcsh b/sbin/developer_tools/clean_unused_variables.tcsh index 689cad1b17..c3b170b90e 100755 --- a/sbin/developer_tools/clean_unused_variables.tcsh +++ b/sbin/developer_tools/clean_unused_variables.tcsh @@ -1,26 +1,10 @@ #! /bin/tcsh # -# Copyright (C) 2000-2020 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): HM -# -# 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) 2019 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. -# -# 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): HM # unalias mv rm cp diff --git a/sbin/developer_tools/copyright.sh b/sbin/developer_tools/copyright.sh new file mode 100755 index 0000000000..6436c318e4 --- /dev/null +++ b/sbin/developer_tools/copyright.sh @@ -0,0 +1,117 @@ +#!/bin/bash +# +# License-Identifier: GPL +# +# Copyright (C) 2023 The Yambo Team +# +# Authors (see AUTHORS file for details): AM + +if (( $# == 0 )); then + >&2 echo " copyright.sh -c(check only) -y *(year only) -f (full header)" + exit +fi +CHECK="no" +YEAR="no" +FULL="no" +# Get the options +while getopts "cyf" option; do + case $option in + c) CHECK="yes";; + y) YEAR="yes";; + f) FULL="yes";; + esac +done +# +cat << EOF > base.awk +{ + if (FNR ==1) { + HEAD=0 + AUT=0 + } + if ( index(\$0,"Copyright (C)") != 0 && index(\$0,"YAMBO") !=0) { + HEAD=1 + NA=split(\$0,a," ") + NB=split(a[COL],b,"-") + YEAR=b[1] + getline + } + if ( index(\$0,"Authors") != 0 && index(\$0,"details") !=0) { + AUT=1 + gsub(")"," ",\$0) + NA=split(\$0,a,":") + AUTHORS=a[2] + gsub(",","",AUTHORS) + getline + } + if ( index(\$0,"www.gnu.org") != 0 && index(\$0,"gpl.txt") !=0) { + HEAD=0 + print "STRING License-Identifier: GPL" + print "STRING" + print "STRING Copyright (C) "YEAR" The Yambo Team" + print "STRING" + print "STRING Authors (see AUTHORS file for details):" AUTHORS + getline + } + if (HEAD==1) {next} + # + print \$0 +} +EOF +# +# STRING: +# # .pm .pl .m4 .sh .mk => COL=4 +# ! .F => COL=4 +# .c .h => COL=3 +# +file_list=`find . -type f | grep -v bz2 | grep -E '\.F|\.pm|\.pl|\.m4|\.h|\.c|\.sh|\.mk' | grep -v '\.swp' | grep -v 'gsl_complex_math.h' | grep -v 'PARSER_math.c' | grep -v 'copyright.sh' ` +# +for file in $file_list; do + NL=`grep Copyr $file | grep YAMBO | wc -l` + if [ "$YEAR" == "yes" ]; then NL=`grep Copyr $file | grep Yambo | wc -l`; fi + if [ $NL -gt 0 ]; then + isc=`echo $file| grep -E '\.c' |wc -l` + ish=`echo $file| grep -E '\.h' |wc -l` + isF=`echo $file| grep -E '\.F' |wc -l` + ispl=`echo $file| grep -E '\.pl' |wc -l` + issh=`echo $file| grep -E '\.sh' |wc -l` + if [ ${isc} != "0" ] && [ "$CHECK" == "yes" ]; then echo "$file is .c"; fi + if [ ${ish} != "0" ] && [ "$CHECK" == "yes" ]; then echo "$file is .h"; fi + if [ ${isF} != "0" ] && [ "$CHECK" == "yes" ]; then echo "$file is .F"; fi + if [ ${issh} != "0" ] && [ "$CHECK" == "yes" ]; then echo "$file is .sh"; fi + if [ ${ispl} != "0" ] && [ "$CHECK" == "yes" ]; then echo "$file is .pl"; fi + if [ "$CHECK" == "yes" ]; then continue; fi + # + if [ "$YEAR" == "yes" ]; then + #===================== + DATE=`git log --follow --pretty=format:%ad --date=short --date=format:'%Y' "$file" |tail -n 1` + cat $file | sed "s/Copyright (C) 2000/Copyright (C) $DATE/g" > temporary + echo $file $DATE >> ../copyright.log + fi + # + if [ "$FULL" == "yes" ]; then + #===================== + if [ ${isc} != "0" ]; then + cat base.awk | sed 's/COL/3/g' | sed 's/STRING/ /g' > CP.awk + elif [ ${ish} != "0" ]; then + cat base.awk | sed 's/COL/3/g' | sed 's/STRING/ /g' > CP.awk + elif [ ${isF} != "0" ]; then + cat base.awk | sed 's/COL/4/g' | sed 's/STRING/!/g' > CP.awk + else + cat base.awk | sed 's/COL/4/g' | sed 's/STRING/#/g' > CP.awk + fi + awk -f CP.awk $file > temporary + fi + # + if [ -f temporary ]; then + lines=`diff $file temporary |wc -l` + if [ ${lines} != "0" ]; then + echo ${file} + mv temporary $file + if [ ${issh} != "0" ]; then chmod +x $file; fi + if [ ${ispl} != "0" ]; then chmod +x $file; fi + fi + fi + rm -f temporary CP.awk + fi +done +rm -f base.awk diff --git a/sbin/developer_tools/file_splitter.pl b/sbin/developer_tools/file_splitter.pl index 14fc36a47d..d2a4f0de9c 100755 --- a/sbin/developer_tools/file_splitter.pl +++ b/sbin/developer_tools/file_splitter.pl @@ -1,5 +1,11 @@ #!/usr/bin/perl # +# License-Identifier: GPL +# +# Copyright (C) 2022 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# use Getopt::Long; use File::Find; use File::Copy; diff --git a/sbin/developer_tools/find_and_replace.sh b/sbin/developer_tools/find_and_replace.sh index 8a7e7742c5..bf56f1871f 100755 --- a/sbin/developer_tools/find_and_replace.sh +++ b/sbin/developer_tools/find_and_replace.sh @@ -1,26 +1,10 @@ #! /bin/tcsh # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# 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. +# Copyright (C) 2020 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. -# -# 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 # if ( $#argv == 0 ) goto help diff --git a/sbin/developer_tools/msg_unit_shift.pl b/sbin/developer_tools/msg_unit_shift.pl index 9abb52ea53..1373cae6f6 100755 --- a/sbin/developer_tools/msg_unit_shift.pl +++ b/sbin/developer_tools/msg_unit_shift.pl @@ -1,5 +1,11 @@ #!/usr/bin/perl # +# License-Identifier: GPL +# +# Copyright (C) 2020 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# use Getopt::Long; use File::Find; use File::Copy; diff --git a/sbin/developer_tools/recursive_year_update.sh b/sbin/developer_tools/recursive_year_update.sh deleted file mode 100755 index 179ccb8583..0000000000 --- a/sbin/developer_tools/recursive_year_update.sh +++ /dev/null @@ -1,92 +0,0 @@ -#! /bin/sh -# -# 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. -# -WY=`date +%Y` -# -if [ $# -ne 2 ]; then - echo 1>&2 Usage: recursive_year_update.sh check/replace YEAR - echo 1>&2 - echo 1>&2 Current year is is $WY - exit 127 -fi -# -cat << EOF > check.awk -{ - if ( index(\$0,"Copyright (C)") != 0 && index(\$0,"YAMBO") && index(\$0,"$2") != 0) - { - print \$0 >> "temporary" - } -} -EOF -cat << EOF > normal.awk -{ - if ( index(\$0,"Copyright (C)") != 0 && index(\$0,"YAMBO")) - { - gsub ("-$2","-$WY") - } - print \$0 >> "temporary" -} -EOF -cat << EOF > php.awk -{ - if ( index(\$0,"-$2 Andrea Marini") != 0) - { - gsub ("-$2","-$WY") - } - print \$0 >> "temporary" -} -EOF -# -file_list=`find . -type f | grep -v bz2 | grep -E '\.F|\.pm|\.pl|\.php|\.m4|\.h|\.in|\.c|\.sh' ` -for file in $file_list; do - php=`echo $file| grep -E '\.php' |wc -l` - sh=`echo $file| grep -E '\.sh' |wc -l` - pl=`echo $file| grep -E '\.pl' |wc -l` - if [ ${php} != "0" ]; then - awk -f php.awk $file - if [ ${sh} != "0" ]; then chmod +x $file; fi - if [ ${pl} != "0" ]; then chmod +x $file; fi - else - if [ "$1" = "check" ]; then - awk -f check.awk $file - else - awk -f normal.awk $file - fi - fi - if [ -f temporary ]; then - if [ "$1" = "check" ]; then - echo -n ${file}: - cat temporary - else - lines=`diff $file temporary |wc -l` - if [ ${lines} != "0" ]; then - echo ${file} - #diff $file temporary - mv temporary $file - fi - fi - fi - rm -f temporary -done -rm -f php.awk normal.awk check.awk diff --git a/sbin/git_configure_and_hooks.sh b/sbin/git_configure_and_hooks.sh index 19e9d18d3e..25d71bd376 100755 --- a/sbin/git_configure_and_hooks.sh +++ b/sbin/git_configure_and_hooks.sh @@ -1,26 +1,10 @@ #! /bin/sh # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): HM, DS +# 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. -# -# 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. +# Authors (see AUTHORS file for details): HM DS # # Create git hooks to update yambo version and hash # @@ -29,7 +13,8 @@ cat < .git/hooks/pre-commit #!/bin/bash sbin/yambo_versions_update.tcsh r -if [ -e include/driver/version.h ] ; then git add include/driver/version.h ; fi +git add configure +if [ -e include/version/version.m4 ] ; then git add include/version/version.m4 ; fi EOF chmod +x .git/hooks/pre-commit # diff --git a/sbin/gitchangelog.py b/sbin/gitchangelog.py index f460b3efc9..65cc12a70b 100755 --- a/sbin/gitchangelog.py +++ b/sbin/gitchangelog.py @@ -1,26 +1,10 @@ #!/usr/bin/env python # -# Copyright (C) 2000-2020 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): CH -# -# 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) 2016 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. -# -# 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): CH # # -*- coding: utf-8 -*- diff --git a/sbin/make_message.pl b/sbin/make_message.pl index b81a74b2a8..43ed24676f 100755 --- a/sbin/make_message.pl +++ b/sbin/make_message.pl @@ -1,32 +1,17 @@ #!/usr/bin/perl -w # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): CH -# -# 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) 2006 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): CH # -# 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. +# Wonderful script to generate a commit message template # -# Wonderful script to generate a commit message template (CDH) # Usage: In the YAMBO root directory # -# sbin/make_message.pl or -# sbin/make_message.pl -p="Myrta" if a patch was supplied by e.g. Myrta +# sbin/make_message.pl or +# sbin/make_message.pl -p="Myrta" if a patch was supplied by e.g. Myrta # use Getopt::Long; &GetOptions("p=s" => \$patchname); @@ -92,13 +77,13 @@ # # Versions # -open(VER,"<","include/driver/version.h"); +open(VER,"<","include/version/version.m4"); while($line = ) { chomp $line; - my @VERS = split / /, $line; - if ( $line =~ /YAMBO_VERSION/ ) {$SV = $VERS[2]}; - if ( $line =~ /YAMBO_SUBVERSION/ ) {$SS = $VERS[2]}; - if ( $line =~ /YAMBO_PATCHLEVEL/ ) {$SP = $VERS[2]}; + my @VERS = split /"/, $line; + if ( $line =~ /SVERSION=/ ) {$SV = $VERS[1];}; + if ( $line =~ /SSUBVERSION=/ ) {$SS = $VERS[1]}; + if ( $line =~ /SPATCHLEVEL=/ ) {$SP = $VERS[1]}; } close(VER); $Revision=`git rev-list --count HEAD`; diff --git a/sbin/replacer.sh b/sbin/replacer.sh index e77f161fd0..0adf6ace20 100755 --- a/sbin/replacer.sh +++ b/sbin/replacer.sh @@ -1,26 +1,10 @@ #!/bin/bash # -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL # -# Authors (see AUTHORS file for details): AF -# -# 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) 2017 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. -# -# 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): AF # cat $1 | sed -e 's/NEWLINE/\ /g' | sed -e 's/\. *not *\./\.not\./g' | sed -e 's/QUOTES\ /\"/g' | sed -e 's/\ QUOTES/\"/g' > $1"_space" diff --git a/sbin/yambo_versions_update.tcsh b/sbin/yambo_versions_update.tcsh index da2317c8a0..087215429e 100755 --- a/sbin/yambo_versions_update.tcsh +++ b/sbin/yambo_versions_update.tcsh @@ -1,26 +1,10 @@ #! /bin/tcsh -f # -# Copyright (C) 2000-2018 the YAMBO team -# http://www.yambo-code.org +# License-Identifier: GPL +# +# Copyright (C) 2008 The Yambo Team # # 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 awk = awk @@ -36,18 +20,11 @@ endif # # Get current version & revision # -set repo=`git remote -v | grep push` -# -set dummy="_VERSION" -set version_old=`cat include/driver/version.h | grep $dummy | $awk '{split($0,frags);print frags[3]}'` -set dummy="_SUBVERSION" -set subver_old=`cat include/driver/version.h | grep $dummy | $awk '{split($0,frags);print frags[3]}'` -set dummy="_PATCHLEVEL" -set patch_old=`cat include/driver/version.h | grep $dummy | $awk '{split($0,frags);print frags[3]}'` -set dummy="_REVISION" -set revision_old=`cat include/driver/version.h | grep $dummy | $awk '{split($0,frags);print frags[3]}'` -set dummy="_HASH" -set hash_old=`cat include/driver/version.h | grep $dummy | $awk '{gsub("\""," ");split($0,frags);print frags[3]}'` +set version_old=`cat include/version/version.m4 | grep SVERSION | $awk '{split($0,frags,"SVERSION=");gsub("\"","",frags[2]);print frags[2]}'` +set subver_old=`cat include/version/version.m4 | grep SSUBVERSION | $awk '{split($0,frags,"SSUBVERSION=");gsub("\"","",frags[2]);print frags[2]}'` +set revision_old=`cat include/version/version.m4 | grep SREVISION | $awk '{split($0,frags,"SREVISION=");gsub("\"","",frags[2]);print frags[2]}'` +set patch_old=`cat include/version/version.m4 | grep SPATCHLEVEL | $awk '{split($0,frags,"SPATCHLEVEL=");gsub("\"","",frags[2]);print frags[2]}'` +set hash_old=`cat include/version/version.m4 | grep SHASH | $awk '{split($0,frags,"SHASH=");gsub("\"","",frags[2]);print frags[2]}'` # set dummy1=`git rev-list --count HEAD` @ dummy1= $dummy1 + 10000 @@ -55,8 +32,6 @@ if ( "$dummy1" >= "$revision_old" ) set revision_HEAD=`echo $dummy1` if ( "$dummy1" < "$revision_old" ) set revision_HEAD=`echo $revision_old` set hash_HEAD=`git rev-parse --short HEAD` # -echo "Detected version" $version_old"."$subver_old"."$patch_old "Rev.(CURRENT)" $revision_old "(HEAD)" $revision_HEAD "Hash" $hash_old -# # Increase counters # set version_new = $version_old @@ -119,16 +94,6 @@ cat << EOF > configure.awk } EOF endif -cat << EOF > version.h.awk -{ - gsub("_VERSION $version_old" ,"_VERSION $version_new" ,\$0) - gsub("_SUBVERSION $subver_old","_SUBVERSION $subver_new",\$0) - gsub("_PATCHLEVEL $patch_old" ,"_PATCHLEVEL $patch_new", \$0) - gsub("_REVISION $use_rev_old" ,"_REVISION $use_rev_new" ,\$0) - gsub("_HASH \"$hash_old\"" ,"_HASH \"$hash_new\"" , \$0) - print \$0 > "NEW" -} -EOF cat << EOF > version.m4.awk { gsub("$v_string_old","$v_string_new",\$0) @@ -146,10 +111,8 @@ if ( "$argv[1]" != "save" ) then mv NEW configure chmod a+x configure endif - $awk -f version.h.awk include/driver/version.h - mv NEW include/driver/version.h - $awk -f version.m4.awk config/version/version.m4 - mv NEW config/version/version.m4 + $awk -f version.m4.awk include/version/version.m4 + mv NEW include/version/version.m4 endif rm -fr version.*.awk configure.awk # diff --git a/src/Yio/IO_and_Messaging_switch.F b/src/Yio/IO_and_Messaging_switch.F index 8c6d504eeb..453cd1c344 100644 --- a/src/Yio/IO_and_Messaging_switch.F +++ b/src/Yio/IO_and_Messaging_switch.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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. -! -! 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 ! subroutine IO_and_Messaging_switch(what,CONDITION) ! diff --git a/src/Yio/IO_make_directories.F b/src/Yio/IO_make_directories.F index b34aa0c6c1..58372f8764 100644 --- a/src/Yio/IO_make_directories.F +++ b/src/Yio/IO_make_directories.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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 ! subroutine IO_make_directories(what) ! diff --git a/src/Yio/IO_temporary_jobdir_and_strings.F b/src/Yio/IO_temporary_jobdir_and_strings.F index ac8e946a31..d8a8a49305 100644 --- a/src/Yio/IO_temporary_jobdir_and_strings.F +++ b/src/Yio/IO_temporary_jobdir_and_strings.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 ! subroutine IO_temporary_jobdir_and_strings(what,value) ! diff --git a/src/Yio/def_variable_bulk.F b/src/Yio/def_variable_bulk.F index c71a1f68b1..fb083854b7 100644 --- a/src/Yio/def_variable_bulk.F +++ b/src/Yio/def_variable_bulk.F @@ -1,31 +1,15 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, HM, DS +! Copyright (C) 2018 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 HM DS ! -! 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 def_variable_bulk(ID,VAR,VAR_ID,VAR_SZ,VAR_KIND,dim_names,par_io_kind,silent) +subroutine def_variable_bulk(ID,VAR,VAR_ID,VAR_SZ,VAR_KIND,dim_names,par_io_kind,silent,chunksize) ! use netcdf use com, ONLY:fat_log - use pars, ONLY:SP,DP,IP,LP,schlen,nf90_SP + use pars, ONLY:SP,DP,IP,LP,schlen,nf90_SP,CR_YIO,LP_YIO,IP_YIO use parallel_m, ONLY:ncpu,mpi_comm_null use IO_m, ONLY:write_is_on,read_is_on,io_unit,netcdf_call,io_netcdf_var,& & netcdf_dim,io_file,io_PAR_comm @@ -40,6 +24,7 @@ subroutine def_variable_bulk(ID,VAR,VAR_ID,VAR_SZ,VAR_KIND,dim_names,par_io_kind character(schlen), optional, intent(in) :: dim_names(:) character(*), optional, intent(in) :: par_io_kind logical, optional, intent(in) :: silent + integer, optional, intent(in) :: chunksize(:) ! Chunking parameter ! ! Work Space ! @@ -49,14 +34,12 @@ subroutine def_variable_bulk(ID,VAR,VAR_ID,VAR_SZ,VAR_KIND,dim_names,par_io_kind #if defined _HDF5_COMPRESSION integer :: shuffle,deflate,deflate_level #endif - ! - ! Define var kind. Notice that SP=IP, this is why I need to shift by 100 ! if(VAR_KIND==SP) netcdf_var_kind=nf90_SP if(VAR_KIND==DP) netcdf_var_kind=nf90_double - if(VAR_KIND==IP+100) netcdf_var_kind=nf90_int - if(VAR_KIND==LP+100) netcdf_var_kind=nf90_byte - if(VAR_KIND==0 ) netcdf_var_kind=nf90_char + if(VAR_KIND==IP_YIO) netcdf_var_kind=nf90_int + if(VAR_KIND==LP_YIO) netcdf_var_kind=nf90_byte + if(VAR_KIND==CR_YIO) netcdf_var_kind=nf90_char ! silent_=.not.fat_log if(present(silent)) silent_=silent @@ -105,6 +88,14 @@ subroutine def_variable_bulk(ID,VAR,VAR_ID,VAR_SZ,VAR_KIND,dim_names,par_io_kind nf_error=nf90_var_par_access(io_unit(ID), io_netcdf_var(ID,VAR_ID), netcdf_par_io_kind) call netcdf_call(nf_error,ID,VAR=VAR) endif + ! Add chunking to the variable. + if (present(chunksize)) then + if (PRODUCT(chunksize)>0) then + ! Only chuck if all the dims are greater than 0 + nf_error = nf90_def_var_chunking(io_unit(ID), io_netcdf_var(ID,VAR_ID), NF90_CHUNKED, chunksize) + call netcdf_call(nf_error,ID,VAR=VAR) + endif + endif #endif endif ! diff --git a/src/Yio/def_variable_elemental.F b/src/Yio/def_variable_elemental.F index 0c1014fa05..c2faf9b5d8 100644 --- a/src/Yio/def_variable_elemental.F +++ b/src/Yio/def_variable_elemental.F @@ -1,30 +1,15 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, DS +! Copyright (C) 2018 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. -! -! 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. +! Authors (see AUTHORS file for details): AM DS ! subroutine def_variable_elemental(ID,VAR,VAR_SZ,VAR_KIND,MENU,dim_names,par_io_kind) ! use netcdf use pars, ONLY:SP,DP,IP,LP,schlen,lchlen,nf90_SP,DB_menu_length + use pars, ONLY:IP_YIO,LP_YIO,SP_YIO,DP_YIO,CR_YIO #if !defined _io_lib use drivers, ONLY:list_dbs #endif @@ -59,13 +44,11 @@ subroutine def_variable_elemental(ID,VAR,VAR_SZ,VAR_KIND,MENU,dim_names,par_io_k ! io_rec_pos(ID)=1 ! - ! Define var kind. Notice that SP=IP, this is why I need to shift by 100 - ! - if(VAR_KIND==SP) netcdf_var_kind=nf90_SP - if(VAR_KIND==DP) netcdf_var_kind=nf90_double - if(VAR_KIND==IP+100) netcdf_var_kind=nf90_int - if(VAR_KIND==LP+100) netcdf_var_kind=nf90_byte - if(VAR_KIND==0 ) netcdf_var_kind=nf90_char + if(VAR_KIND==SP_YIO) netcdf_var_kind=nf90_SP + if(VAR_KIND==DP_YIO) netcdf_var_kind=nf90_double + if(VAR_KIND==IP_YIO) netcdf_var_kind=nf90_int + if(VAR_KIND==LP_YIO) netcdf_var_kind=nf90_byte + if(VAR_KIND==CR_YIO) netcdf_var_kind=nf90_char ! #if defined _PAR_IO ! diff --git a/src/Yio/io_bulk.F b/src/Yio/io_bulk.F index 596ce9266e..cc7f2517bc 100644 --- a/src/Yio/io_bulk.F +++ b/src/Yio/io_bulk.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, HM, DS +! Copyright (C) 2006 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. -! -! 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. +! Authors (see AUTHORS file for details): AM HM DS ! subroutine io_bulk(ID,VAR,VAR_SZ,I0,I1,I2,I3,I4,I5,& & R0,R1,R2,R3,R4,R5,& diff --git a/src/Yio/io_connect.F b/src/Yio/io_connect.F index 3f39c82ec2..884f175c48 100644 --- a/src/Yio/io_connect.F +++ b/src/Yio/io_connect.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, DS +! Copyright (C) 2017 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. -! -! 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. +! Authors (see AUTHORS file for details): AM DS ! integer function io_connect(desc,subfolder,type,no_full_RESET,FORCE_READ_MODE,ID) ! @@ -117,7 +101,7 @@ integer function io_connect(desc,subfolder,type,no_full_RESET,FORCE_READ_MODE,ID par_IO=io_PAR_comm(ID)/=mpi_comm_null.and.ncpu>1 ! ! DEBUG < - !write(*,*) myid,"writing to file ",trim(io_file(ID)),file_exists(trim(io_file(ID))) + !write(*,*) myid,"writing to file ",trim(io_file(ID)),file_exists(trim(io_file(ID))),par_IO ! DEBUG > ! if ( (io_action(ID)==OP_APP_CL.or.io_action(ID)==OP_APP) .and. file_exists(trim(io_file(ID))) ) then diff --git a/src/Yio/io_control.F b/src/Yio/io_control.F index 7e093f85ee..84565ad41b 100644 --- a/src/Yio/io_control.F +++ b/src/Yio/io_control.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, DS +! Copyright (C) 2021 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. -! -! 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. +! Authors (see AUTHORS file for details): AM DS ! subroutine io_control(ACTION,MODE,COM,SEC,ID,COMM,DO_IT) ! @@ -37,7 +21,7 @@ subroutine io_control(ACTION,MODE,COM,SEC,ID,COMM,DO_IT) use parallel_int, ONLY:PP_bcast,PP_redux_wait use parallel_m, ONLY:master_cpu,mpi_comm_null,yMPI_comm,mpi_comm_world,ncpu,myid use IO_m, ONLY:io_unit,io_mode,io_com,io_action,io_sec,max_io_units, & -& OP_APP,OP_APP_CL,OP_WR,OP_RD,OP_WR_CL,OP_RD_CL,& +& 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,& & read_is_on,write_is_on ! @@ -53,6 +37,11 @@ subroutine io_control(ACTION,MODE,COM,SEC,ID,COMM,DO_IT) ! integer :: i1,local_COMM,my_max_ID logical :: define_ID_RD,define_ID_WR,HEAD_cpu + ! + 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") ! ! Assign a new ID if the unit is not already open ! diff --git a/src/Yio/io_disconnect.F b/src/Yio/io_disconnect.F index 6018ecfb94..11b2e95470 100644 --- a/src/Yio/io_disconnect.F +++ b/src/Yio/io_disconnect.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, DS +! Copyright (C) 2006 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. -! -! 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. +! Authors (see AUTHORS file for details): AM DS ! subroutine io_disconnect(ID,FORCE) ! diff --git a/src/Yio/io_elemental.F b/src/Yio/io_elemental.F index e4326706ec..6b697cc9f3 100644 --- a/src/Yio/io_elemental.F +++ b/src/Yio/io_elemental.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 ! subroutine io_elemental(ID,VAR,VAR_SZ,CHECK,WARN,OP,I0,DB_I0,I1,DB_I1,& & R0,DB_R0,R1,DB_R1,D0,DB_D0,C0,DB_C0,CH0,DB_CH0,CH1,L0,DB_L0,UNIT,MENU,& diff --git a/src/Yio/io_fragment.F b/src/Yio/io_fragment.F index 4e83a17bf8..3c6585889a 100644 --- a/src/Yio/io_fragment.F +++ b/src/Yio/io_fragment.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! subroutine io_fragment(ID,ID_frag,i_fragment,j_fragment,ierr) ! diff --git a/src/Yio/io_fragment_disconnect.F b/src/Yio/io_fragment_disconnect.F index 5215d8e33f..8242ca1458 100644 --- a/src/Yio/io_fragment_disconnect.F +++ b/src/Yio/io_fragment_disconnect.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! 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 ! subroutine io_fragment_disconnect(ID,ID_frag) ! diff --git a/src/Yio/io_utilities.F b/src/Yio/io_utilities.F index 43521a543c..61614103ff 100644 --- a/src/Yio/io_utilities.F +++ b/src/Yio/io_utilities.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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 DS ! function get_name(desc,subfolder,type,CORE_IO,MORE_IO,COM_IO,ALT_JOB_STRING,ALT_JOB_DIR) ! @@ -216,10 +200,15 @@ function desc_to_varname(desc) ! VARNAME=STRING_remove(VARNAME,".","_") VARNAME=STRING_remove(VARNAME,"=","_") - VARNAME=STRING_remove(VARNAME,"\","_") VARNAME=STRING_remove(VARNAME,"(","_") VARNAME=STRING_remove(VARNAME,")","_") ! +#ifdef _PGI + VARNAME=STRING_remove(VARNAME,"\\","_") +#else + VARNAME=STRING_remove(VARNAME,"\","_") +#endif + ! desc_to_varname=VARNAME ! end function desc_to_varname diff --git a/src/Yio/io_variable_bulk.F b/src/Yio/io_variable_bulk.F index e878c761fc..eca6ed28e3 100644 --- a/src/Yio/io_variable_bulk.F +++ b/src/Yio/io_variable_bulk.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, HM, DS +! Copyright (C) 2006 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. -! -! 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. +! Authors (see AUTHORS file for details): AM HM DS ! subroutine io_variable_bulk(ID, VAR_ID, I0, I1, I2, I3, I4, I5, & & R0, R1, R2, R3, R4, R5, & diff --git a/src/Yio/io_variable_elemental.F b/src/Yio/io_variable_elemental.F index 10f8af35f1..02df3a238a 100644 --- a/src/Yio/io_variable_elemental.F +++ b/src/Yio/io_variable_elemental.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, DS +! Copyright (C) 2006 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. -! -! 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. +! Authors (see AUTHORS file for details): AM DS ! subroutine io_variable_elemental(ID,VAR,CHECK,WARN,OP, & & I0, DB_I0, I1, DB_I1, & diff --git a/src/acfdt/acfdt_tot_energy.F b/src/acfdt/acfdt_tot_energy.F index 56a9829da9..5c140139ea 100644 --- a/src/acfdt/acfdt_tot_energy.F +++ b/src/acfdt/acfdt_tot_energy.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine acfdt_tot_energy(Xen,Xk,En,k,q,X,Dip) ! diff --git a/src/acfdt/gauss_leg_grid.F b/src/acfdt/gauss_leg_grid.F index f0b5e25a3e..3b5a5c2f1b 100644 --- a/src/acfdt/gauss_leg_grid.F +++ b/src/acfdt/gauss_leg_grid.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine gauss_leg_grid(x1,x2,x,w,n) !----------------------------------------------------------------- diff --git a/src/allocations/.objects b/src/allocations/.objects index 2a70eadd19..98a2cb5c91 100644 --- a/src/allocations/.objects +++ b/src/allocations/.objects @@ -1,2 +1,4 @@ -objs = ELPH_alloc.o X_ALLOC_parallel.o X_ALLOC_global.o X_ALLOC_elemental.o - +#if defined _ELPH +ELPH_objs = ELPH_alloc.o +#endif +objs = $(ELPH_objs) X_ALLOC_parallel.o X_ALLOC_global.o X_ALLOC_elemental.o diff --git a/src/allocations/ELPH_alloc.F b/src/allocations/ELPH_alloc.F index f201957f67..02f4e36ee1 100644 --- a/src/allocations/ELPH_alloc.F +++ b/src/allocations/ELPH_alloc.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine ELPH_alloc(what,GKKP,Nb,Nm,Nk_mem,Nq_mem) ! diff --git a/src/allocations/ELPH_project.dep b/src/allocations/ELPH_project.dep new file mode 100644 index 0000000000..fe7fad8da6 --- /dev/null +++ b/src/allocations/ELPH_project.dep @@ -0,0 +1,2 @@ + ELPH_alloc.o + diff --git a/src/allocations/X_ALLOC_elemental.F b/src/allocations/X_ALLOC_elemental.F index d7a67529d9..f3582f9d22 100644 --- a/src/allocations/X_ALLOC_elemental.F +++ b/src/allocations/X_ALLOC_elemental.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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 ! subroutine X_ALLOC_elemental(WHAT,DIM) ! @@ -78,9 +62,6 @@ 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 _CUDA - allocate(X_mat_d, source=X_mat) -#endif end select return endif diff --git a/src/allocations/X_ALLOC_global.F b/src/allocations/X_ALLOC_global.F index 1811894eb3..11db20ef07 100644 --- a/src/allocations/X_ALLOC_global.F +++ b/src/allocations/X_ALLOC_global.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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 ! subroutine X_ALLOC_global(WHAT,W) ! diff --git a/src/allocations/X_ALLOC_parallel.F b/src/allocations/X_ALLOC_parallel.F index b36e2b73e2..99e36c5474 100644 --- a/src/allocations/X_ALLOC_parallel.F +++ b/src/allocations/X_ALLOC_parallel.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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 ! subroutine X_ALLOC_parallel(X_par,NG,NW,mode) ! diff --git a/src/bse/EPS_via_perturbative_inversion.F b/src/bse/EPS_via_perturbative_inversion.F index 8876d417ce..8605251431 100644 --- a/src/bse/EPS_via_perturbative_inversion.F +++ b/src/bse/EPS_via_perturbative_inversion.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! integer function EPS_via_perturbative_inversion(n,m,n_loop,D,C,f,Lo) ! diff --git a/src/bse/K.F b/src/bse/K.F index 5e07d1c22b..def1d920bf 100644 --- a/src/bse/K.F +++ b/src/bse/K.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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. +! Copyright (C) 2006 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 DS AF ! subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) ! @@ -28,11 +12,11 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) 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 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 interfaces, ONLY:WF_load,WF_free,eval_G_minus_G,TDDFT_ALDA_R_space 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,& @@ -41,6 +25,7 @@ subroutine K(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 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,& @@ -53,7 +38,8 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) 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,ALDA_cut_scheme + use TDDFT, ONLY:FXC_K_diagonal,F_xc_gspace,FXC_n_g_corr,io_BS_Fxc, & +& 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 @@ -75,6 +61,7 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) ! ! Work Space ... ! + type(tddft_wf_t), target :: tddft_wf character(schlen) :: section_title character(1) :: mode_now ! @@ -98,7 +85,6 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) complex(SP):: sqrt_f_itk,sqrt_f_itp real(SP), allocatable :: BS_max_val_CPU(:) ! - complex(SP), external ::TDDFT_ALDA_R_space complex(SP), external ::K_correlation_kernel complex(SP), external ::K_exchange_kernel_resonant,K_exchange_kernel_coupling ! @@ -202,11 +188,10 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) ! Screened interaction !====================== ! - !Check if there is RIM_W - call parser('RIM_W',l_RIM_W) + !Check if RIM_W is diagonal call parser('RIM_W_diag',RIM_W_is_diagonal) - if(l_RIM_W .and. RIM_W_ng == 0) RIM_W_ng = RIM_ng - if (l_RIM_W) call interpolate_W(X,Xw,q,'BSE') + if(l_rim_w .and. RIM_W_ng == 0) RIM_W_ng = RIM_ng + 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) @@ -268,9 +253,16 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) ! ALDA !====== if (BS_K_is_ALDA) then + ! + 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 + QP_ng_Vxc=BS_n_g_fxc if(n_spin>1) then YAMBO_ALLOC(magn,(fft_size,3)) endif @@ -282,10 +274,8 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) 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 + call TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) + ! endif ! ! DB identifier @@ -432,7 +422,7 @@ subroutine K(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,tddft_wf ) #endif ! call OPENMP_update(master_thread) @@ -580,7 +570,7 @@ subroutine K(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) H_x=H_x+TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,'RES') + if (BS_K_is_ALDA) H_x=H_x+TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,tddft_wf,'RES') ! ! Correlations if (BS_res_K_corr) H_c=K_correlation_kernel(i_block,i_p,i_pmq, & @@ -598,7 +588,7 @@ subroutine K(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) H_x=H_x+TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,'CPL') + if (BS_K_is_ALDA) 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) H_c=K_correlation_kernel(i_block,i_p,i_pmq, & @@ -679,8 +669,14 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) YAMBO_FREE(FXC_K_diagonal) ! else if (BS_K_is_ALDA) then - YAMBO_FREE(F_xc) + ! + YAMBO_FREE(tddft_wf%rhotwr1) + YAMBO_FREE(tddft_wf%rhotwr2) + YAMBO_FREE(tddft_wf%WF_symm1) + YAMBO_FREE(tddft_wf%WF_symm2) + ! YAMBO_FREE(F_xc_mat) + ! 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) diff --git a/src/bse/K_Haydock.F b/src/bse/K_Haydock.F index 598af3a835..f9520f4e87 100644 --- a/src/bse/K_Haydock.F +++ b/src/bse/K_Haydock.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM MG DS IMA -! -! 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. +! Copyright (C) 2006 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 MG DS IMA ! subroutine K_Haydock(iq,W,OBS,Xk) ! diff --git a/src/bse/K_Haydock_gather.F b/src/bse/K_Haydock_gather.F index 3a1c09eac4..2d5a297162 100644 --- a/src/bse/K_Haydock_gather.F +++ b/src/bse/K_Haydock_gather.F @@ -1,24 +1,8 @@ -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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 MG DS ! subroutine K_Haydock_gather(V,fullV,fullV_size,n_ColsFG) ! diff --git a/src/bse/K_Haydock_response.F b/src/bse/K_Haydock_response.F index d8c8b2eed1..5475a69382 100644 --- a/src/bse/K_Haydock_response.F +++ b/src/bse/K_Haydock_response.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM MG DS IMA -! -! 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. +! Copyright (C) 2020 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 MG DS IMA ! subroutine K_Haydock_response(iq,it,Cf_size,OBS,scheme,W,Af,Bf,Cf,reached_threshold,FG_factor) ! diff --git a/src/bse/K_Haydock_scatter.F b/src/bse/K_Haydock_scatter.F index ceaa5156fc..fef84a1f40 100644 --- a/src/bse/K_Haydock_scatter.F +++ b/src/bse/K_Haydock_scatter.F @@ -1,24 +1,8 @@ -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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 MG DS ! subroutine K_Haydock_scatter(V,fullV,fullV_size,n_ColsFG) ! diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index b97c603455..1ed66fd1dd 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DS AM IMA -! -! 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. +! Copyright (C) 2012 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): DS AM IMA ! subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! diff --git a/src/bse/K_IP_sort.F b/src/bse/K_IP_sort.F index 2e6d1734c9..9c72fbd310 100644 --- a/src/bse/K_IP_sort.F +++ b/src/bse/K_IP_sort.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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): DS AM ! subroutine K_IP_sort(what,I,N,El,vC) ! diff --git a/src/bse/K_Transition_check.F b/src/bse/K_Transition_check.F index 69b758d2bc..68828e57a1 100644 --- a/src/bse/K_Transition_check.F +++ b/src/bse/K_Transition_check.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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. -! -! 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 DS ! logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& & E_eh,E_eh_SOC_corr,f_eh,f_eh_RES,f_eh_PL) diff --git a/src/bse/K_Transitions_setup.F b/src/bse/K_Transitions_setup.F index eaa06b69cb..12f988c586 100644 --- a/src/bse/K_Transitions_setup.F +++ b/src/bse/K_Transitions_setup.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM DS IMA -! -! 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. +! Copyright (C) 2014 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 DS IMA ! subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) ! diff --git a/src/bse/K_WF_phases.F b/src/bse/K_WF_phases.F index 7c9d520b96..75d103ea63 100644 --- a/src/bse/K_WF_phases.F +++ b/src/bse/K_WF_phases.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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 ! subroutine K_WF_phases(Xk) ! diff --git a/src/bse/K_blocks.F b/src/bse/K_blocks.F index 6c69010b00..41a46887fd 100644 --- a/src/bse/K_blocks.F +++ b/src/bse/K_blocks.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, HM, 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. +! Copyright (C) 2014 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. -! -! 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 HM DS ! subroutine K_blocks( ) ! diff --git a/src/bse/K_components_folded_in_serial_arrays.F b/src/bse/K_components_folded_in_serial_arrays.F index 83f3dd7652..0e2ab8c321 100644 --- a/src/bse/K_components_folded_in_serial_arrays.F +++ b/src/bse/K_components_folded_in_serial_arrays.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM MG IMA -! -! 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. +! Copyright (C) 2014 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 MG IMA ! subroutine K_components_folded_in_serial_arrays(iq) ! diff --git a/src/bse/K_compress.F b/src/bse/K_compress.F index 5c3a541dda..3adf5649d1 100644 --- a/src/bse/K_compress.F +++ b/src/bse/K_compress.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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): DS ! subroutine K_compress(iq,ID_compr) ! diff --git a/src/bse/K_correlation_collisions.F b/src/bse/K_correlation_collisions.F index 93aeaa9789..4ba5c57555 100644 --- a/src/bse/K_correlation_collisions.F +++ b/src/bse/K_correlation_collisions.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, DS, HM -! -! 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) 2015 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. -! -! 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 DS HM ! subroutine K_correlation_collisions(iq,i_block,qindx_ID_frag,Xk,q) ! diff --git a/src/bse/K_correlation_kernel.F b/src/bse/K_correlation_kernel.F index f46587780c..87cb83d391 100644 --- a/src/bse/K_correlation_kernel.F +++ b/src/bse/K_correlation_kernel.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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): DS ! function K_correlation_kernel(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 4cfe5eb7f6..d2fc2de5bc 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 MG DS ! ! headers ! diff --git a/src/bse/K_diago_hermitian_residuals.F b/src/bse/K_diago_hermitian_residuals.F index 6bfc7f4613..f61fca79dc 100644 --- a/src/bse/K_diago_hermitian_residuals.F +++ b/src/bse/K_diago_hermitian_residuals.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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. -! -! 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 MG DS ! subroutine K_diago_hermitian_residuals(i_BS_mat,BS_E_real,BS_R_left,BS_R_right) ! diff --git a/src/bse/K_diago_kerr_residual.F b/src/bse/K_diago_kerr_residual.F index 86a7076f06..05a9b1a8eb 100644 --- a/src/bse/K_diago_kerr_residual.F +++ b/src/bse/K_diago_kerr_residual.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): DS ! subroutine K_diago_kerr_residual(BS_E,BS_V_right,BS_R_right_kerr) ! diff --git a/src/bse/K_diago_magnons_residual.F b/src/bse/K_diago_magnons_residual.F index 8b3ae97dcc..e0489c7ed6 100644 --- a/src/bse/K_diago_magnons_residual.F +++ b/src/bse/K_diago_magnons_residual.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): DS ! subroutine K_diago_herm_magnons_residual(i_BS_mat,BS_R_left,BS_R_right) ! diff --git a/src/bse/K_diago_non_hermitian_residuals.F b/src/bse/K_diago_non_hermitian_residuals.F index 8a3a66a1f3..53e8e1e1dd 100644 --- a/src/bse/K_diago_non_hermitian_residuals.F +++ b/src/bse/K_diago_non_hermitian_residuals.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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. -! -! 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 MG DS ! subroutine K_diago_non_hermitian_residuals(BS_E,BS_R_left,BS_R_right,BS_V_left,BS_V_right,BS_overlap) ! diff --git a/src/bse/K_diago_perturbative.F b/src/bse/K_diago_perturbative.F index ae11aed546..5cc102b60f 100644 --- a/src/bse/K_diago_perturbative.F +++ b/src/bse/K_diago_perturbative.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): DS ! subroutine K_diago_perturbative(BS_mat_eigen,BS_corrections,pert_dim,what) ! diff --git a/src/bse/K_diago_response_functions.F b/src/bse/K_diago_response_functions.F index 87e0783619..87603fee0f 100644 --- a/src/bse/K_diago_response_functions.F +++ b/src/bse/K_diago_response_functions.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DS, AM, MG -! -! 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) 2015 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. -! -! 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): 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) diff --git a/src/bse/K_diagonal.F b/src/bse/K_diagonal.F index 31dda73287..084ce2c371 100644 --- a/src/bse/K_diagonal.F +++ b/src/bse/K_diagonal.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! subroutine K_diagonal(iq,what) ! diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index cb03e159fc..2d1f57fa11 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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): DS AM ! subroutine K_dipoles(iq,Ken,Xk,Dip) ! diff --git a/src/bse/K_dot_product.F b/src/bse/K_dot_product.F index ca82820c93..da0b59882a 100644 --- a/src/bse/K_dot_product.F +++ b/src/bse/K_dot_product.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG DS IMA -! -! 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. +! Copyright (C) 2014 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): MG DS IMA ! subroutine K_dot_product(dot,V,W,i_kind) ! diff --git a/src/bse/K_driver.F b/src/bse/K_driver.F index deb021b74a..88d384bc76 100644 --- a/src/bse/K_driver.F +++ b/src/bse/K_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM IMA -! -! 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. +! Copyright (C) 2006 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 IMA ! subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) ! diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index 7eac643ea0..fc914cf04f 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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 ! subroutine K_driver_init(what,iq,Ken,Xk) ! diff --git a/src/bse/K_eps_interpolate.F b/src/bse/K_eps_interpolate.F index 2b80569ee3..e1349f6aeb 100644 --- a/src/bse/K_eps_interpolate.F +++ b/src/bse/K_eps_interpolate.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2007 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 ! subroutine K_eps_interpolate(nW,W,err) ! diff --git a/src/bse/K_exchange_collisions.F b/src/bse/K_exchange_collisions.F index acca6cda3d..3933c53ba8 100644 --- a/src/bse/K_exchange_collisions.F +++ b/src/bse/K_exchange_collisions.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! subroutine K_exchange_collisions(iq,Xk,i_T_grp) ! diff --git a/src/bse/K_exchange_kernel.F b/src/bse/K_exchange_kernel.F index 9e2f43566b..f82a047ca5 100644 --- a/src/bse/K_exchange_kernel.F +++ b/src/bse/K_exchange_kernel.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AF 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. +! Copyright (C) 2019 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): AF DS ! 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 387dbc1dca..17ba37c72f 100644 --- a/src/bse/K_inversion_Lo.F +++ b/src/bse/K_inversion_Lo.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 DS ! subroutine K_inversion_Lo(iq,W,E,k,Lo_dim,Lo_n_loop,Lo) ! diff --git a/src/bse/K_inversion_do_it_SLK.F b/src/bse/K_inversion_do_it_SLK.F index e436dda8e6..f723d476f6 100644 --- a/src/bse/K_inversion_do_it_SLK.F +++ b/src/bse/K_inversion_do_it_SLK.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine K_inversion_do_it_SLK(Lo,what) ! diff --git a/src/bse/K_inversion_do_it_full.F b/src/bse/K_inversion_do_it_full.F index c3316c8eb0..28fe70ab7a 100644 --- a/src/bse/K_inversion_do_it_full.F +++ b/src/bse/K_inversion_do_it_full.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine K_inversion_do_it_full(Lo,KERNEL,what) ! diff --git a/src/bse/K_inversion_driver.F b/src/bse/K_inversion_driver.F index a5041bb7bb..9e23e73844 100644 --- a/src/bse/K_inversion_driver.F +++ b/src/bse/K_inversion_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2007 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 DS ! subroutine K_inversion_driver(iq,W,E,k,q) ! diff --git a/src/bse/K_inversion_engine.F b/src/bse/K_inversion_engine.F index 543b8e3100..0c8afee749 100644 --- a/src/bse/K_inversion_engine.F +++ b/src/bse/K_inversion_engine.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 DS ! subroutine K_inversion_engine(what,iw_2start,iw_2do,iq,px,W,Lo,Lo_dim,Lo_n_loop,do_it_full) ! diff --git a/src/bse/K_inversion_restart.F b/src/bse/K_inversion_restart.F index 07c15f8f45..c7ee96d13f 100644 --- a/src/bse/K_inversion_restart.F +++ b/src/bse/K_inversion_restart.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! subroutine K_inversion_restart(iq,W) ! diff --git a/src/bse/K_multiply_by_V.F b/src/bse/K_multiply_by_V.F index 161a4b2ecc..ca9b7e189b 100644 --- a/src/bse/K_multiply_by_V.F +++ b/src/bse/K_multiply_by_V.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM MG DS IMA -! -! 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. +! Copyright (C) 2014 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 MG DS IMA ! subroutine K_multiply_by_V(Vi,Vo,iter_par) ! diff --git a/src/bse/K_multiply_by_V_slepc.F b/src/bse/K_multiply_by_V_slepc.F index 30c2fdf88c..53b5f8b436 100644 --- a/src/bse/K_multiply_by_V_slepc.F +++ b/src/bse/K_multiply_by_V_slepc.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): HM DS IMA -! -! 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. +! Copyright (C) 2018 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): HM DS IMA ! subroutine K_multiply_by_V_slepc(slepc_mat,vi,vo,ierr) ! diff --git a/src/bse/K_multiply_by_V_transpose.F b/src/bse/K_multiply_by_V_transpose.F index ba6557b281..dda9b26f8b 100644 --- a/src/bse/K_multiply_by_V_transpose.F +++ b/src/bse/K_multiply_by_V_transpose.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM MG DS IMA -! -! 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. +! Copyright (C) 2021 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 MG DS IMA ! subroutine K_multiply_by_V_transpose(Vi,Vo,iter_par) ! diff --git a/src/bse/K_multiply_by_V_transpose_slepc.F b/src/bse/K_multiply_by_V_transpose_slepc.F index 01caca6639..f5ca11cd29 100644 --- a/src/bse/K_multiply_by_V_transpose_slepc.F +++ b/src/bse/K_multiply_by_V_transpose_slepc.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): HM DS IMA -! -! 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. +! Copyright (C) 2018 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): HM DS IMA ! subroutine K_multiply_by_V_transpose_slepc(slepc_mat,vi,vo,ierr) ! diff --git a/src/bse/K_observables.F b/src/bse/K_observables.F index 4bbd4d824c..ea364b42fb 100644 --- a/src/bse/K_observables.F +++ b/src/bse/K_observables.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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 ! subroutine K_observables( ) ! diff --git a/src/bse/K_restart.F b/src/bse/K_restart.F index 1956db12fc..ba46867113 100644 --- a/src/bse/K_restart.F +++ b/src/bse/K_restart.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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. +! Copyright (C) 2020 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 DS AF ! subroutine K_restart(iq,X,ID_head,ID,ID_compr,l_partial_kernel_loaded) ! diff --git a/src/bse/K_screened_interaction.F b/src/bse/K_screened_interaction.F index 8655337645..9a99b82ba5 100644 --- a/src/bse/K_screened_interaction.F +++ b/src/bse/K_screened_interaction.F @@ -1,32 +1,17 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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): DS ! 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 drivers, ONLY:l_td_hf,l_tddft,l_rim_w use collision_el, ONLY:elemental_collision,elemental_collision_free use R_lattice, ONLY:bz_samp,RIM_qpg,RIM_anisotropy,RIM_W,RIM_W_d,RIM_W_is_diagonal,& & RIM_W_ng @@ -74,11 +59,14 @@ subroutine K_screened_interaction(X,Xw,q,io_X_err) ! else ! - if(.not.l_RIM_W) call section('+','Screened interaction header I/O') - if( l_RIM_W) call section('=','Screened interaction header I/O') + if(.not.l_rim_w) call section('+','Screened interaction header I/O') + if( l_rim_w) call section('=','Screened interaction header I/O') !=================================================== ! - if (X%ng isc%gamp_d nibz=q%nibz #endif ! - if(l_RIM_W) then + if(l_rim_w) then !$cuf kernel do(2) <<<*,*>>> do i_g3=1,RIM_W_ng do i_g2=1,RIM_W_ng #if defined _CUDA - RIM_vpW_d(i_g2,i_g3)= RIM_W_d(iq_W,i_g2,i_g3) + RIM_vpW_d(i_g2,i_g3)= RIM_W_d(1,iq_W,i_g2,i_g3) if(i_g2==i_g3) RIM_vpW_d(i_g2,i_g2)=RIM_vpW_d(i_g2,i_g2)+2._SP*gamp_d(i_g2,i_g2) #else - RIM_vpW(i_g2,i_g3) = RIM_W(iq_W,i_g2,i_g3) + RIM_vpW(i_g2,i_g3) = RIM_W(1,iq_W,i_g2,i_g3) if(i_g2==i_g3) RIM_vpW(i_g2,i_g2)=RIM_vpW(i_g2,i_g2)+2._SP*isc%gamp(i_g2,i_g2) #endif enddo @@ -190,7 +178,7 @@ subroutine K_screened_interaction(X,Xw,q,io_X_err) i_g2_mat=min(i_g2,X%ng) ! !RIM_W support - l_RIM_W_g=(l_RIM_W.and.i_g2<=RIM_W_ng.and.i_g3<=RIM_W_ng) + l_RIM_W_g=(l_rim_w.and.i_g2<=RIM_W_ng.and.i_g3<=RIM_W_ng) if (RIM_W_is_diagonal.and.l_RIM_W_g) l_RIM_W_g=(i_g2==i_g3) ! if (l_RIM_W_g) then diff --git a/src/bse/K_shell_matrix.F b/src/bse/K_shell_matrix.F index bd14234eaf..111f0af858 100644 --- a/src/bse/K_shell_matrix.F +++ b/src/bse/K_shell_matrix.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): HM IMA -! -! 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. +! Copyright (C) 2018 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): HM IMA ! subroutine K_shell_matrix(i_BS_mat,slepc_mat) ! diff --git a/src/bse/K_solvers.F b/src/bse/K_solvers.F index 8deafed967..6bf5cc569b 100644 --- a/src/bse/K_solvers.F +++ b/src/bse/K_solvers.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM IMA -! -! 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. +! Copyright (C) 2006 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 IMA ! subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) ! diff --git a/src/bse/K_stored_in_a_big_matrix.F b/src/bse/K_stored_in_a_big_matrix.F index 1c05947fd7..774e61ff3a 100644 --- a/src/bse/K_stored_in_a_big_matrix.F +++ b/src/bse/K_stored_in_a_big_matrix.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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 MG DS ! subroutine K_stored_in_a_big_matrix(i_BS_mat,iq,what) ! diff --git a/src/bse/K_stored_in_a_slepc_matrix.F b/src/bse/K_stored_in_a_slepc_matrix.F index f296079f2b..47564e0e4c 100644 --- a/src/bse/K_stored_in_a_slepc_matrix.F +++ b/src/bse/K_stored_in_a_slepc_matrix.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): HM 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. +! Copyright (C) 2018 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): HM DS ! subroutine K_stored_in_a_slepc_matrix(i_BS_mat,slepc_mat) ! diff --git a/src/bse/PL_diago_residual.F b/src/bse/PL_diago_residual.F index e314efd836..811ada9a96 100644 --- a/src/bse/PL_diago_residual.F +++ b/src/bse/PL_diago_residual.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! subroutine PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_overlap) ! diff --git a/src/bse/PL_via_perturbative_inversion.F b/src/bse/PL_via_perturbative_inversion.F index a7536cf7e1..5910870a45 100644 --- a/src/bse/PL_via_perturbative_inversion.F +++ b/src/bse/PL_via_perturbative_inversion.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! integer function PL_via_perturbative_inversion(n,Lo_dim,n_loop,D,C,f,Lo) ! diff --git a/src/bz_ops/NL_project.dep b/src/bz_ops/NL_project.dep new file mode 100644 index 0000000000..ac549981a4 --- /dev/null +++ b/src/bz_ops/NL_project.dep @@ -0,0 +1,2 @@ + bz_samp_indexes.o + diff --git a/src/bz_ops/bz_samp_indexes.F b/src/bz_ops/bz_samp_indexes.F index 1acd2efc1f..1210189d6b 100644 --- a/src/bz_ops/bz_samp_indexes.F +++ b/src/bz_ops/bz_samp_indexes.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine bz_samp_indexes(en,k,Xk,q) ! @@ -43,7 +27,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_nl_optics 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_wait,PP_redux_wait,PARALLEL_index,PARALLEL_global_indexes @@ -56,8 +40,9 @@ subroutine bz_samp_indexes(en,k,Xk,q) & qindx_X,qindx_B,qindx_S,qindx_C,qindx_free,& & bse_scattering,qindx_alloc,Xk_grid_is_uniform,& & k_grid,k_grid_b,q_pt,k_pt,bz_samp,q_norm,q0_def_norm,& -& q_sstar,coll_scattering,q_source,smallest_q_norm,& -& Xk_grid_new_mapping,k_GRIDS_string,X_scattering,sigma_scattering +& q_sstar,coll_scattering,q_source,smallest_q_norm,qindx_S_max_Go,& +& Xk_grid_new_mapping,X_scattering,sigma_scattering,& +& k_GRIDS_string,k_GRIDS_vector use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD_CL,OP_WR_CL,OP_APP_CL,VERIFY,REP use parser_m, ONLY:parser @@ -66,7 +51,6 @@ subroutine bz_samp_indexes(en,k,Xk,q) #if defined _ELPH use ELPH, ONLY:elph_use_q_grid #endif - use parallel_m ! #include ! @@ -91,33 +75,48 @@ subroutine bz_samp_indexes(en,k,Xk,q) ! call section('*','Transferred momenta grid and indexing') !======================================================== - ! .... which GRIDS? - X_scattering =index(k_GRIDS_string,"X")>0 - sigma_scattering=index(k_GRIDS_string,"S")>0 + ! .... defaults + X_scattering =.true. + sigma_scattering=.true. bse_scattering =l_bse .and. (BS_res_K_corr.or.BS_cpl_K_corr) coll_scattering =l_elel_scatt + ! + ! ... User defined #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" #endif ! - ! ... User defined +#if defined _NL + ! + ! In the non-linear spectroscoy I don't load qindx_X and qindx_S + ! + if(l_nl_optics) then + X_scattering =.FALSE. + sigma_scattering=.FALSE. + endif + ! +#endif + ! 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. - if (len_trim(k_GRIDS_string)==0) k_GRIDS_string="none" - call k_GRIDS_update( ) + 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 endif ! + ! ... some over-rule needed if (bse_scattering) X_scattering =.TRUE. if (coll_scattering) sigma_scattering=.TRUE. ! + ! ... update string + call k_GRIDS_update( ) + ! 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) if (io_err==0) then call k_expand(q) @@ -477,6 +476,9 @@ subroutine bz_samp_indexes(en,k,Xk,q) exit K_LOOP endif enddo K_LOOP + ! + qindx_S_max_Go=maxval(qindx_S(:,:,2)) + ! endif ! ! Grids string update @@ -536,11 +538,22 @@ subroutine k_GRIDS_update() ! ! Grids string update ! - k_GRIDS_string="X" + k_GRIDS_string="" + if (X_scattering ) k_GRIDS_string=trim(k_GRIDS_string)//" X" 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 (len_trim(k_GRIDS_string)==0) k_GRIDS_string="none" + ! + ! This is needed for I/O + ! + k_GRIDS_vector=0 + if (X_scattering ) k_GRIDS_vector(1)=1 + if (bse_scattering ) k_GRIDS_vector(2)=1 + if (coll_scattering ) k_GRIDS_vector(3)=1 + if (sigma_scattering) k_GRIDS_vector(4)=1 + ! end subroutine ! subroutine k_grid_shift(v) diff --git a/src/bz_ops/k_build_up_BZ_tables.F b/src/bz_ops/k_build_up_BZ_tables.F index c9fd40c400..17f0580973 100644 --- a/src/bz_ops/k_build_up_BZ_tables.F +++ b/src/bz_ops/k_build_up_BZ_tables.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! subroutine k_build_up_BZ_tables(k) ! diff --git a/src/bz_ops/k_expand.F b/src/bz_ops/k_expand.F index 6c5e18ed0a..663b9077ac 100644 --- a/src/bz_ops/k_expand.F +++ b/src/bz_ops/k_expand.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine k_expand(k) ! diff --git a/src/bz_ops/k_ibz2bz.F b/src/bz_ops/k_ibz2bz.F index 8aea603f02..2aac3edc04 100644 --- a/src/bz_ops/k_ibz2bz.F +++ b/src/bz_ops/k_ibz2bz.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2019 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 DS ! subroutine k_ibz2bz(k,units,FORCE_BZ) ! diff --git a/src/bz_ops/k_lattice.F b/src/bz_ops/k_lattice.F index c015c9b653..8626c20729 100644 --- a/src/bz_ops/k_lattice.F +++ b/src/bz_ops/k_lattice.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! integer function k_lattice(k,Xk,G_shell,be_verbose) ! @@ -37,7 +21,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 parser_m, ONLY:parser - use drivers, ONLY:l_RIM_W + use drivers, ONLY:l_rim_w ! #include ! @@ -88,8 +72,6 @@ integer function k_lattice(k,Xk,G_shell,be_verbose) ! N_g_vecs=ng_in_shell(G_shell) ! - call parser('RIM_W',l_RIM_W) - ! ! Andrea 31/03/2009. Bug pointed out by a user. ! ! writing this routine I assumed that a subgroup of the @@ -133,7 +115,7 @@ integer function k_lattice(k,Xk,G_shell,be_verbose) ! ! In the case of RIM-W, I need a grid which is the smallest in the rlu case ! - if(.not.l_RIM_W) then + if(.not.l_rim_w) then do i2=1,2 ! if (i2==1) then @@ -159,7 +141,7 @@ integer function k_lattice(k,Xk,G_shell,be_verbose) YAMBO_FREE(idist) ! k_grid_dim=0 - k_grid_b=0. + k_grid_b=0._SP do i1=1,N_ext_K_pts v0=extended_k_points(order(i1),:) ! @@ -207,7 +189,7 @@ integer function k_lattice(k,Xk,G_shell,be_verbose) ! i3=0 do i1=1,3 - v1(1)=0. + v1(1)=0._SP do i2=1,k_grid_dim v1(1)=v1(1)+abs(proj(b(i1,:),k_grid_b(i2,:))) enddo diff --git a/src/bz_ops/k_map_nearest_by_dir.F b/src/bz_ops/k_map_nearest_by_dir.F index afb639327e..9a467d9153 100644 --- a/src/bz_ops/k_map_nearest_by_dir.F +++ b/src/bz_ops/k_map_nearest_by_dir.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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. -! -! 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): MG CA ! subroutine k_map_nearest_by_dir(Xk,k_map) ! diff --git a/src/bz_ops/k_reduce.F b/src/bz_ops/k_reduce.F index 53f7e5b88a..88b064f7a4 100644 --- a/src/bz_ops/k_reduce.F +++ b/src/bz_ops/k_reduce.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine k_reduce(k,FORCE_BZ) ! diff --git a/src/bz_ops/k_the_nearest.F b/src/bz_ops/k_the_nearest.F index babbbaa473..9b2a6e07c9 100644 --- a/src/bz_ops/k_the_nearest.F +++ b/src/bz_ops/k_the_nearest.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! integer function k_the_nearest(k_ref,k,n_k,k_dist,ROTATE_k_ref,k_symm,i_err,border_point) ! diff --git a/src/collisions/.objects b/src/collisions/.objects index a0790d237b..297d78ed93 100644 --- a/src/collisions/.objects +++ b/src/collisions/.objects @@ -1,9 +1,5 @@ -QED_objs = -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_QED_transverse_matrix.o COLLISIONS_momentum.o #endif #if defined _SC SC_objs = COLLISIONS_compose_sc.o @@ -14,8 +10,11 @@ RT_objs = COLLISIONS_compose_rt.o #if defined _NL NL_objs = COLLISIONS_compose_nl.o #endif +#if defined _QED || defined _SC || defined _RT || defined _NL 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 SCATTERING_GW_kinematics.o \ + $(SC_objs) $(QED_objs) $(RT_objs) $(NL_objs) +#endif diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index 7abbd46c8e..f0bed0b940 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 DS ! subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) ! @@ -29,10 +13,11 @@ 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_spinor use LIVE_t, ONLY:live_timing use hamiltonian, ONLY:H_potential 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 @@ -48,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 + use interfaces, ONLY:WF_load,TDDFT_ALDA_R_space 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 @@ -70,13 +55,13 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) ! type(elemental_collision):: isc_XC,iscp_XC,isc_H,iscp_H type(yMPI_comm) :: LOCAL_yMPI_COMM + type(tddft_wf_t), target :: tddft_wf real(SP) :: Co complex(SP) :: pre_factor1,pre_factor2 ! complex(SP), allocatable :: EM1s(:,:),rhotw_tmp(:) integer :: io_err,ID_X,ID_HXC,ID_COH,TMP_VEC(ncpu) integer, external :: io_X - complex(SP), external :: TDDFT_ALDA_R_space ! call timing(trim(H_potential)//' Collisions',OPR='start') ! @@ -158,7 +143,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) 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(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)) @@ -173,7 +158,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) 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,GAMP_NG=(/N_g_vecs_X, 1 /),TITLE=trim(H_potential)) ! if (l_compute_screening) then ! @@ -186,7 +171,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) 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)) + call elemental_collision_alloc(isc_XC, NG=NG_XC,GAMP_NG=(/N_g_vecs_C,N_g_vecs_C/),TITLE=trim(H_potential)) ! else ! @@ -197,6 +182,10 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) 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 @@ -349,7 +338,11 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) endif ! if (COLLISIONS_HXC_use_TDDFT) then - YAMBO_FREE(F_xc) + YAMBO_FREE(tddft_wf%rhotwr1) + YAMBO_FREE(tddft_wf%rhotwr2) + YAMBO_FREE(tddft_wf%WF_symm1) + YAMBO_FREE(tddft_wf%WF_symm2) + YAMBO_FREE(F_xc_mat) YAMBO_FREE(magn) endif ! @@ -437,7 +430,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,'RES') + pre_factor2=pre_factor2+TDDFT_ALDA_R_space(isc_H%is,isc_H%os,iscp_H%is,iscp_H%os,tddft_wf,'RES') enddo endif ! @@ -466,7 +459,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,'CPL') + pre_factor2=pre_factor2+TDDFT_ALDA_R_space(isc_H%is,isc_H%os,iscp_H%is,iscp_H%os,tddft_wf,'CPL') enddo endif ! diff --git a/src/collisions/COLLISIONS_NEQ_GW_static.F b/src/collisions/COLLISIONS_NEQ_GW_static.F index 51e31ce411..a0fe6f2862 100644 --- a/src/collisions/COLLISIONS_NEQ_GW_static.F +++ b/src/collisions/COLLISIONS_NEQ_GW_static.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2012 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 DS ! subroutine COLLISIONS_NEQ_GW_static(X,Xk,E,k,q,Xw) ! @@ -109,7 +93,7 @@ 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(isc, NG=isc%ngrho,GAMP_NG=(/X%ng,X%ng/),TITLE="NEQ_GW") call elemental_collision_alloc(iscp,NG=isc%ngrho,TITLE="NEQ_GW") ! ! Parallel Indexes & LIVE-TIMING STEPS diff --git a/src/collisions/COLLISIONS_alloc_and_free.F b/src/collisions/COLLISIONS_alloc_and_free.F index 36e10492f4..c6a0126f64 100644 --- a/src/collisions/COLLISIONS_alloc_and_free.F +++ b/src/collisions/COLLISIONS_alloc_and_free.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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 ! subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) ! diff --git a/src/collisions/COLLISIONS_basic_operations.F b/src/collisions/COLLISIONS_basic_operations.F index cd7d6a7c19..dc0ebf3326 100644 --- a/src/collisions/COLLISIONS_basic_operations.F +++ b/src/collisions/COLLISIONS_basic_operations.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! subroutine COLLISIONS_basic_operations( what, COLL ) ! diff --git a/src/collisions/COLLISIONS_compose_nl.F b/src/collisions/COLLISIONS_compose_nl.F index 281b3d1c45..c9216a5384 100644 --- a/src/collisions/COLLISIONS_compose_nl.F +++ b/src/collisions/COLLISIONS_compose_nl.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CA 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. +! Copyright (C) 2015 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. -! -! 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): CA AM DS ! subroutine COLLISIONS_compose_nl(G_in) ! diff --git a/src/collisions/COLLISIONS_compose_rt.F b/src/collisions/COLLISIONS_compose_rt.F index 59931327aa..63f05bb381 100644 --- a/src/collisions/COLLISIONS_compose_rt.F +++ b/src/collisions/COLLISIONS_compose_rt.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CA 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. +! Copyright (C) 2015 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. -! -! 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): CA AM DS ! subroutine COLLISIONS_compose_rt(dG_in) ! diff --git a/src/collisions/COLLISIONS_compose_sc.F b/src/collisions/COLLISIONS_compose_sc.F index ad37aa191d..415a859437 100644 --- a/src/collisions/COLLISIONS_compose_sc.F +++ b/src/collisions/COLLISIONS_compose_sc.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CA 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. +! Copyright (C) 2015 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. -! -! 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): CA AM DS ! subroutine COLLISIONS_compose_sc(G_sex,G_coh) ! diff --git a/src/collisions/COLLISIONS_eval.F b/src/collisions/COLLISIONS_eval.F index 25dd892dba..939ba28555 100644 --- a/src/collisions/COLLISIONS_eval.F +++ b/src/collisions/COLLISIONS_eval.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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 ! subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) ! diff --git a/src/collisions/COLLISIONS_linearize_and_IO.F b/src/collisions/COLLISIONS_linearize_and_IO.F index dbc6397ced..6a9c51171d 100644 --- a/src/collisions/COLLISIONS_linearize_and_IO.F +++ b/src/collisions/COLLISIONS_linearize_and_IO.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CA 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. +! Copyright (C) 2013 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): CA AM ! subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL,COLL_element,COLL_ID,COMM) ! diff --git a/src/collisions/COLLISIONS_load.F b/src/collisions/COLLISIONS_load.F index d1f277b203..cfe9c4af59 100644 --- a/src/collisions/COLLISIONS_load.F +++ b/src/collisions/COLLISIONS_load.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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. +! Copyright (C) 2013 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 CA DS ! subroutine COLLISIONS_load(CHECK_EXISTENCE_ONLY) ! diff --git a/src/collisions/COLLISIONS_map_to_QP_table.F b/src/collisions/COLLISIONS_map_to_QP_table.F index ec89e06c53..8702571e14 100644 --- a/src/collisions/COLLISIONS_map_to_QP_table.F +++ b/src/collisions/COLLISIONS_map_to_QP_table.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2009 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 ! subroutine COLLISIONS_map_to_QP_table(what,COLL) ! diff --git a/src/collisions/COLLISIONS_momentum.F b/src/collisions/COLLISIONS_momentum.F index eb6d580297..1da670c7c8 100644 --- a/src/collisions/COLLISIONS_momentum.F +++ b/src/collisions/COLLISIONS_momentum.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! subroutine COLLISIONS_momentum(E,k,q) ! diff --git a/src/collisions/NL_project.dep b/src/collisions/NL_project.dep new file mode 100644 index 0000000000..f93c8bbabd --- /dev/null +++ b/src/collisions/NL_project.dep @@ -0,0 +1,14 @@ + COLLISIONS_HXC.o + COLLISIONS_NEQ_GW_static.o + COLLISIONS_alloc_and_free.o + COLLISIONS_basic_operations.o + COLLISIONS_compose_nl.o + COLLISIONS_eval.o + COLLISIONS_linearize_and_IO.o + COLLISIONS_load.o + COLLISIONS_map_to_QP_table.o + PLASMA_build_up.o + PLASMA_parallel_setup.o + PLASMA_tables_and_dimensions.o + SCATTERING_GW_kinematics.o + diff --git a/src/collisions/PLASMA_build_up.F b/src/collisions/PLASMA_build_up.F index 0560a33f08..d58bd3d8e7 100644 --- a/src/collisions/PLASMA_build_up.F +++ b/src/collisions/PLASMA_build_up.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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): DS ! subroutine PLASMA_build_up(E,k,q) ! diff --git a/src/collisions/PLASMA_parallel_setup.F b/src/collisions/PLASMA_parallel_setup.F index dffd3443f9..495b9544d5 100644 --- a/src/collisions/PLASMA_parallel_setup.F +++ b/src/collisions/PLASMA_parallel_setup.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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): DS ! subroutine PLASMA_parallel_setup(EH_gas) ! diff --git a/src/collisions/PLASMA_tables_and_dimensions.F b/src/collisions/PLASMA_tables_and_dimensions.F index 6ad3eabf78..185a6e9b21 100644 --- a/src/collisions/PLASMA_tables_and_dimensions.F +++ b/src/collisions/PLASMA_tables_and_dimensions.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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): DS AM ! integer function PLASMA_tables_and_dimensions(iqbz,E,k,q,poles,N) ! diff --git a/src/collisions/QED_project.dep b/src/collisions/QED_project.dep index 070e5d6383..ab056d861d 100644 --- a/src/collisions/QED_project.dep +++ b/src/collisions/QED_project.dep @@ -1,4 +1,15 @@ + COLLISIONS_HXC.o + COLLISIONS_NEQ_GW_static.o COLLISIONS_alloc_and_free.o + COLLISIONS_basic_operations.o COLLISIONS_eval.o + COLLISIONS_linearize_and_IO.o COLLISIONS_load.o + COLLISIONS_map_to_QP_table.o + COLLISIONS_momentum.o + PLASMA_build_up.o + PLASMA_parallel_setup.o + PLASMA_tables_and_dimensions.o + SCATTERING_GW_kinematics.o + SCATTERING_QED_transverse_matrix.o diff --git a/src/collisions/RT_project.dep b/src/collisions/RT_project.dep index d7b821d1d9..d342aab99c 100644 --- a/src/collisions/RT_project.dep +++ b/src/collisions/RT_project.dep @@ -1,3 +1,14 @@ + COLLISIONS_HXC.o + COLLISIONS_NEQ_GW_static.o + COLLISIONS_alloc_and_free.o + COLLISIONS_basic_operations.o + COLLISIONS_compose_rt.o COLLISIONS_eval.o + COLLISIONS_linearize_and_IO.o COLLISIONS_load.o + COLLISIONS_map_to_QP_table.o + PLASMA_build_up.o + PLASMA_parallel_setup.o + PLASMA_tables_and_dimensions.o + SCATTERING_GW_kinematics.o diff --git a/src/collisions/SCATTERING_GW_kinematics.F b/src/collisions/SCATTERING_GW_kinematics.F index 0b532c592f..3c145ec9c3 100644 --- a/src/collisions/SCATTERING_GW_kinematics.F +++ b/src/collisions/SCATTERING_GW_kinematics.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! subroutine SCATTERING_GW_kinematics(i_q_bz,i_m,I,k,q,TABLE,E,N,G0,Ek,Ekmq,E_diff) ! diff --git a/src/collisions/SCATTERING_QED_transverse_matrix.F b/src/collisions/SCATTERING_QED_transverse_matrix.F index f95026d769..9ea43dfc88 100644 --- a/src/collisions/SCATTERING_QED_transverse_matrix.F +++ b/src/collisions/SCATTERING_QED_transverse_matrix.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 PM ! subroutine SCATTERING_QED_transverse_matrix(i_k,i_q_bz,i_G,i_G0,k,q,T_matrix,T_vec,Photon_E) ! diff --git a/src/collisions/SC_project.dep b/src/collisions/SC_project.dep new file mode 100644 index 0000000000..7df450441c --- /dev/null +++ b/src/collisions/SC_project.dep @@ -0,0 +1,14 @@ + COLLISIONS_HXC.o + COLLISIONS_NEQ_GW_static.o + COLLISIONS_alloc_and_free.o + COLLISIONS_basic_operations.o + COLLISIONS_compose_sc.o + COLLISIONS_eval.o + COLLISIONS_linearize_and_IO.o + COLLISIONS_load.o + COLLISIONS_map_to_QP_table.o + PLASMA_build_up.o + PLASMA_parallel_setup.o + PLASMA_tables_and_dimensions.o + SCATTERING_GW_kinematics.o + diff --git a/src/common/.objects b/src/common/.objects index 9bc9fe8977..1859d47ec8 100644 --- a/src/common/.objects +++ b/src/common/.objects @@ -5,10 +5,11 @@ DEV_objects = device_memcpy.o device_memcpy_mod.o device_auxfunc.o device_auxfun device_fbuff.o device_fbuff_mod.o deviceXlib_mod.o objs = eval_G_minus_G.o G_rot_grid.o G_index.o G_index_energy_factor.o eval_Gradient.o \ FREQUENCIES_damping.o FREQUENCIES_setup.o FREQUENCIES_coarse_grid.o \ - FREQUENCIES_Green_Function.o FREQUENCIES_reset.o FREQUENCIES_set_reference_point.o FREQUENCIES_merge.o \ + FREQUENCIES_Green_Function.o FREQUENCIES_reset.o FREQUENCIES_set_reference_point.o \ + FREQUENCIES_merge.o FREQUENCIES_mpa_sampling.o \ 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 f_build_ext.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/CIntegrate.F b/src/common/CIntegrate.F index 14c092b4f8..bbded1730c 100644 --- a/src/common/CIntegrate.F +++ b/src/common/CIntegrate.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! function CIntegrate(F,W,N) ! diff --git a/src/common/Convolve.F b/src/common/Convolve.F index 37449a96b7..a1d19ba176 100644 --- a/src/common/Convolve.F +++ b/src/common/Convolve.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine Convolve(f,g,f_times_g,N,step,Eo) ! diff --git a/src/common/DOUBLE_project.dep b/src/common/DOUBLE_project.dep index f0f79adf70..9e74404e7a 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 @@ -38,5 +39,6 @@ device_memcpy_mod.o eval_G_minus_G.o eval_Gradient.o + f_build_ext.o spline_fit.o diff --git a/src/common/FREQUENCIES_Green_Function.F b/src/common/FREQUENCIES_Green_Function.F index 642e094381..5e48564334 100644 --- a/src/common/FREQUENCIES_Green_Function.F +++ b/src/common/FREQUENCIES_Green_Function.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 ! subroutine FREQUENCIES_Green_Function(iqp,W,E,Spectral_Function) ! @@ -27,7 +11,8 @@ subroutine FREQUENCIES_Green_Function(iqp,W,E,Spectral_Function) use R_lattice, ONLY:nkibz use electrons, ONLY:n_bands,spin,n_sp_pol use frequency, ONLY:w_samp - use QP_m, ONLY:QP_table,QP_G_dr,QP_G_er,QP_G_zoom_er,GF_energy_range_mode + use QP_m, ONLY:QP_table,QP_G_solver,QP_G_dr,QP_G_er,QP_G_ir,QP_G_damp,& +& QP_G_zoom_er,GF_energy_range_mode #if defined _ELPH use ELPH, ONLY:PH_W_debye,QP_PH_n_G_bands #endif @@ -53,6 +38,13 @@ subroutine FREQUENCIES_Green_Function(iqp,W,E,Spectral_Function) else if (.not.Spectral_Function) then Eo=E(QP_table(iqp,1),QP_table(iqp,3),spin(QP_table(iqp,:))) W%er=QP_G_er + W%ir=QP_G_ir + W%grid_type=QP_G_solver + if(QP_G_solver=="1l".or.QP_G_solver=="2l") then + W%grid_type="mp" + W%samp_type=QP_G_solver + W%samp_grid="ho" + endif if (trim(GF_energy_range_mode)=="centered") W%er=W%er+Eo call FREQUENCIES_setup(W) else if (Spectral_Function) then diff --git a/src/common/FREQUENCIES_coarse_grid.F b/src/common/FREQUENCIES_coarse_grid.F index e61990fa27..ff67cbde14 100644 --- a/src/common/FREQUENCIES_coarse_grid.F +++ b/src/common/FREQUENCIES_coarse_grid.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine FREQUENCIES_coarse_grid(title,bg_pt,npts,cg_percentual,in_pt,lterm) ! diff --git a/src/common/FREQUENCIES_damping.F b/src/common/FREQUENCIES_damping.F index 4017848764..64ee46b415 100644 --- a/src/common/FREQUENCIES_damping.F +++ b/src/common/FREQUENCIES_damping.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! function FREQUENCIES_damping(W,E) ! diff --git a/src/common/FREQUENCIES_merge.F b/src/common/FREQUENCIES_merge.F index a7b86e3c87..74ab206dab 100644 --- a/src/common/FREQUENCIES_merge.F +++ b/src/common/FREQUENCIES_merge.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! subroutine FREQUENCIES_merge(W1,W2,table) ! diff --git a/src/common/FREQUENCIES_mpa_sampling.F b/src/common/FREQUENCIES_mpa_sampling.F new file mode 100644 index 0000000000..3ae8ced310 --- /dev/null +++ b/src/common/FREQUENCIES_mpa_sampling.F @@ -0,0 +1,220 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2019 The Yambo Team +! +! Authors (see AUTHORS file for details): DALV AF +! +! +!--------------------------------------------------------------- +! Pair sampling of a positive unidimentional (frequency) domain +! as a function of a parameter (the scale) +! +! to be used in the MPA interpolation* +! +! *DA. Leon et al, PRB 104, 115157 (2021) +! +! Notes: +! +! 1) Homogeneous (homo) +! 2) Linear Partition Pair Sampling (lPPS) +! 3) Quadratic Partition Pair Sampling (qPPS) +! 4) Cubic Partition Pair Sampling (cPPS) +! 5) ... +! +! *The samplings do not depend on the sampled function +!--------------------------------------------------------------- + + subroutine FREQUENCIES_mpa_sampling(np, w1, w2, d, ps, gs, w) + use pars, ONLY:SP,DP,cI + implicit none + ! + integer, intent(in) :: np ! number of desired frequency pairs/poles + complex(SP), intent(in) :: w1,w2 ! segment [w1,w2] + real(SP), intent(in) :: d(2) ! shifts + character(2), intent(in) :: ps ! flavour of sampling: 1line, 2lines, ... + character(2), intent(in) :: gs ! type of grid: (ho)mo, (lP)PS, (qP)PS, (cP)PS, ... + complex(SP), intent(out) :: w(2*np) + ! + integer :: i,ex + integer(SP) :: lp,r,c,p + real(SP) :: aux + complex(SP) :: ws + real(SP), parameter :: log2=0.693147180560_SP + ! + ws = w2-w1 + select case(np) + case(1) + w = (/w1+epsilon(1._SP), w2/) + case(2) + select case(ps) + case('2l') !2lines + w = (/real(w1,SP)+d(1)*cI, real(w2,SP)+d(2)*cI, w1, w2/) + case('1l') !1line + select case(gs) + case ('ho') !homo + w = (/w1, w1+0.33_SP*ws, w1+0.66_SP*ws, w2/) + case ('lP') !lhPPS + w = (/w1, w1+0.25_SP*ws, w1+0.5_SP*ws, w2/) + case ('qP') !QPPS + w = (/w1, w1+0.0625_SP*ws, w1+0.25_SP*ws, w2/) + case ('cP') !CPPS + w = (/w1, w1+0.015625_SP*ws, w1+0.125_SP*ws, w2/) + case default + ! error + end select + case default + ! error + end select + case (3) + select case(ps) + case('2l') !2lines + select case(gs) + case ('ho') !homo + w=(/real(w1,SP)+d(1)*cI,real(w1+0.5_SP*ws)+d(2)*cI,real(w2,SP)+d(2)*cI,w1,w1+0.5_SP*ws,w2/) + case ('lP') !lPPS + w=(/real(w1,SP)+d(1)*cI,real(w1+0.5_SP*ws)+d(2)*cI,real(w2,SP)+d(2)*cI,w1,w1+0.5_SP*ws,w2/) + case ('qP') !qPPS + w=(/real(w1,SP)+d(1)*cI,real(w1+0.25_SP*ws)+d(2)*cI,real(w2,SP)+d(2)*cI,w1,w1+0.25_SP*ws,w2/) + case ('cP') !cPPS + w=(/real(w1,SP)+d(1)*cI,real(w1+0.125_SP*ws)+d(2)*cI,real(w2,SP)+d(2)*cI,w1,w1+0.125_SP*ws,w2/) + case default + ! error + end select + case('1l') !1line + select case(gs) + case ('ho') !homo + w=(/w1,w1+0.2_SP*ws,w1+0.4_SP*ws,w1+0.6_SP*ws,w1+0.8_SP*ws,w2/) + case ('lP') !lPPS + w=(/w1,w1+0.125_SP*ws,w1+0.25_SP*ws,w1+0.5_SP*ws,w1+0.75_SP*ws,w2/) + case ('qP') !qPPS + w=(/w1,w1+0.015625_SP*ws,w1+0.0625_SP*ws,w1+0.25_SP*ws,w1+0.5625_SP*ws,w2/) + case ('cP') !cPPS + w=(/w1,w1+0.00195313_SP*ws,w1+0.015625_SP*ws,w1+0.125_SP*ws,w1+0.421875_SP*ws,w2/) + case default + ! error + end select + end select + case default + select case(ps) + case('2l') !2lines + select case(gs) + case('ho') !homo + w(np+1) = w1 + w(1)=real(w1,SP)+d(1)*cI + do i=2, np + w(np+i)=w1+ws*(i-1)/(np-1) + w(i)=real(w(np+i),SP)+d(2)*cI + enddo + case('lP') !lPPS + w(np+1) = w1 + w(1)=real(w1,SP)+d(1)*cI + w(2*np) = w2 + w(np)=real(w2,SP)+d(2)*cI + lp=log(-1._SP+np)/log(2._SP) + r=mod(np-1,2**lp) + if (r>0) then + do i=2,2*r + w(np+i)=w1+ws*(i-1)/2._SP**(lp+1) + w(i)=real(w(np+i),SP)+d(2)*cI + enddo + ! + do i=2*r+1,np-1 + w(np+i)=w1+ws*(i-1-r)/2._SP**(lp) + w(i)=real(w(np+i),SP)+d(2)*cI + enddo + else + w(np+2)=w1+ws/2._SP**(lp+1) + w(2)=real(w(np+2),SP)+d(2)*cI + do i=2*r+3,np-1 + w(np+i)=w1+ws*(i-2-r)/2._SP**(lp) + w(i)=real(w(np+i),SP)+d(2)*cI + enddo + endif + ! + case default !qPPS or cPPS + ex=2 !gs='qP' + if(gs=='cP') ex=3 + ! + w(np+1) = w1 + w(1)=real(w1,SP)+d(1)*cI + w(2*np) = w2 + w(np)=real(w2,SP)+d(2)*cI + lp=log(-1._SP+np)/log(2._SP) + r=mod(np-1,2**lp) + if (r>0) then + do i=2,2*r + w(np+i)=w1+ws*( (i-1)/2._SP**(lp+1) )**ex + w(i)=real(w(np+i),SP)+d(2)*cI + enddo + ! + do i=2*r+1,np-1 + w(np+i)=w1+ws*( (i-1-r)/2._SP**(lp) )**ex + w(i)=real(w(np+i),SP)+d(2)*cI + enddo + else + w(np+2)=w1+ws/( 2._SP**(lp+1) )**ex + w(2)=real(w(np+2),SP)+d(2)*cI + do i=2*r+3,np-1 + w(np+i)=w1+ws*( (i-2-r)/2._SP**(lp) )**ex + w(i)=real(w(np+i),SP)+d(2)*cI + enddo + endif + ! + end select + case('1l') !1line + select case(gs) + case('ho') !homo + w(1) = w1 + do i=2, 2*np + w(i)=w1+ws*(i-1)/(2*np-1) + enddo + case('lP') !lPPS + w(1) = w1 + w(2*np) = w2 + lp=log(-1._SP+2._SP*np)/log(2._SP) + r=mod(2*np-1,2**lp) + if (r>0) then + do i=2,2*r + w(i)=w1+ws*(i-1)/2._SP**(lp+1) + enddo + ! + do i=2*r+1,2*np-1 + w(i)=w1+ws*(i-1-r)/2._SP**(lp) + enddo + else + w(2)=w1+ws/2._SP**(lp+1) + do i=2*r+3,2*np-1 + w(i)=w1+ws*(i-2-r)/2._SP**(lp) + enddo + endif + ! + case default !qPPS or cPPS + ex=2 !gs='qP' + if(gs=='cP') ex=3 + ! + w(1) = w1 + w(2*np) = w2 + lp=log(-1._SP+2._SP*np)/log(2._SP) + r=mod(2*np-1,2**lp) + if (r>0) then + do i=2,2*r + w(i)=w1+ws*( (i-1)/2._SP**(lp+1) )**ex + enddo + ! + do i=2*r+1,2*np-1 + w(i)=w1+ws*( (i-1-r)/2._SP**(lp) )**ex + enddo + else + w(2)=w1+ws/2._SP**(lp+1) + do i=2*r+3,2*np-1 + w(i)=w1+ws*( (i-2-r)/2._SP**(lp) )**ex + enddo + endif + ! + end select + end select + end select + ! +end subroutine FREQUENCIES_mpa_sampling + diff --git a/src/common/FREQUENCIES_reset.F b/src/common/FREQUENCIES_reset.F index 01a6d13879..742ca7ce0c 100644 --- a/src/common/FREQUENCIES_reset.F +++ b/src/common/FREQUENCIES_reset.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine FREQUENCIES_reset(Xw,what) ! diff --git a/src/common/FREQUENCIES_set_reference_point.F b/src/common/FREQUENCIES_set_reference_point.F index 2c8203b75b..4ecb4c6886 100644 --- a/src/common/FREQUENCIES_set_reference_point.F +++ b/src/common/FREQUENCIES_set_reference_point.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): DS ! subroutine FREQUENCIES_set_reference_point(omega,n_freq,iw_ref) ! diff --git a/src/common/FREQUENCIES_setup.F b/src/common/FREQUENCIES_setup.F index 106716cec7..a22dcc5786 100644 --- a/src/common/FREQUENCIES_setup.F +++ b/src/common/FREQUENCIES_setup.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 DS ! subroutine FREQUENCIES_setup(W) ! @@ -37,12 +21,12 @@ subroutine FREQUENCIES_setup(W) integer :: i1 logical :: metallic_damping real(SP) :: delta_w,w_n - complex(SP) :: w_tmp + complex(SP) :: w_tmp,w_tmp2(2) real(SP),external:: FREQUENCIES_damping ! !If %p is associated and consitent with %er/%dr return ! - if (allocated(W%p)) then + if (allocated(W%p).and.trim(W%grid_type)=="ra") then if (size(W%p)==W%n_freqs.and.& & abs( real(W%p(1))-W%er(1) )<1.E-5.and.& & abs( aimag(W%p(1))-W%dr(1) )<1.E-5.and.& @@ -51,7 +35,23 @@ subroutine FREQUENCIES_setup(W) endif ! YAMBO_FREE(W%p) + + ! + ! Build mpa-type grids + ! + if (trim(W%grid_type)=="mp") then + ! + if (mod(W%n_freqs,2)/=0) call error("[MPA] Invalid number of frequencies") + YAMBO_ALLOC(W%p,(W%n_freqs)) + ! + w_tmp2(1:2)=cmplx(W%er(1:2),W%ir(1:2),kind=SP) + call FREQUENCIES_mpa_sampling(W%n_freqs/2,w_tmp2(1),w_tmp2(2),W%dr,W%samp_type,W%samp_grid,W%p) + ! + return + endif + ! + ! Regular grids ! First the total/mem steps ! if (W%er(2)==W%er(1)) W%n_freqs=1 diff --git a/src/common/Fermi_fnc_fit.F b/src/common/Fermi_fnc_fit.F index 19c76e6f9a..43d1c70111 100644 --- a/src/common/Fermi_fnc_fit.F +++ b/src/common/Fermi_fnc_fit.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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. -! -! 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): DS ! integer function Fermi_fnc_fit(RT_occ_in,nstates,T_fit,Ef_fit,err_fit,RT_occ_fit_out,RT_E_fit_out) ! diff --git a/src/common/G_index.F b/src/common/G_index.F index 108211bc08..e603cb7a75 100644 --- a/src/common/G_index.F +++ b/src/common/G_index.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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): DS ! integer function G_index(v1,accept_fail) ! diff --git a/src/common/G_index_energy_factor.F b/src/common/G_index_energy_factor.F index b0988c35d8..d3923740d4 100644 --- a/src/common/G_index_energy_factor.F +++ b/src/common/G_index_energy_factor.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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): DS ! integer function G_index_energy_factor(ig_in,factor) ! diff --git a/src/common/G_rot_grid.F b/src/common/G_rot_grid.F index 3961f1aba3..f125168200 100644 --- a/src/common/G_rot_grid.F +++ b/src/common/G_rot_grid.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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): DS ! subroutine G_rot_grid(is,call_kind) ! diff --git a/src/common/HyperbolicSecant_FT.F b/src/common/HyperbolicSecant_FT.F index 61b8af5e22..3c10784b0c 100644 --- a/src/common/HyperbolicSecant_FT.F +++ b/src/common/HyperbolicSecant_FT.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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): DS ! real(SP) function HyperbolicSecant_FT(E_center,Gamma_HS,alpha) ! diff --git a/src/common/Kramers_Kronig.F b/src/common/Kramers_Kronig.F index f1455bcd3f..5079757370 100644 --- a/src/common/Kramers_Kronig.F +++ b/src/common/Kramers_Kronig.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine Kramers_Kronig(fi,wi,ni,fo,wo,no,y0) ! diff --git a/src/common/LEVELS_respect_degenerations.F b/src/common/LEVELS_respect_degenerations.F index fa1100971e..677b0b2c2e 100644 --- a/src/common/LEVELS_respect_degenerations.F +++ b/src/common/LEVELS_respect_degenerations.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine LEVELS_respect_degenerations(bands,E,IMPOSE) ! diff --git a/src/common/Laplace_transform.F b/src/common/Laplace_transform.F index fa451b7296..504a4407b3 100644 --- a/src/common/Laplace_transform.F +++ b/src/common/Laplace_transform.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! function Laplace_transform(F,N,dT,Eo) ! diff --git a/src/common/Lorentzian_FT.F b/src/common/Lorentzian_FT.F index 3480aee11f..a349da0e46 100644 --- a/src/common/Lorentzian_FT.F +++ b/src/common/Lorentzian_FT.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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): AMDS ! function Lorentzian_FT(W,pole,ordering) ! @@ -48,9 +32,10 @@ function Lorentzian_FT(W,pole,ordering) complex(SP) ::pole,W,Lorentzian_FT character(*) ::ordering ! - logical ::ord_t_ordered,ord_retarded_,ord_resonant_,ord_ares_tord,ord_ares_reta + logical ::ord_t_ordered,ord_true_t_or,ord_retarded_,ord_resonant_,ord_ares_tord,ord_ares_reta ! ord_t_ordered= trim(ordering)=="T" ! T-ordered + ord_true_t_or= trim(ordering)=="t" ! T-ordered with null damping !DALV: true time ordering for MPA ord_retarded_= trim(ordering)=="R" ! Retarded ord_resonant_= trim(ordering)=="r" ! Resonant part of the T-ordered/Retarded ord_ares_tord= trim(ordering)=="Ta" ! Anti-resonant part of the T-ordered @@ -59,6 +44,7 @@ function Lorentzian_FT(W,pole,ordering) ! RESONANT ANTIRESONANT ! if ( ord_t_ordered ) Lorentzian_FT=1._SP/(W-pole)-1._SP/(conjg(W)+ pole ) + if ( ord_true_t_or ) Lorentzian_FT=1._SP/(W-pole)-1._SP/( W + pole ) if ( ord_retarded_ ) Lorentzian_FT=1._SP/(W-pole)-1._SP/( W +conjg(pole)) if ( ord_resonant_ ) Lorentzian_FT=1._SP/(W-pole) if ( ord_ares_tord ) Lorentzian_FT= -1._SP/(conjg(W)+ pole ) diff --git a/src/common/OBS_rotate.F b/src/common/OBS_rotate.F index 1810478479..6c5756ba97 100644 --- a/src/common/OBS_rotate.F +++ b/src/common/OBS_rotate.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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. -! -! 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 ! subroutine OBS_rotate(R,O,N,direction) ! diff --git a/src/common/OCCUPATIONS_Extend.F b/src/common/OCCUPATIONS_Extend.F index 42745c3756..353f757c05 100644 --- a/src/common/OCCUPATIONS_Extend.F +++ b/src/common/OCCUPATIONS_Extend.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine OCCUPATIONS_Extend(Xe,E,k) ! @@ -56,7 +40,7 @@ subroutine OCCUPATIONS_Extend(Xe,E,k) E%E_Fermi=Xe%E_Fermi E%E_VBM =Xe%E_VBM E%E_CBm =Xe%E_CBm - call f_build(Xe%E_Fermi) + call f_build_ext(E,E%E_Fermi) call OCCUPATIONS_Gaps(E) ! ! If Xe and E have same metallic character then @@ -79,7 +63,7 @@ subroutine OCCUPATIONS_Extend(Xe,E,k) ! Ef_test=maxval(Xe%E_VBM(:n_sp_pol))+Ef_step do while(Ef_test 0._SP) E%f(i1,i2,is)=spin_occ*Fermi_fnc(E%E(i1,i2,is)-Ef,T_elecs) - enddo - enddo - enddo - end subroutine - ! end subroutine diff --git a/src/common/OCCUPATIONS_Extend_Double_Grid.F b/src/common/OCCUPATIONS_Extend_Double_Grid.F index 292fab12aa..9375258111 100644 --- a/src/common/OCCUPATIONS_Extend_Double_Grid.F +++ b/src/common/OCCUPATIONS_Extend_Double_Grid.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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 DS ! subroutine OCCUPATIONS_Extend_Double_Grid(what,E,k) ! diff --git a/src/common/OCCUPATIONS_Fermi.F b/src/common/OCCUPATIONS_Fermi.F index 98668f65b4..7384d21c93 100644 --- a/src/common/OCCUPATIONS_Fermi.F +++ b/src/common/OCCUPATIONS_Fermi.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) ! diff --git a/src/common/OCCUPATIONS_Gaps.F b/src/common/OCCUPATIONS_Gaps.F index 21659ecb03..c050d4c6cf 100644 --- a/src/common/OCCUPATIONS_Gaps.F +++ b/src/common/OCCUPATIONS_Gaps.F @@ -1,25 +1,9 @@ -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2012 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 ! subroutine OCCUPATIONS_Gaps(E,E_g_dir,E_g_ind,Nbf,Nbm,I_dir,E_k_dir,E_k_ind) ! diff --git a/src/common/QP_state_group.F b/src/common/QP_state_group.F index 4077667940..868a882bd1 100644 --- a/src/common/QP_state_group.F +++ b/src/common/QP_state_group.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2019 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 ! subroutine QP_state_group(N,states) ! diff --git a/src/common/QP_state_print.F b/src/common/QP_state_print.F index 12c1273c18..db78026497 100644 --- a/src/common/QP_state_print.F +++ b/src/common/QP_state_print.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine QP_state_print(qp) ! diff --git a/src/common/QPartilize.F b/src/common/QPartilize.F index 80515f9e8d..a9df89eeac 100644 --- a/src/common/QPartilize.F +++ b/src/common/QPartilize.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2010 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 ! subroutine QPartilize(N,G,W,E,Z,dG_step) ! diff --git a/src/common/RIntegrate.F b/src/common/RIntegrate.F index e3a624215a..4f12bf3378 100644 --- a/src/common/RIntegrate.F +++ b/src/common/RIntegrate.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! function RIntegrate(F,W,N) ! diff --git a/src/common/RT_project.dep b/src/common/RT_project.dep index 302edded4d..b931466fa9 100644 --- a/src/common/RT_project.dep +++ b/src/common/RT_project.dep @@ -1,2 +1,4 @@ + Fermi_fnc_fit.o + HyperbolicSecant_FT.o OCCUPATIONS_Gaps.o diff --git a/src/common/crystal_lattice.F b/src/common/crystal_lattice.F index d85cf24d2a..071a68ed60 100644 --- a/src/common/crystal_lattice.F +++ b/src/common/crystal_lattice.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2009 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 ! subroutine crystal_lattice() ! diff --git a/src/common/eval_G_minus_G.F b/src/common/eval_G_minus_G.F index f596ae1f9d..3c9fd6bb84 100644 --- a/src/common/eval_G_minus_G.F +++ b/src/common/eval_G_minus_G.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM,AF,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. +! Copyright (C) 2006 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): AMAFDS ! integer function eval_G_minus_G(iG,iGo,COMM) ! @@ -31,13 +15,10 @@ integer function eval_G_minus_G(iG,iGo,COMM) ! in such a way that G_m_G(iG,j) exists for all j ! use pars, ONLY:SP - use vec_operate, ONLY:iku_v_norm + use vec_operate, ONLY:iku_v_norm, c2a 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 -#ifdef _CUDA - use R_lattice, ONLY:G_m_G_d -#endif + use R_lattice, ONLY:G_m_G,G_m_G_d,g_vec,ng_in_shell,n_g_shells,E_of_shell use timing_m, ONLY:timing #include ! @@ -48,9 +29,11 @@ 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) real(SP):: E_iG, E_iGo, E_max - real(SP):: v1(3) - real(SP), allocatable :: E_G_m_G(:,:) + real(SP):: v1(3),v2(3) + real(SP), allocatable :: E_G_m_G(:,:),imap(:,:,:),g_vec_rlu(:,:) + integer, allocatable :: ig_vec_rlu(:,:) type(PP_indexes) :: PAR_IND_G ! integer, external :: G_index @@ -156,14 +139,67 @@ integer function eval_G_minus_G(iG,iGo,COMM) ! iG_= ng_in_shell(iG_shell) eval_G_minus_G=iG_ - if (iGo==0) iGo_=iG_ + if (iGo==0) iGo_=iG_ ! ! Fill the actual G_m_G matrix ! YAMBO_ALLOC(G_m_G,(iG_,iGo_)) G_m_G=0 ! - !$omp parallel do default(shared), private(i2,i1,v1), schedule(dynamic) +! * convert to g_vec to integer coords +! relative/crystal coords +! * alloc alternative g_vec array +! * use internal conversion routines, if fast enough +! +! g_vec looks to be iku, we want to have rlu +! need in principle to call c2a(v_in,v_out,mode="ki2a") +! but a better implementation is given in fft_setup. +! +! it would probably be better to code a dedicated +! iku2rlu, accepting multiple vectors, or to +! extend c2a to acccept multiple vectors at the same time +! +! * define a map like ig=imap(i,j,k) +! ig: index of G-vect in the g_vec list, +! i,j,k integer components +! +! imap(:,:,:)=0 +! do ig = 1, Ng +! imap(g_vec_i(1,ig),g_vec_i(2,ig),g_vec_i(3,ig)) = ig +! enddo +! +! * v1 becomes an integert triplet +! * G_m_G(i1,i2) = imap(v1(1),v1(2),v1(3)) +! +! * beware index ordering g_vec(ng,3)... +! surely does not help +! + ! + v2(:)=g_vec(1,:)-g_vec(1,:) + G_m_G(1,1)=G_index(v2,.false.) + G_m_G(1,1)=0 + ! + YAMBO_ALLOC(g_vec_rlu, (size(g_vec,1),3)) + YAMBO_ALLOC(ig_vec_rlu, (size(g_vec,1),3)) + ! + call c2a(nvec=size(g_vec,1),v_in=g_vec,v_out=g_vec_rlu,mode="ki2a") + ig_vec_rlu=NINT(g_vec_rlu) + ! + ngx1 = maxval(ig_vec_rlu(:,1)) + ngx2 = maxval(ig_vec_rlu(:,2)) + ngx3 = maxval(ig_vec_rlu(:,3)) + ! + YAMBO_ALLOC(imap, (-ngx1:ngx1, -ngx2:ngx2, -ngx3:ngx3 )) + ! + imap=0 + !$omp parallel do default(shared), private(i1) + do i1 = 1, size(g_vec,1) + imap(ig_vec_rlu(i1,1),ig_vec_rlu(i1,2),ig_vec_rlu(i1,3)) = i1 + enddo + ! + !$omp end parallel do + ! + !$omp parallel do default(shared), private(i2,i1,iv1_rlu), schedule(dynamic) do i2=1,iGo_ ! if(present(COMM)) then @@ -172,22 +208,25 @@ integer function eval_G_minus_G(iG,iGo,COMM) endif ! do i1=1,iG_ - ! - v1(:)=g_vec(i1,:)-g_vec(i2,:) - G_m_G(i1,i2)=G_index(v1,.false.) - ! + 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 enddo !$omp end parallel do - ! + ! if (present(COMM)) call PP_redux_wait(G_m_G,COMM=COMM%COMM) + if (any(G_m_G(:,:)==0)) call error("[G-vec] unexpected invalid G_index in G_m_G") + ! + YAMBO_FREE(g_vec_rlu) + YAMBO_FREE(ig_vec_rlu) + YAMBO_FREE(imap) ! call PP_indexes_reset(PAR_IND_G) YAMBO_FREE(E_G_m_G) ! #ifdef _CUDA YAMBO_FREE(G_m_G_d) - allocate(G_m_G_d,source=G_m_G) + YAMBO_ALLOC_SOURCE(G_m_G_d,G_m_G) #endif ! call timing("eval_G_minus_G",opr="stop") diff --git a/src/common/eval_Gradient.F b/src/common/eval_Gradient.F index 04fce3accc..4f3c31b41d 100644 --- a/src/common/eval_Gradient.F +++ b/src/common/eval_Gradient.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM MG AF -! -! 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) 2012 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. -! -! 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 MG AF ! subroutine eval_Gradient(f,f_gradient,spinor_size,f_type) ! diff --git a/src/common/f_build_ext.F b/src/common/f_build_ext.F new file mode 100644 index 0000000000..3f900608f4 --- /dev/null +++ b/src/common/f_build_ext.F @@ -0,0 +1,36 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2006 The Yambo Team +! +! Authors (see AUTHORS file for details): AM +! +subroutine f_build_ext(E,Ef) + ! + use pars, ONLY:SP + use units, ONLY:HA2EV + use electrons, ONLY:levels,spin_occ,n_sp_pol + use D_lattice, ONLY:T_elecs,T_holes + use functions, ONLY:Fermi_fnc + ! + implicit none + ! + real(SP), intent(in) :: Ef + type(levels), intent(inout) :: E + ! + ! Work Space + ! + integer :: i1,i2,is + ! + !$omp parallel do default(shared), private(i1,i2,is), collapse(3) + do i1=1,E%nb + do i2=1,E%nk + do is=1,n_sp_pol + if((E%E(i1,i2,is)-Ef)<=0._SP) E%f(i1,i2,is)=spin_occ*Fermi_fnc(E%E(i1,i2,is)-Ef,T_holes) + if((E%E(i1,i2,is)-Ef)> 0._SP) E%f(i1,i2,is)=spin_occ*Fermi_fnc(E%E(i1,i2,is)-Ef,T_elecs) + enddo + enddo + enddo + !$omp end parallel do + ! +end subroutine diff --git a/src/common/pgipar1XQrolt b/src/common/pgipar1XQrolt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/common/pgipar2Yy1LOK b/src/common/pgipar2Yy1LOK new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/common/spline_fit.F b/src/common/spline_fit.F index 12e73760ab..142789a64f 100644 --- a/src/common/spline_fit.F +++ b/src/common/spline_fit.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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): DS ! subroutine spline_fit(Ni,No,Xi,Yi,Xo,Yo) ! diff --git a/src/communicate/DESC_compare.F b/src/communicate/DESC_compare.F index cb5bf47972..f8e19c3ab7 100644 --- a/src/communicate/DESC_compare.F +++ b/src/communicate/DESC_compare.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! 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 ! subroutine DESC_compare(D1,D2,i_err,exclude,only) ! diff --git a/src/communicate/DESC_write.F b/src/communicate/DESC_write.F index 5efbae9962..82c3a7c847 100644 --- a/src/communicate/DESC_write.F +++ b/src/communicate/DESC_write.F @@ -1,27 +1,11 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 DS ! -! 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 DESC_write(dest,prefix,desc,range,skip_patt) +subroutine DESC_write(dest,prefix,desc,d_range,skip_patt) ! use pars, ONLY:SP,msg_len use com, ONLY:msg,com_compose_msg @@ -32,7 +16,7 @@ subroutine DESC_write(dest,prefix,desc,range,skip_patt) character(*), intent(in) :: dest character(*), intent(in) :: prefix type(IO_desc), intent(in) :: desc - integer, optional, intent(in) :: range(2) + integer, optional, intent(in) :: d_range(2) character(*), optional, intent(in) :: skip_patt ! ! Work Space @@ -49,8 +33,8 @@ subroutine DESC_write(dest,prefix,desc,range,skip_patt) if (index(dest,"o ")>0) i_space=1 ! range_=(/1,desc%n/) - if (present(range)) then - range_=range + if (present(d_range)) then + range_=d_range endif ! var_len=msg_len-i_space-len(prefix)-1 diff --git a/src/communicate/REPORT_Energies.F b/src/communicate/REPORT_Energies.F index 64c8af1f8f..015378a284 100644 --- a/src/communicate/REPORT_Energies.F +++ b/src/communicate/REPORT_Energies.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2008 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. -! -! 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 ! subroutine REPORT_Energies(E,k,Xk,n_bands_,k_range,what,l_kpoints,l_what) ! diff --git a/src/communicate/REPORT_Occupations.F b/src/communicate/REPORT_Occupations.F index 8b4b368ca1..dd3d8a7cc6 100644 --- a/src/communicate/REPORT_Occupations.F +++ b/src/communicate/REPORT_Occupations.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine REPORT_Occupations(what,E) ! diff --git a/src/communicate/acknowledge_yambo.F b/src/communicate/acknowledge_yambo.F index 79fae8a4e3..6705103a08 100644 --- a/src/communicate/acknowledge_yambo.F +++ b/src/communicate/acknowledge_yambo.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2009 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 ! subroutine acknowledge_yambo() ! @@ -30,7 +14,11 @@ subroutine acknowledge_yambo() call msg('r','|') call msg('r','| The users of YAMBO have little formal obligations with respect to') call msg('r','| the YAMBO group (those specified in the GNU General Public') - call msg('r','| License, http://www.gnu.org/copyleft/gpl.txt). However, it is') +! License-Identifier: GPL +! +! Copyright (C) 2009 The Yambo Team +! +! Authors (see AUTHORS file for details): AM call msg('r','| common practice in the scientific literature, to acknowledge the') call msg('r','| efforts of people that have made the research possible. In this ') call msg('r','| spirit, please find below the reference we kindly ask you to use ') diff --git a/src/communicate/com_compose_msg.F b/src/communicate/com_compose_msg.F index 1b5a3324ae..2f51fe4f70 100644 --- a/src/communicate/com_compose_msg.F +++ b/src/communicate/com_compose_msg.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! function com_compose_msg(pre,body,post) ! diff --git a/src/communicate/com_utilities_functions.F b/src/communicate/com_utilities_functions.F index 4555d7ddea..40d8e8129f 100644 --- a/src/communicate/com_utilities_functions.F +++ b/src/communicate/com_utilities_functions.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2019 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. -! -! 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 DS ! logical function OF_exists(name) ! diff --git a/src/communicate/com_utilities_netcdf.F b/src/communicate/com_utilities_netcdf.F index 291be85e67..2f6e502567 100644 --- a/src/communicate/com_utilities_netcdf.F +++ b/src/communicate/com_utilities_netcdf.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2019 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. -! -! 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 DS ! subroutine of_netcdf_shadow_real(i1,mesg,val,nval) ! diff --git a/src/communicate/com_utilities_subroutines.F b/src/communicate/com_utilities_subroutines.F index b32d75336f..81b460b19f 100644 --- a/src/communicate/com_utilities_subroutines.F +++ b/src/communicate/com_utilities_subroutines.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2019 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. -! -! 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 DS ! subroutine of_open_close(of_name_extension,mode) ! diff --git a/src/communicate/msg_characters_vector_int.F b/src/communicate/msg_characters_vector_int.F index 074778ab60..a7979ce6d4 100644 --- a/src/communicate/msg_characters_vector_int.F +++ b/src/communicate/msg_characters_vector_int.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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 DS ! subroutine msg_characters_vector_int(how,mesg,val,after_msg,USE_TABS,INDENT,MSG_string) ! diff --git a/src/communicate/msg_integers_vector_int.F b/src/communicate/msg_integers_vector_int.F index 067bedf898..e93afe4330 100644 --- a/src/communicate/msg_integers_vector_int.F +++ b/src/communicate/msg_integers_vector_int.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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 DS ! subroutine msg_integers_vector_int(how,mesg,val,after_msg,USE_TABS,INDENT,MSG_string) ! diff --git a/src/communicate/msg_manager.F b/src/communicate/msg_manager.F index 6b0460f3e4..739e55619a 100644 --- a/src/communicate/msg_manager.F +++ b/src/communicate/msg_manager.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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 DS ! subroutine msg_manager(how,OUT_msg,REP_msg,LOG_msg,STD_msg,NEW_lines) ! diff --git a/src/communicate/msg_reals_vector_int.F b/src/communicate/msg_reals_vector_int.F index beeea75bb5..0b83b5be53 100644 --- a/src/communicate/msg_reals_vector_int.F +++ b/src/communicate/msg_reals_vector_int.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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 DS ! subroutine msg_reals_vector_int(how,mesg,val,after_msg,USE_TABS,INDENT,EXT_FORMAT,MSG_string) ! diff --git a/src/communicate/section.F b/src/communicate/section.F index 0396ea4b6c..35fbd8ac1b 100644 --- a/src/communicate/section.F +++ b/src/communicate/section.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine section(mode,name) ! diff --git a/src/coulomb/bessel_F2.F b/src/coulomb/bessel_F2.F index 33c9071f67..577a1d48f1 100644 --- a/src/coulomb/bessel_F2.F +++ b/src/coulomb/bessel_F2.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DV -! -! 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) 2006 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. -! -! 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): DV ! function bessel_F2(z) use pars, ONLY:SP,rZERO diff --git a/src/coulomb/bessel_F3.F b/src/coulomb/bessel_F3.F index 50a27dd063..5840937b03 100644 --- a/src/coulomb/bessel_F3.F +++ b/src/coulomb/bessel_F3.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DV -! -! 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) 2006 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. -! -! 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): DV ! function bessel_F3(z) use pars, ONLY:SP diff --git a/src/coulomb/bessel_F4.F b/src/coulomb/bessel_F4.F index 355a859d3b..9e74193475 100644 --- a/src/coulomb/bessel_F4.F +++ b/src/coulomb/bessel_F4.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DV -! -! 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) 2006 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. -! -! 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): DV ! function bessel_F4(z) use pars, ONLY:SP diff --git a/src/coulomb/bessel_F5.F b/src/coulomb/bessel_F5.F index def00d1179..dae1007ee6 100644 --- a/src/coulomb/bessel_F5.F +++ b/src/coulomb/bessel_F5.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DV -! -! 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) 2006 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. -! -! 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): DV ! function bessel_F5(z) use pars, ONLY:SP diff --git a/src/coulomb/bessel_F6.F b/src/coulomb/bessel_F6.F index d7ba6fb662..867f52a29a 100644 --- a/src/coulomb/bessel_F6.F +++ b/src/coulomb/bessel_F6.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DV -! -! 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) 2006 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. -! -! 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): DV ! function bessel_F6(x,y) use pars, ONLY:SP diff --git a/src/coulomb/bessel_J0.F b/src/coulomb/bessel_J0.F index 7e26971fb5..0690df1540 100644 --- a/src/coulomb/bessel_J0.F +++ b/src/coulomb/bessel_J0.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DV -! -! 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. +! Copyright (C) 2006 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): DV ! function bessel_J0(s) use pars, ONLY:SP diff --git a/src/coulomb/col_driver.F b/src/coulomb/col_driver.F index 4cc08d8cc0..15b1be8847 100644 --- a/src/coulomb/col_driver.F +++ b/src/coulomb/col_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! ! DESCRIPTION : ! @@ -55,7 +39,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 +& cut_geometry,cut_is_slab,idir,q0_def_norm use wave_func, ONLY:wf_ng use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD_CL,OP_WR_CL,REP,VERIFY @@ -179,20 +163,17 @@ subroutine col_driver(bare_NG,q) ! CUTOFF ! if (.not.l_col_cut) then + ! call cutoff_presets() + if (allocated(bare_qpg) .and. size(bare_qpg)>0) bare_qpg(1,1)=q0_def_norm ! - if (have_cuda) then - YAMBO_FREE(bare_qpg_d) - if (size(bare_qpg)>0) then - YAMBO_ALLOC_SOURCE(bare_qpg_d,bare_qpg) - endif - endif + else + ! + call cutoff_driver(q) + q_norm(1)=q0_def_norm ! - return endif ! - call cutoff_driver(q) - ! ! copy again, ! bare_qpg is modified by cutff_driver ! diff --git a/src/coulomb/cutoff_box.F b/src/coulomb/cutoff_box.F index 5a9d04eea2..5ca36d1b88 100644 --- a/src/coulomb/cutoff_box.F +++ b/src/coulomb/cutoff_box.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine cutoff_box(q,is_cut) ! diff --git a/src/coulomb/cutoff_cylinder.F b/src/coulomb/cutoff_cylinder.F index 73b255b8a2..039c9456ab 100644 --- a/src/coulomb/cutoff_cylinder.F +++ b/src/coulomb/cutoff_cylinder.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DV -! -! 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. +! Copyright (C) 2006 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): DV ! subroutine cutoff_cylinder(q,is_cut) ! diff --git a/src/coulomb/cutoff_driver.F b/src/coulomb/cutoff_driver.F index ded80bdd4d..3c7cd0e2e0 100644 --- a/src/coulomb/cutoff_driver.F +++ b/src/coulomb/cutoff_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, DV -! -! 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) 2006 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. -! -! 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 DV ! subroutine cutoff_driver(q) ! diff --git a/src/coulomb/cutoff_slab.F b/src/coulomb/cutoff_slab.F index 26caf0093f..84adb1dce9 100644 --- a/src/coulomb/cutoff_slab.F +++ b/src/coulomb/cutoff_slab.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM,DV -! -! 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) 2016 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. -! -! 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): AMDV ! subroutine cutoff_slab(q) ! diff --git a/src/coulomb/cutoff_sphere.F b/src/coulomb/cutoff_sphere.F index 557b1cba66..bdf930259d 100644 --- a/src/coulomb/cutoff_sphere.F +++ b/src/coulomb/cutoff_sphere.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine cutoff_sphere() ! diff --git a/src/coulomb/cutoff_test.F b/src/coulomb/cutoff_test.F index 7a01946bab..e1e3f9dd16 100644 --- a/src/coulomb/cutoff_test.F +++ b/src/coulomb/cutoff_test.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM,DV -! -! 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) 2006 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. -! -! 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): AMDV ! subroutine cutoff_test(cut_is_sphere,cut_is_box,cut_is_cyl,cut_is_ws,cut_is_slab,is_cut,q) ! diff --git a/src/coulomb/cutoff_ws.F b/src/coulomb/cutoff_ws.F index 8c89015612..d4b862cdbc 100644 --- a/src/coulomb/cutoff_ws.F +++ b/src/coulomb/cutoff_ws.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DV,AF -! -! 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) 2016 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. -! -! 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): DVAF ! subroutine cutoff_ws(q) ! diff --git a/src/coulomb/rim.F b/src/coulomb/rim.F index 06d7c7c9d3..5616b52a2e 100644 --- a/src/coulomb/rim.F +++ b/src/coulomb/rim.F @@ -1,27 +1,11 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! -subroutine rim(mode) +subroutine rim(mode,Xw) ! use pars, ONLY:SP,pi,DP use com, ONLY:msg @@ -36,6 +20,7 @@ subroutine rim(mode) & RIM_id_epsm1_reference,RIM_anisotropy,RIM_W,& & cut_is_slab,idir use timing_m, ONLY:timing + use frequency, ONLY:w_samp ! #include ! @@ -43,9 +28,10 @@ subroutine rim(mode) ! ! Work Space ! - type(PP_indexes)::px - integer :: iq - real(SP) :: em1_anis(3),G_radii,G_circ + type(PP_indexes) ::px + type(w_samp),optional :: Xw + integer :: iq + real(SP) :: em1_anis(3),G_radii,G_circ ! ! Random generator ! @@ -178,7 +164,7 @@ subroutine rim(mode) G_circ=0._SP N_out_G=0 else if (mode == "c") then - YAMBO_ALLOC(RIM_W,(nqibz,RIM_W_ng,RIM_W_ng)) + YAMBO_ALLOC(RIM_W,(Xw%n_freqs,nqibz,RIM_W_ng,RIM_W_ng)) RIM_W=0._SP end if ! @@ -191,7 +177,7 @@ subroutine rim(mode) if (mode == "x") then call rim_integrate_v(iq,qr,em1_anis,N_out,N_out_G,G_radii,G_circ) else - call rim_integrate_w(iq,qr,N_out,em1_anis) + call rim_integrate_w(iq,qr,N_out,em1_anis,Xw) endif call live_timing(steps=1) ! diff --git a/src/coulomb/rim_integrate_v.F b/src/coulomb/rim_integrate_v.F index a20c8ab5ed..019022c0b9 100644 --- a/src/coulomb/rim_integrate_v.F +++ b/src/coulomb/rim_integrate_v.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! 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 ! subroutine rim_integrate_v(iq,qr,em1_anis,N_out,N_out_G,G_radii,G_circ) ! diff --git a/src/coulomb/rim_integrate_w.F b/src/coulomb/rim_integrate_w.F index a147acf0db..5f0cfcb7c5 100644 --- a/src/coulomb/rim_integrate_w.F +++ b/src/coulomb/rim_integrate_w.F @@ -1,45 +1,32 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! -subroutine rim_integrate_w(iq,qr,N_out,em1_anis) +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_for_graph,& +& RIM_W_ng,q_pt,b,RIM_W_is_diagonal,& & RIM_W,f_coeff,cut_is_slab,idir,RIM_id_epsm1_reference use D_lattice, ONLY:alat,a + use frequency, ONLY:w_samp ! implicit none integer :: iq,N_out real(SP) :: qr(3,RIM_n_rand_pts),em1_anis(3) + type(w_samp) :: Xw ! ! Work Space ! - integer :: i1,i1min,i2,i2max,i3 - real(DP) :: func,vslab(RIM_n_rand_pts,RIM_W_ng) - real(DP) :: r1,rfac,RIM_acc,RIM_acc_anis - real(SP) :: slab_vz1,slab_vplane1,lcut,pre_factor,anis_fact,vslab2 + integer :: i1,i1min,i2,i2max,i3,iw + real(DP) :: vslab(RIM_n_rand_pts,RIM_W_ng) + real(DP) :: r1,rfac + complex(DP):: RIM_acc,RIM_acc_anis,func + real(SP) :: slab_vz1,slab_vplane1,lcut,pre_factor,anis_fact,vslab2 ! rfac=8._SP*k_grid_uc_vol/real(N_out)/(2._SP*pi)**4 ! @@ -71,25 +58,27 @@ subroutine rim_integrate_w(iq,qr,N_out,em1_anis) ! q /= 0 all terms ! !$omp parallel do default(shared), private(i1,i2,i3,func,RIM_acc) - do i1=i1min,RIM_W_ng - i2max=RIM_W_ng - if (RIM_W_is_diagonal) i2max=i1 - do i2=i1,i2max - ! - RIM_acc=0._DP - ! - do i3=1,RIM_n_rand_pts + do iw=1,Xw%n_freqs + do i1=i1min,RIM_W_ng + i2max=RIM_W_ng + if (RIM_W_is_diagonal) i2max=i1 + do i2=i1,i2max + ! + RIM_acc=0._DP + ! + do i3=1,RIM_n_rand_pts + ! + func = f_coeff(1,i1,i2,iq,iw)+qr(1,i3)*(f_coeff(2,i1,i2,iq,iw)+qr(1,i3)*f_coeff(4,i1,i2,iq,iw))& +& +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 + RIM_acc = RIM_acc + rfac*vslab(i3,i1)**2*func*vslab(i3,i2)**2/(1._DP-vslab(i3,i1)*func*vslab(i3,i2)) + enddo + ! + RIM_W(iw,iq,i1,i2)=RIM_acc + RIM_W(iw,iq,i2,i1)=RIM_W(iw,iq,i1,i2) ! - func = f_coeff(1,i1,i2,iq,1)+qr(1,i3)*(f_coeff(2,i1,i2,iq,1)+qr(1,i3)*f_coeff(4,i1,i2,iq,1))& -& +qr(2,i3)*(f_coeff(3,i1,i2,iq,1)+qr(2,i3)*f_coeff(6,i1,i2,iq,1)& -& +2_SP*qr(1,i3)*f_coeff(5,i1,i2,iq,1)) - ! Accumulate W - RIM_acc = RIM_acc + rfac*vslab(i3,i1)**2*func*vslab(i3,i2)**2/(1-vslab(i3,i1)*func*vslab(i3,i2)) enddo - ! - RIM_W(iq,i1,i2)=RIM_acc - RIM_W(iq,i2,i1)=RIM_W(iq,i1,i2) - ! enddo enddo !$omp end parallel do @@ -97,40 +86,9 @@ subroutine rim_integrate_w(iq,qr,N_out,em1_anis) ! ! head q == 0 ! - RIM_acc=0._DP - RIM_acc_anis=0._DP - ! - !If the system is a metal, the head is obtained - !with the q\=0 formula - if (RIM_W_for_graph) then - ! - do i1=1,RIM_n_rand_pts - slab_vplane1=sqrt((qr(idir(2),i1)*2.*pi/alat(idir(2)))**2+& -& (qr(idir(3),i1)*2.*pi/alat(idir(3)))**2) - !kxy - r1=iku_v_norm(qr(:,i1)) - if (slab_vplane1 < 1.e-5) then - vslab(i1,1) = sqrt(4._DP*pi*(1.-exp(-q0_def_norm*lcut))/q0_def_norm**2) - RIM_acc = RIM_acc + rfac*f_coeff(1,1,1,1,1) - cycle - end if - ! - !Evaluate v_slab - vslab2 = 4._DP*pi*(1.-exp(-slab_vplane1*lcut))/r1**2 - ! - !Evaluate func - ! - func = f_coeff(1,1,1,1,1)+qr(1,i1)*(f_coeff(2,1,1,1,1)+qr(1,i1)*f_coeff(4,1,1,1,1))& -& +qr(2,i1)*(f_coeff(3,1,1,1,1)+qr(2,i1)*f_coeff(6,1,1,1,1)& -& +2_SP*qr(1,i1)*f_coeff(5,1,1,1,1)) - ! - RIM_acc = RIM_acc + rfac*vslab2*func*vslab2/(1._DP-vslab2*func) - ! - !Store the square root of vslab - vslab(i1,1) = sqrt(vslab2) - ! - end do - else + do iw=1,Xw%n_freqs + RIM_acc=0._DP + RIM_acc_anis=0._DP ! do i1=1,RIM_n_rand_pts ! @@ -141,9 +99,9 @@ subroutine rim_integrate_w(iq,qr,N_out,em1_anis) !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) - RIM_acc = RIM_acc + rfac*f_coeff(1,1,1,1,1)*(4*pi*lcut)**2 - RIM_acc_anis = RIM_acc_anis + rfac*f_coeff(1,1,1,1,1)*(4*pi*lcut)**2 & -& *0.5_SP*(em1_anis(idir(2))+em1_anis(idir(3))) + 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))) cycle end if ! @@ -151,8 +109,8 @@ subroutine rim_integrate_w(iq,qr,N_out,em1_anis) vslab2=4._DP*pi*(1.-exp(-slab_vplane1*lcut)) ! !Evaluate interpolation function - func = f_coeff(1,1,1,1,1)*exp(-sqrt((f_coeff(2,1,1,1,1)*(qr(2,i1)+a(2,1)/a(1,1)*qr(1,i1)))**2+& -& (f_coeff(3,1,1,1,1)*(qr(1,i1)+a(2,1)/a(1,1)*qr(2,i1)))**2)) + 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+& +& (f_coeff(3,1,1,1,iw)*(qr(1,i1)+a(2,1)/a(1,1)*qr(2,i1)))**2)) ! !Evaluate W RIM_acc = RIM_acc + rfac*vslab2*func*vslab2/(r1**2*(1-vslab2*func)) @@ -165,32 +123,34 @@ subroutine rim_integrate_w(iq,qr,N_out,em1_anis) vslab(i1,1) = sqrt(vslab2)/r1 ! enddo - end if - ! - if (RIM_id_epsm1_reference == 0) then - RIM_W(1,1,1)=RIM_acc - else - RIM_W(1,1,1)=RIM_acc_anis - end if + ! + if (RIM_id_epsm1_reference == 0) then + RIM_W(iw,1,1,1)=RIM_acc + else + RIM_W(iw,1,1,1)=RIM_acc_anis + end if + enddo ! ! wings q == 0 ! if (RIM_W_is_diagonal) return - do i2=2,RIM_W_ng - RIM_acc=0._DP - ! - do i3=1,RIM_n_rand_pts - ! - !Evaluate func - ! - func = f_coeff(1,1,i2,iq,1)+qr(1,i3)*(f_coeff(2,1,i2,iq,1)+qr(1,i3)*f_coeff(4,1,i2,iq,1))& -& +qr(2,i3)*(f_coeff(3,1,i2,iq,1)+qr(2,i3)*f_coeff(6,1,i2,iq,1)& -& +2_SP*qr(1,i3)*f_coeff(5,1,i2,iq,1)) + do iw=1,Xw%n_freqs + do i2=2,RIM_W_ng + RIM_acc=0._DP ! - RIM_acc = RIM_acc + rfac*vslab(i3,1)**2*func*vslab(i3,i2)**2/(1._DP-vslab(i3,1)*func*vslab(i3,i2)) + do i3=1,RIM_n_rand_pts + ! + !Evaluate func + ! + func = f_coeff(1,1,i2,iq,iw)+qr(1,i3)*(f_coeff(2,1,i2,iq,iw)+qr(1,i3)*f_coeff(4,1,i2,iq,iw))& +& +qr(2,i3)*(f_coeff(3,1,i2,iq,iw)+qr(2,i3)*f_coeff(6,1,i2,iq,iw)& +& +2._DP*qr(1,i3)*f_coeff(5,1,i2,iq,iw)) + ! + RIM_acc = RIM_acc + rfac*vslab(i3,1)**2*func*vslab(i3,i2)**2/(1._DP-vslab(i3,1)*func*vslab(i3,i2)) + enddo + RIM_W(iw,iq,1,i2)=RIM_acc + RIM_W(iw,iq,i2,1)=RIM_W(iw,iq,1,i2) enddo - RIM_W(iq,1,i2)=RIM_acc - RIM_W(iq,i2,1)=RIM_W(iq,1,i2) enddo ! end subroutine diff --git a/src/coulomb/rim_spherical.F b/src/coulomb/rim_spherical.F index 4994677a63..9cb3ec8a3f 100644 --- a/src/coulomb/rim_spherical.F +++ b/src/coulomb/rim_spherical.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2011 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 ! subroutine rim_spherical(Np,points,p_weight,radius,power,MULTIPLY_BY_Q) ! diff --git a/src/coulomb/rim_spherical_bose.F b/src/coulomb/rim_spherical_bose.F index 2b142e836d..154743747e 100644 --- a/src/coulomb/rim_spherical_bose.F +++ b/src/coulomb/rim_spherical_bose.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2011 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 ! subroutine rim_spherical_bose(Np,points,p_weight,radius,power,il,MULTIPLY_BY_Q) ! diff --git a/src/dipoles/Berry_polarization_EQ.F b/src/dipoles/Berry_polarization_EQ.F index 19e422ff1b..d2149ee9fe 100644 --- a/src/dipoles/Berry_polarization_EQ.F +++ b/src/dipoles/Berry_polarization_EQ.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2019 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. -! -! 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): MG CA ! subroutine Berry_polarization_EQ(P_Berry_Red,All_S_det,en,Xk,k_map) ! diff --git a/src/dipoles/Build_Overlaps_Det_EQ.F b/src/dipoles/Build_Overlaps_Det_EQ.F index c265cd4441..ed032030f6 100644 --- a/src/dipoles/Build_Overlaps_Det_EQ.F +++ b/src/dipoles/Build_Overlaps_Det_EQ.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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. -! -! 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): MG CA ! subroutine Build_Overlaps_Det_EQ(Xen,i_sp_pol,ikbz,Sm1_plus,Sm1_minus,S_det) ! diff --git a/src/dipoles/DIPOLE_IO.F b/src/dipoles/DIPOLE_IO.F index 5dc836a9e0..bb0f55bbc8 100644 --- a/src/dipoles/DIPOLE_IO.F +++ b/src/dipoles/DIPOLE_IO.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): DS AM ! subroutine DIPOLE_IO(Xk,Xen,Dip,check_read_or_write,io_err,PAR_K_scheme_kind) ! @@ -94,6 +78,7 @@ subroutine DIPOLE_IO(Xk,Xen,Dip,check_read_or_write,io_err,PAR_K_scheme_kind) 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 ! diff --git a/src/dipoles/DIPOLE_SC_rotate.F b/src/dipoles/DIPOLE_SC_rotate.F index dcad372567..b14dbfd76a 100644 --- a/src/dipoles/DIPOLE_SC_rotate.F +++ b/src/dipoles/DIPOLE_SC_rotate.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM 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. +! Copyright (C) 2015 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 CA ! subroutine Dipole_SC_rotate(H_rotation,Xen,X,rot_direction) ! diff --git a/src/dipoles/DIPOLE_build_covariants.F b/src/dipoles/DIPOLE_build_covariants.F index 6f0c1fa055..de3821c315 100644 --- a/src/dipoles/DIPOLE_build_covariants.F +++ b/src/dipoles/DIPOLE_build_covariants.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG, CA, DS +! Copyright (C) 2015 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. -! -! 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. +! Authors (see AUTHORS file for details): MG CA DS ! subroutine DIPOLE_build_covariants(Xen,Xk,Dip) ! diff --git a/src/dipoles/DIPOLE_check_shifted_grids.F b/src/dipoles/DIPOLE_check_shifted_grids.F index c7d56b27ff..687df33687 100644 --- a/src/dipoles/DIPOLE_check_shifted_grids.F +++ b/src/dipoles/DIPOLE_check_shifted_grids.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM CH -! -! 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. +! Copyright (C) 2015 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 CH ! subroutine Dipole_check_shifted_grids( Xk_shift, Xk, iq, num_shifted_grid,q_mod,grid_order) ! diff --git a/src/dipoles/DIPOLE_dimensions.F b/src/dipoles/DIPOLE_dimensions.F index 6205c5c457..f16f84cbde 100644 --- a/src/dipoles/DIPOLE_dimensions.F +++ b/src/dipoles/DIPOLE_dimensions.F @@ -1,30 +1,13 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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. -! -! 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 DS ! subroutine DIPOLE_dimensions(Xen,Dip,bands,q0) ! use drivers, ONLY:l_col_cut - use R_lattice, ONLY:q_norm,bare_qpg,q0_def_norm use pars, ONLY:SP use electrons, ONLY:levels use DIPOLES, ONLY:DIPOLE_t @@ -53,11 +36,6 @@ subroutine DIPOLE_dimensions(Xen,Dip,bands,q0) ! l_X_terminator = X_terminator_Kind/='none' ! - if ( l_col_cut) q_norm(1) =q0_def_norm - if (.not.l_col_cut.and.allocated(bare_qpg)) then - bare_qpg(1,1)=q0_def_norm - endif - ! ! Set up band limits ! if (Dip%bands_ordered.or.Dip%Energy_treshold<0._SP) then diff --git a/src/dipoles/DIPOLE_driver.F b/src/dipoles/DIPOLE_driver.F index 2e098d8ad0..2559aa6565 100644 --- a/src/dipoles/DIPOLE_driver.F +++ b/src/dipoles/DIPOLE_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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. -! -! 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 DS ! subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) ! diff --git a/src/dipoles/DIPOLE_kb_Ylm.F b/src/dipoles/DIPOLE_kb_Ylm.F index 3e7d18c64b..405c9d64b3 100644 --- a/src/dipoles/DIPOLE_kb_Ylm.F +++ b/src/dipoles/DIPOLE_kb_Ylm.F @@ -1,29 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, DS +! Copyright (C) 2015 The Yambo Team ! -! Copyright (C) 1992-2005, Lucia Reining, Valerio Olevano, -! Francesco Sottile, Stefan Albrecht, Giovanni Onida, -! Fabien Bruneval -! -! 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. +! Authors (see AUTHORS file for details): AM DS ! subroutine Dipole_kb_Ylm(Ylm,dYlm,Ygrad,lang,k) ! diff --git a/src/dipoles/DIPOLE_kb_abinit_comp.F b/src/dipoles/DIPOLE_kb_abinit_comp.F index 0df9a7e501..65a5b0e0ab 100644 --- a/src/dipoles/DIPOLE_kb_abinit_comp.F +++ b/src/dipoles/DIPOLE_kb_abinit_comp.F @@ -1,29 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, DS +! Copyright (C) 2015 The Yambo Team ! -! Copyright (C) 1992-2005, Lucia Reining, Valerio Olevano, -! Francesco Sottile, Stefan Albrecht, Giovanni Onida, -! Fabien Bruneval -! -! 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. +! Authors (see AUTHORS file for details): AM DS ! subroutine Dipole_kb_abinit_comp(npp,npp_tab,ia,is,ik,i_sp_pol,Xk,kbv) ! diff --git a/src/dipoles/DIPOLE_kb_abinit_def_dim.F b/src/dipoles/DIPOLE_kb_abinit_def_dim.F index 40f51f8040..5fb17230fe 100644 --- a/src/dipoles/DIPOLE_kb_abinit_def_dim.F +++ b/src/dipoles/DIPOLE_kb_abinit_def_dim.F @@ -1,29 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DS -! -! Copyright (C) 1992-2005, Lucia Reining, Valerio Olevano, -! Francesco Sottile, Stefan Albrecht, Giovanni Onida, -! Fabien Bruneval -! -! 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) 2020 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. -! -! 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): DS ! subroutine Dipole_kb_abinit_def_dim() ! diff --git a/src/dipoles/DIPOLE_kb_init.F b/src/dipoles/DIPOLE_kb_init.F index 22d33c8380..8378744b9f 100644 --- a/src/dipoles/DIPOLE_kb_init.F +++ b/src/dipoles/DIPOLE_kb_init.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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): DS ! subroutine Dipole_kb_init(Xen,Dip,io_err,ID) ! diff --git a/src/dipoles/DIPOLE_kb_pwscf_comp.F b/src/dipoles/DIPOLE_kb_pwscf_comp.F index 8ca9924d4e..e325ae3c00 100644 --- a/src/dipoles/DIPOLE_kb_pwscf_comp.F +++ b/src/dipoles/DIPOLE_kb_pwscf_comp.F @@ -1,29 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DS -! -! Copyright (C) 1992-2005, Lucia Reining, Valerio Olevano, -! Francesco Sottile, Stefan Albrecht, Giovanni Onida, -! Fabien Bruneval -! -! 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) 2015 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. -! -! 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): DS ! subroutine DIPOLE_kb_pwscf_comp(npp,npp_tab,ia,is,ik,Xk,kbv) ! diff --git a/src/dipoles/DIPOLE_kb_pwscf_def_dim.F b/src/dipoles/DIPOLE_kb_pwscf_def_dim.F index acaf6a5cfd..d72ad213f7 100644 --- a/src/dipoles/DIPOLE_kb_pwscf_def_dim.F +++ b/src/dipoles/DIPOLE_kb_pwscf_def_dim.F @@ -1,29 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DS -! -! Copyright (C) 1992-2005, Lucia Reining, Valerio Olevano, -! Francesco Sottile, Stefan Albrecht, Giovanni Onida, -! Fabien Bruneval -! -! 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) 2020 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. -! -! 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): DS ! subroutine Dipole_kb_pwscf_def_dim() ! diff --git a/src/dipoles/DIPOLE_kb_sum.F b/src/dipoles/DIPOLE_kb_sum.F index 3630dcf655..df1c590203 100644 --- a/src/dipoles/DIPOLE_kb_sum.F +++ b/src/dipoles/DIPOLE_kb_sum.F @@ -1,29 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, DS, AF +! Copyright (C) 2015 The Yambo Team ! -! Copyright (C) 1992-2005, Lucia Reining, Valerio Olevano, -! Francesco Sottile, Stefan Albrecht, Giovanni Onida, -! Fabien Bruneval -! -! 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. +! Authors (see AUTHORS file for details): AM DS AF ! subroutine DIPOLE_kb_project(pp_range,npp,ncomp,WF_ib,kbv,XX) ! diff --git a/src/dipoles/DIPOLE_orb_magn_forCD.F b/src/dipoles/DIPOLE_orb_magn_forCD.F index 9cfe75379c..c74d9a520f 100644 --- a/src/dipoles/DIPOLE_orb_magn_forCD.F +++ b/src/dipoles/DIPOLE_orb_magn_forCD.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2019 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): DS ! subroutine Dipole_orb_magn_forCD(Xen,Xk,Dip) ! diff --git a/src/dipoles/DIPOLE_orbital_magnetization.F b/src/dipoles/DIPOLE_orbital_magnetization.F index 17c4469503..c9288d7810 100644 --- a/src/dipoles/DIPOLE_orbital_magnetization.F +++ b/src/dipoles/DIPOLE_orbital_magnetization.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2019 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): DS ! subroutine Dipole_orbital_magnetization(Xen,Xk,Dip) ! diff --git a/src/dipoles/DIPOLE_overlaps.F b/src/dipoles/DIPOLE_overlaps.F index 15fe794522..20a8f6eb62 100644 --- a/src/dipoles/DIPOLE_overlaps.F +++ b/src/dipoles/DIPOLE_overlaps.F @@ -1,26 +1,16 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG, CA +! Copyright (C) 2015 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): MG CA +! +!> @brief Calculate overlaps between wave-function <\psi_k | \psi_{k+q} > for q = 1,2 ! -! 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. +!! @param[out] DIP_S Overlap matrices +! +#include ! -! 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_overlaps(Xk,Dip) ! use pars, ONLY:SP,cZERO,pi @@ -38,8 +28,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 @@ -51,10 +39,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") @@ -84,8 +74,6 @@ subroutine DIPOLE_overlaps(Xk,Dip) ! call PARALLEL_WF_index( ) ! - 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)) @@ -106,10 +94,14 @@ 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_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) ! + call WF_free(WF) + ! 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 @@ -132,6 +124,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) ! ! Shift the wave-function by a G-vector if the neighbor is out of the BZ (USE_shifed_wf=.true.) @@ -141,14 +135,17 @@ 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_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 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 c771790537..aed412dcd4 100644 --- a/src/dipoles/DIPOLE_p_matrix_elements.F +++ b/src/dipoles/DIPOLE_p_matrix_elements.F @@ -1,29 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, DS +! Copyright (C) 2015 The Yambo Team ! -! Copyright (C) 1992-2005, Lucia Reining, Valerio Olevano, -! Francesco Sottile, Stefan Albrecht, Giovanni Onida, -! Fabien Bruneval -! -! 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. +! Authors (see AUTHORS file for details): AM DS ! subroutine DIPOLE_p_matrix_elements(Xk,iv_wf,ic_wf,ik,rho,rho_spinor,P2,l_eval_P2) ! diff --git a/src/dipoles/DIPOLE_shifted_grids.F b/src/dipoles/DIPOLE_shifted_grids.F index d7f3e5fa3c..d7701f229e 100644 --- a/src/dipoles/DIPOLE_shifted_grids.F +++ b/src/dipoles/DIPOLE_shifted_grids.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM CH 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. +! Copyright (C) 2015 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 CH DS ! subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! diff --git a/src/dipoles/DIPOLE_spin_magnetization.F b/src/dipoles/DIPOLE_spin_magnetization.F index e292016828..bb742f237f 100644 --- a/src/dipoles/DIPOLE_spin_magnetization.F +++ b/src/dipoles/DIPOLE_spin_magnetization.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2019 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): DS ! subroutine Dipole_spin_magnetization(Xen,Xk,dip) ! diff --git a/src/dipoles/DIPOLE_transverse.F b/src/dipoles/DIPOLE_transverse.F index a25b71cc7f..1bd698ccd4 100644 --- a/src/dipoles/DIPOLE_transverse.F +++ b/src/dipoles/DIPOLE_transverse.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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. -! -! 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 DS ! subroutine Dipole_transverse(Xen,Xk,Dip) ! diff --git a/src/dipoles/DIPOLE_x_real_space.F b/src/dipoles/DIPOLE_x_real_space.F index fdcf8051c7..91c6358e62 100644 --- a/src/dipoles/DIPOLE_x_real_space.F +++ b/src/dipoles/DIPOLE_x_real_space.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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. -! -! 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): DS ! subroutine DIPOLE_x_real_space(Xen,Xk,Dip,idir_todo) ! diff --git a/src/dipoles/Ionic_polarization.F b/src/dipoles/Ionic_polarization.F index 80985d30f3..9aad29bfb0 100644 --- a/src/dipoles/Ionic_polarization.F +++ b/src/dipoles/Ionic_polarization.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2019 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. -! -! 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): MG CA ! subroutine Ionic_polarization(I_Berry_RED,en) ! diff --git a/src/dipoles/NL_project.dep b/src/dipoles/NL_project.dep index 1a9bc945d2..22f270e592 100644 --- a/src/dipoles/NL_project.dep +++ b/src/dipoles/NL_project.dep @@ -1,3 +1,6 @@ + Berry_polarization_EQ.o DIPOLE_build_covariants.o DIPOLE_driver.o + Ionic_polarization.o + POLARIZATION_output.o diff --git a/src/dipoles/POLARIZATION_output.F b/src/dipoles/POLARIZATION_output.F index 702b2a1e1c..fab85952ad 100644 --- a/src/dipoles/POLARIZATION_output.F +++ b/src/dipoles/POLARIZATION_output.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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. -! -! 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): MG CA ! subroutine POLARIZATION_output(Xen,Xk,Dip) ! diff --git a/src/dipoles/RT_project.dep b/src/dipoles/RT_project.dep index ed4c8d35ce..a375ef9236 100644 --- a/src/dipoles/RT_project.dep +++ b/src/dipoles/RT_project.dep @@ -1,5 +1,6 @@ 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/dipoles/SC_project.dep b/src/dipoles/SC_project.dep index 95dfb72f6d..b061fa416f 100644 --- a/src/dipoles/SC_project.dep +++ b/src/dipoles/SC_project.dep @@ -1,3 +1,7 @@ + Berry_polarization_EQ.o + DIPOLE_SC_rotate.o DIPOLE_driver.o DIPOLE_shifted_grids.o + Ionic_polarization.o + POLARIZATION_output.o diff --git a/src/driver/NL_project.dep b/src/driver/NL_project.dep new file mode 100644 index 0000000000..637d2b2ccc --- /dev/null +++ b/src/driver/NL_project.dep @@ -0,0 +1,2 @@ + options_yambo.o + diff --git a/src/driver/RT_project.dep b/src/driver/RT_project.dep deleted file mode 100644 index 2f888752d5..0000000000 --- a/src/driver/RT_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - options_ypp.o - diff --git a/src/driver/options_control.c b/src/driver/options_control.c index a84a79a47b..99d867aaad 100644 --- a/src/driver/options_control.c +++ b/src/driver/options_control.c @@ -1,25 +1,9 @@ /* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org + License-Identifier: GPL - 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. + Copyright (C) 2020 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 */ #include @@ -65,10 +49,15 @@ void options_control(struct options_struct options[],int *i_opt) 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].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"; diff --git a/src/driver/options_interfaces.c b/src/driver/options_interfaces.c index 365b2ada1e..2782a0c517 100644 --- a/src/driver/options_interfaces.c +++ b/src/driver/options_interfaces.c @@ -1,25 +1,9 @@ /* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org + License-Identifier: GPL - 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. + Copyright (C) 2020 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 */ #include diff --git a/src/driver/options_projects.c b/src/driver/options_projects.c index aa23a062f8..dc98f85442 100644 --- a/src/driver/options_projects.c +++ b/src/driver/options_projects.c @@ -1,25 +1,9 @@ /* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org + License-Identifier: GPL - 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. + Copyright (C) 2020 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 */ #include diff --git a/src/driver/options_yambo.c b/src/driver/options_yambo.c index 896077510b..be84baea73 100644 --- a/src/driver/options_yambo.c +++ b/src/driver/options_yambo.c @@ -1,25 +1,9 @@ /* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org + License-Identifier: GPL - 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. + Copyright (C) 2020 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 */ #include @@ -39,7 +23,7 @@ void options_yambo(struct options_struct options[],int *i_opt) options[*i_opt].section=desc; *i_opt=*i_opt+1; options[*i_opt].short_desc="GW approximation"; - options[*i_opt].long_desc[i_desc]="=(p)PA/(c)HOSEX/(r)eal-axis"; + options[*i_opt].long_desc[i_desc]="=(p)PA/(m)PA/(c)HOSEX/(r)eal-axis"; #if defined _ELPH i_desc=i_desc+1; options[*i_opt].long_desc[i_desc]="=fan"; @@ -90,6 +74,14 @@ void options_yambo(struct options_struct options[],int *i_opt) 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; @@ -109,7 +101,7 @@ void options_yambo(struct options_struct options[],int *i_opt) options[*i_opt].bin="yambo"; options[*i_opt].yambo_string="screen"; options[*i_opt].section=desc; - options[*i_opt].long_desc[0]="=(s)static/(p)PA/(d)ynamical dielectric matrix"; + options[*i_opt].long_desc[0]="=(s)static/(p)PA/m(PA)/(d)ynamical dielectric matrix"; options[*i_opt].long_desc[1]="=(X) dynamical response matrix"; options[*i_opt].char_var=1; *i_opt=*i_opt+1; @@ -133,8 +125,16 @@ void options_yambo(struct options_struct options[],int *i_opt) desc="Bethe-Salpeter Equation"; *i_opt=*i_opt+1; options[*i_opt].short_desc="BSE solver"; - options[*i_opt].long_desc[0]="=h/d/s/(p/f)i/t"; - options[*i_opt].long_desc[1]="(h)aydock/(d)iagonalization/(i)nversion"; +#if defined _SLEPC && !defined _NL + options[*i_opt].long_desc[0]="=h/d/s/(p/f)i"; +#else + options[*i_opt].long_desc[0]="=h/d/(p/f)i"; +#endif + options[*i_opt].long_desc[1]="(h)aydock/(d)iagonalization"; + options[*i_opt].long_desc[2]="(pi) perturbative inversion/ (fi) full inversion"; +#if defined _SLEPC && !defined _NL + 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"; diff --git a/src/driver/options_ypp.c b/src/driver/options_ypp.c index 563f59822a..cc17a0e2f7 100644 --- a/src/driver/options_ypp.c +++ b/src/driver/options_ypp.c @@ -1,25 +1,9 @@ /* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org + License-Identifier: GPL - 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. + Copyright (C) 2020 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 */ #include diff --git a/src/el-ph/.objects b/src/el-ph/.objects index 7d73a56163..096f6e7316 100644 --- a/src/el-ph/.objects +++ b/src/el-ph/.objects @@ -1,9 +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 +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 #endif -#if defined _RT || defined _PHEL -RT_objs = ELPH_databases_load.o ELPH_databases_check.o ELPH_databases_grids_map.o \ - ELPH_databases_symmetrize.o ELPH_acoustic_phonon_properties.o -#endif -objs = ${EQ_objs} ${RT_objs} diff --git a/src/el-ph/DOUBLE_project.dep b/src/el-ph/DOUBLE_project.dep index ec032683f4..818f59c7e4 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,6 @@ ELPH_gsqF_to_Sigma.o ELPH_simmetrize_and_distribute_gsqF.o En_k_plus_q_interpolate.o + Eval_Efermi_DbGd.o + get_ph_E_DbGd.o diff --git a/src/el-ph/ELPH_Hamiltonian.F b/src/el-ph/ELPH_Hamiltonian.F index 84c5aa8703..e4444d8d32 100644 --- a/src/el-ph/ELPH_Hamiltonian.F +++ b/src/el-ph/ELPH_Hamiltonian.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine ELPH_Hamiltonian(en,k,q) ! diff --git a/src/el-ph/ELPH_Sigma_c.F b/src/el-ph/ELPH_Sigma_c.F index c568758db3..173dbbd72c 100644 --- a/src/el-ph/ELPH_Sigma_c.F +++ b/src/el-ph/ELPH_Sigma_c.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine ELPH_Sigma_c(en,k,q,qp) ! @@ -51,7 +35,7 @@ subroutine ELPH_Sigma_c(en,k,q,qp) use ELPH, ONLY:elph_nb,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, & +& E_kpq_sh_fact,Efermi_DbGd,gsqF_energy_steps,eval_G_using_KK,PH_qpt,ID_E_kpq,ID_E_kpq_obj, & & elph_branches,QP_DW,QP_OMS_Fan,FAN_deltaE_treshold use interfaces, ONLY:QP_state_print,ELPH_alloc use interpolate, ONLY:INTERPOLATE_is_serial,INTERPOLATION_coefficients,INTERP_obj,INTERP_shell_factor,& @@ -76,6 +60,7 @@ subroutine ELPH_Sigma_c(en,k,q,qp) real(SP) ::ph_E,factor,elph_gkkp_sq,E_random_shift logical ::l_WRgFsq,l_GF_from_CA,load_gkkp_DB real(SP), allocatable :: q_weight(:) + real(SP), external :: Eval_Efermi_DbGd ! call timing('GW(e-p)',OPR='start') ! @@ -231,6 +216,7 @@ subroutine ELPH_Sigma_c(en,k,q,qp) call msg('sr','PH-double-grid not yet compatible with Random q-grids and Eliashberg functions!') use_PH_DbGd=.FALSE. endif + ! endif ! ! Interpolate the E(k+q) energies for the double-grid @@ -245,6 +231,10 @@ subroutine ELPH_Sigma_c(en,k,q,qp) INTERP_obj(ID_E_kpq_obj)%what="E(k+q)" call INTERPOLATION_coefficients(E=en,k=k,ID=ID_E_kpq,ID_obj=ID_E_kpq_obj) ! + ! Evaluate the new Fermi-Energy + ! + if(any(en%nbm/=en%nbf)) Efermi_DbGd=Eval_Efermi_DbGd(k,q,en) + ! call En_k_plus_q_interpolate(k,q,en,1) ! I need them for the DW term ! endif @@ -394,9 +384,10 @@ subroutine ELPH_Sigma_c(en,k,q,qp) elph_gkkp_sq=real(conjg(GKKP%dVc(il,ob_gkkp,ib_gkkp,ik_bz_gkkp,1))*& & GKKP%dVc(il,ob_gkkp,ib_gkkp,ik_bz_gkkp,1)/2._SP/ph_E,SP) ! - ! ELPH_GreenF evaluate real and imaginary part of the electron-phonon self-energy + ! ELPH_Sigma_c_engine evaluates 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 86% rename from src/el-ph/ELPH_GreenF.F rename to src/el-ph/ELPH_Sigma_c_engine.F index 24338e1c11..fd95a55fc0 100644 --- a/src/el-ph/ELPH_GreenF.F +++ b/src/el-ph/ELPH_Sigma_c_engine.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM 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. +! Copyright (C) 2006 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 CA ! !> @brief Calculate real and imaginary part of the electron-phonon self-energy !! @@ -32,12 +16,12 @@ !! @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 ! -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 electrons, ONLY:levels,spin_occ @@ -45,10 +29,11 @@ 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,Efermi_DbGd use QP_m, ONLY:QP_table,QP_time_order_sign use R_lattice, ONLY:bz_samp - use functions, ONLY:Fermi_fnc_derivative + use D_lattice, ONLY:Tel + use functions, ONLY:Fermi_fnc_derivative,Fermi_fnc ! #include ! @@ -70,6 +55,7 @@ subroutine ELPH_GreenF(i_qp,ob,ok,iq_bz,iq_ibz,iq_mem,il,elph_gkkp_sq,en,k,q,Sc_ real(SP) :: delta_E_at_gamma,f_occ,E_kpq real(SP) :: one_minus_2f_occ,gsqF_damping,ph_E real(SP) :: weight_dbg,DW_weight + real(SP), external :: get_ph_E_DbGd ! logical :: eval_DW ! @@ -97,6 +83,11 @@ subroutine ELPH_GreenF(i_qp,ob,ok,iq_bz,iq_ibz,iq_mem,il,elph_gkkp_sq,en,k,q,Sc_ ! 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(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) ! @@ -112,6 +103,11 @@ subroutine ELPH_GreenF(i_qp,ob,ok,iq_bz,iq_ibz,iq_mem,il,elph_gkkp_sq,en,k,q,Sc_ f_occ=GKKP%E_kpq(iq_bz)%f(ob,ik_bz,1)/spin_occ endif ! + ! If use Double-Grid occupation can be different + ! due to the change in the Fermi energy, I read them from the DbGrid + ! + if(use_PH_DbGd) f_occ=Fermi_fnc(E_kpq-Efermi_DbGd,Tel) + ! ! Frequency Loop ! do iw=1,gsqF_energy_steps @@ -199,11 +195,14 @@ subroutine ELPH_GreenF(i_qp,ob,ok,iq_bz,iq_ibz,iq_mem,il,elph_gkkp_sq,en,k,q,Sc_ 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 + ! DEBUG> + ! E_kpq=en%E(ob,ok,1) + ! f_occ=en%f(ob,ok,1)/spin_occ + ! DEBUG< ! do iw=1,gsqF_energy_steps ! @@ -229,10 +228,14 @@ subroutine ELPH_GreenF(i_qp,ob,ok,iq_bz,iq_ibz,iq_mem,il,elph_gkkp_sq,en,k,q,Sc_ 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(il,1,1) ! do iq_idx=1,GKKP%E_dg_kpq(1)%nq_around ! Numbere of q-points around Gamma ! delta_E_at_gamma=en%E(ib,ik,1) - GKKP%E_dg_kpq(1)%E_kpq(ob,ik,1,iq_idx) + ! DEBUG> + ! delta_E_at_gamma=en%E(ib,ik,1) -en%E(ob,ik,1) + ! DEBUG< ! if(abs(delta_E_at_gamma)>DW_deltaE_treshold) then gsqF_DEN_DW=gsqF_DEN_DW+1._SP/delta_E_at_gamma/ph_E diff --git a/src/el-ph/ELPH_acoustic_phonon_properties.F b/src/el-ph/ELPH_acoustic_phonon_properties.F index 66e6671dec..32ee54ff68 100644 --- a/src/el-ph/ELPH_acoustic_phonon_properties.F +++ b/src/el-ph/ELPH_acoustic_phonon_properties.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine ELPH_acoustic_phonon_properties(q) ! diff --git a/src/el-ph/ELPH_databases_check.F b/src/el-ph/ELPH_databases_check.F index 82d8794221..db243a6106 100644 --- a/src/el-ph/ELPH_databases_check.F +++ b/src/el-ph/ELPH_databases_check.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine ELPH_databases_check(n_bands) ! diff --git a/src/el-ph/ELPH_databases_grids_map.F b/src/el-ph/ELPH_databases_grids_map.F index 7931777093..0a3815b667 100644 --- a/src/el-ph/ELPH_databases_grids_map.F +++ b/src/el-ph/ELPH_databases_grids_map.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2012 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 ! subroutine ELPH_databases_grids_map(k,q) ! diff --git a/src/el-ph/ELPH_databases_load.F b/src/el-ph/ELPH_databases_load.F index fd452d3ff4..9aa8242335 100644 --- a/src/el-ph/ELPH_databases_load.F +++ b/src/el-ph/ELPH_databases_load.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 FP ! subroutine ELPH_databases_load(GKKP_sq,E,k,q,n_bands,q_range,K_mode,SCATT_mode) ! diff --git a/src/el-ph/ELPH_databases_symmetrize.F b/src/el-ph/ELPH_databases_symmetrize.F index b5fdd39e1d..ea8497255f 100644 --- a/src/el-ph/ELPH_databases_symmetrize.F +++ b/src/el-ph/ELPH_databases_symmetrize.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine ELPH_databases_symmetrize(mode,E,k,q,ik_bz,iq,n_bands,GKKP) ! diff --git a/src/el-ph/ELPH_gsqF_to_Sigma.F b/src/el-ph/ELPH_gsqF_to_Sigma.F index 675765cda8..4d00dcfdf6 100644 --- a/src/el-ph/ELPH_gsqF_to_Sigma.F +++ b/src/el-ph/ELPH_gsqF_to_Sigma.F @@ -1,29 +1,13 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine ELPH_gsqF_to_Sigma(en,q,l_GF_from_CA,Sc_W) ! - use pars, ONLY:SP,DP,pi + use pars, ONLY:SP,DP,cZERO,pi use functions, ONLY:bose_f use units, ONLY:HA2EV use LIVE_t, ONLY:live_timing @@ -50,8 +34,8 @@ subroutine ELPH_gsqF_to_Sigma(en,q,l_GF_from_CA,Sc_W) ! integer ::i_qp,iw,il,iq_loop,iq_mem,ib,ik,nq type(w_samp) ::Sc_local_W - complex(DP) ::DP_FAN(gsqF_energy_steps),DP_DW - complex(SP) ::coefficient,Sc_local(gsqF_energy_steps) + complex(DP) ::DP_FAN(gsqF_energy_steps),DP_DW,coefficient + complex(SP) ::Sc_local(gsqF_energy_steps) real(SP) ::ph_freq ! call ELPH_simmetrize_and_distribute_gsqF(en) @@ -67,12 +51,12 @@ subroutine ELPH_gsqF_to_Sigma(en,q,l_GF_from_CA,Sc_W) ! If the self-energy has to be plotted, instead, the contribution from the ! lifetimes-related gsqF must be real (spectral function). ! - coefficient=(0.,1.) + coefficient=cmplx(0.,1.,kind=DP) ! ! Setup energy range for Sc/G plotting (I) ! if ( trim(QP_solver)=='g' ) then - coefficient=(1.,0.) + coefficient=cmplx(1.,0.,kind=DP) call W_reset(Sc_local_W) Sc_local_W%n_freqs =QP_Sc_steps endif @@ -88,14 +72,14 @@ 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.,0.00001/HA2EV) + 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) ik =QP_table(i_qp,3) ! - DP_FAN=cmplx(0.,0.,DP) - DP_DW =cmplx(0.,0.,DP) + DP_FAN=cmplx(0.,0.,kind=DP) + DP_DW =cmplx(0.,0.,kind=DP) ! do iq_loop=1,nq ! @@ -112,11 +96,11 @@ subroutine ELPH_gsqF_to_Sigma(en,q,l_GF_from_CA,Sc_W) ! QP lifetimes/Green's function !------------------------------- if (l_GF_from_CA.and.trim(QP_solver)=='g') then - DP_FAN(iw)=DP_FAN(iw)+(gsqF_fan(i_qp,iq_mem,il,iw)*(2.*bose_f(ph_freq)/spin_occ+1.)/2.+& -& gsqF_ca_corr(i_qp,iq_mem,il,iw))/real( PAR_COM_G_b_INDEX%n_CPU) + DP_FAN(iw)=DP_FAN(iw)+(gsqF_fan(i_qp,iq_mem,il,iw)*(2._DP*bose_f(ph_freq)/spin_occ+1._DP)/2._DP+& +& gsqF_ca_corr(i_qp,iq_mem,il,iw))/real(PAR_COM_G_b_INDEX%n_CPU,kind=DP) else - DP_FAN(iw)=DP_FAN(iw)+coefficient*(gsqF_life_bose(i_qp,iq_mem,il,iw)*(bose_f(ph_freq)/spin_occ+1.)/2.+& -& gsqF_life_f(i_qp,iq_mem,il,iw))/real( PAR_COM_G_b_INDEX%n_CPU) + DP_FAN(iw)=DP_FAN(iw)+coefficient*(gsqF_life_bose(i_qp,iq_mem,il,iw)*(bose_f(ph_freq)/spin_occ+1._DP)/2._DP+& +& gsqF_life_f(i_qp,iq_mem,il,iw))/real( PAR_COM_G_b_INDEX%n_CPU,kind=DP) endif ! if ( trim(QP_solver)=='n' ) then @@ -126,7 +110,7 @@ subroutine ELPH_gsqF_to_Sigma(en,q,l_GF_from_CA,Sc_W) ! QP energies: FAN+correction !----------------------------- ! - DP_FAN(iw)=DP_FAN(iw)+(gsqF_fan(i_qp,iq_mem,il,iw)*(2.*bose_f(ph_freq)/spin_occ+1.)/2.+& + DP_FAN(iw)=DP_FAN(iw)+(gsqF_fan(i_qp,iq_mem,il,iw)*(2._DP*bose_f(ph_freq)/spin_occ+1._DP)/2._DP+& & gsqF_ca_corr(i_qp,iq_mem,il,iw))/real( PAR_COM_G_b_INDEX%n_CPU) ! endif @@ -138,7 +122,7 @@ subroutine ELPH_gsqF_to_Sigma(en,q,l_GF_from_CA,Sc_W) ! QP energies : DW !------------------ ! - DP_DW=DP_DW+gsqF_dw(i_qp,iq_mem,il)*(2.*bose_f(ph_freq)/spin_occ+1.)/2./real( PAR_COM_G_b_INDEX%n_CPU) + DP_DW=DP_DW+gsqF_dw(i_qp,iq_mem,il)*(2._DP*bose_f(ph_freq)/spin_occ+1._DP)/2._DP/real(PAR_COM_G_b_INDEX%n_CPU,kind=DP) ! enddo ! @@ -161,10 +145,10 @@ subroutine ELPH_gsqF_to_Sigma(en,q,l_GF_from_CA,Sc_W) ! if (.not.l_GF_from_CA) then ! - Sc_local=(0.,0.) + Sc_local=cZERO ! - call Kramers_Kronig(cmplx(DP_FAN(:))/pi,real(Sc_W(i_qp)%p) ,QP_Sc_steps,& -& Sc_local ,conjg(Sc_local_W%p),QP_Sc_steps,(0.,0.)) + call Kramers_Kronig(cmplx(DP_FAN(:))/pi,real(Sc_W(i_qp)%p),QP_Sc_steps,& +& Sc_local,conjg(Sc_local_W%p),QP_Sc_steps,cZERO) ! QP_Sc(i_qp,:)=QP_Sc(i_qp,:)+Sc_local(:)+DP_DW ! diff --git a/src/el-ph/ELPH_project.dep b/src/el-ph/ELPH_project.dep new file mode 100644 index 0000000000..818f59c7e4 --- /dev/null +++ b/src/el-ph/ELPH_project.dep @@ -0,0 +1,14 @@ + 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 + Eval_Efermi_DbGd.o + get_ph_E_DbGd.o + diff --git a/src/el-ph/ELPH_simmetrize_and_distribute_gsqF.F b/src/el-ph/ELPH_simmetrize_and_distribute_gsqF.F index 6d7c32b8f8..d6e6707cf1 100644 --- a/src/el-ph/ELPH_simmetrize_and_distribute_gsqF.F +++ b/src/el-ph/ELPH_simmetrize_and_distribute_gsqF.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine ELPH_simmetrize_and_distribute_gsqF(en) ! diff --git a/src/el-ph/En_k_plus_q_interpolate.F b/src/el-ph/En_k_plus_q_interpolate.F index d4684e67b0..0e33153ddd 100644 --- a/src/el-ph/En_k_plus_q_interpolate.F +++ b/src/el-ph/En_k_plus_q_interpolate.F @@ -1,32 +1,16 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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): CA ! 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_nb,ID_E_kpq,GKKP,FineGd_E_kpq_alloc,Efermi_DbGd use interpolate, ONLY:INTERPOLATION_BZ ! #include @@ -36,8 +20,8 @@ subroutine En_k_plus_q_interpolate(k,q,E,iqbz) ! ! Work space ! - integer :: iqbz,ik,n_k_plus_q,ic,iq_fine,iq_idx - integer :: nq_around + integer :: iqbz,ik,n_k_plus_q,ic,iq_fine,iq_idx + integer :: nq_around type(bz_samp) :: k_plus_q type(levels) :: E_kpq ! @@ -80,15 +64,23 @@ subroutine En_k_plus_q_interpolate(k,q,E,iqbz) YAMBO_ALLOC(E_kpq%E,(E%nb,n_k_plus_q, n_sp_pol)) call INTERPOLATION_BZ(K=k_plus_q,NK=n_k_plus_q,ID=ID_E_kpq,E=E_kpq) ! - ! Calculate the new occupations (only for semiconductors) + ! Calculate the new occupations ! ============================== - ! This part has to be generilized to metals, taking into account - ! the fact the the Fermi energy can change due to the presence of E(k+q) states - ! For the moment I set all valence occupations to 1(or 2 without spin) + ! For semiconductors I do not recalculate occupations + ! I supposed fine and course grid have the same metallicity + ! and I set all valence occupations to 1(or 2 without spin) ! YAMBO_ALLOC(E_kpq%f,(E%nb,n_k_plus_q, n_sp_pol)) - E_kpq%f(1:E%nbf(1),:,1)=spin_occ - E_kpq%f(E%nbf(1)+1:,:,1)=rZERO + if(all(E%nbm==E%nbf)) then + E_kpq%f(1:E%nbf(1),:,1) =spin_occ + E_kpq%f(E%nbf(1)+1:,:,1)=rZERO + else + ! + ! For metals occuations are recalculated + ! using the Fine-grid fermi energy + ! + call f_build_ext(E_kpq,Efermi_DbGd) ! Interpolate levels are already aligned + endif ! ! Store E(k+q) energies in the GKKP ! ========================================== diff --git a/src/el-ph/Eval_Efermi_DbGd.F b/src/el-ph/Eval_Efermi_DbGd.F new file mode 100644 index 0000000000..e9b5d5a8fa --- /dev/null +++ b/src/el-ph/Eval_Efermi_DbGd.F @@ -0,0 +1,74 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2006 The Yambo Team +! +! Authors (see AUTHORS file for details): AC +! +function Eval_Efermi_DbGd(k,q,en) + ! + use pars, ONLY:SP + use R_lattice, ONLY:bz_samp,bz_samp_reset + use electrons, ONLY:n_sp_pol,levels,E_reset + use ELPH, ONLY:elph_nb,ID_E_kpq + use units, ONLY:HA2EV + use interpolate, ONLY:INTERPOLATION_BZ + use interfaces, ONLY:OCCUPATIONS_Fermi + use com, ONLY:msg + ! +#include + ! + type(bz_samp), intent(in) :: q,k + type(levels) :: en + ! + ! Work space + ! + real(SP) :: Eval_Efermi_DbGd + integer :: ikbz,iq_fine,N_k_plus_q,ic,ik + type(bz_samp) :: all_k_plus_q + type(levels) :: all_E_kpq + ! + if(any(elph_nb number of metallic bands') + ! + call bz_samp_reset(all_k_plus_q) + if(allocated(all_k_plus_q%pt)) then + YAMBO_FREE(all_k_plus_q%pt) + endif + ! + ! In principle should be N_k_plus_q=k%nbz*q%FGbz%N + ! see comment below + ! + N_k_plus_q=q%FGbz%N + all_k_plus_q%nibz=N_k_plus_q + YAMBO_ALLOC(all_k_plus_q%pt,(all_k_plus_q%nibz,3)) + YAMBO_ALLOC(all_k_plus_q%weights,(N_k_plus_q)) + ! + all_k_plus_q%weights=1._SP/real(N_k_plus_q,SP) + ! + call warning('Fermi Energy is calculated on the Double-Grid E(q_fine) ') + ! + ! In principle one should include all the point + ! E(k_i + q_j^fine) where i=1,k%nbz and j=1,q%FGbz%N + ! but this grid is too large, I calculate the Fermi + ! energy on the grid E(q_fine) that is supposed to be + ! much larger than E(k) + ! + !============================================= + ! + all_k_plus_q%pt(:,:)=q%FGbz%pt(:,:) + ! + ! Interpolate All Energies + ! ========================================== + call E_reset(all_E_kpq) + all_E_kpq%nb=elph_nb + all_E_kpq%nk=N_k_plus_q + YAMBO_ALLOC(all_E_kpq%E,(elph_nb,N_k_plus_q, n_sp_pol)) + call INTERPOLATION_BZ(K=all_k_plus_q,NK=N_k_plus_q,ID=ID_E_kpq,E=all_E_kpq) + ! + call OCCUPATIONS_Fermi(all_E_kpq,all_k_plus_q,'DbGrid',n_bands=elph_nb,mode='FERMI') + Eval_Efermi_DbGd=all_E_kpq%E_Fermi + call msg('rs','Fermi Energy shift due to the Double-Grid : ',Eval_Efermi_DbGd*HA2EV,'eV') + ! +end function Eval_Efermi_DbGd + diff --git a/src/el-ph/PHEL_project.dep b/src/el-ph/PHEL_project.dep new file mode 100644 index 0000000000..bbc20f4200 --- /dev/null +++ b/src/el-ph/PHEL_project.dep @@ -0,0 +1,6 @@ + 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/el-ph/RT_project.dep b/src/el-ph/RT_project.dep new file mode 100644 index 0000000000..bbc20f4200 --- /dev/null +++ b/src/el-ph/RT_project.dep @@ -0,0 +1,6 @@ + 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/el-ph/get_ph_E_DbGd.F b/src/el-ph/get_ph_E_DbGd.F new file mode 100644 index 0000000000..354991c129 --- /dev/null +++ b/src/el-ph/get_ph_E_DbGd.F @@ -0,0 +1,55 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2022 The Yambo Team +! +! Authors (see AUTHORS file for details): AC +! +!> @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(il,1,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 + diff --git a/src/hamiltonian/.objects b/src/hamiltonian/.objects index cd93f6a152..7ca35091a6 100644 --- a/src/hamiltonian/.objects +++ b/src/hamiltonian/.objects @@ -1,18 +1,17 @@ -MAGNETIC_objects = #if defined _SC MAGNETIC_objects = MAG_initial_check.o MAG_Hamiltonian.o MAG_common_build_A.o MAG_A_phase.o #endif -PSEUDO_objects = #if defined _RT || defined _SC PSEUDO_objects = Pseudo_Hamiltonian.o Pseudo_KB_G_to_R_space.o Pseudo_KB_FFT.o Pseudo_KB_gauge_factor.o #endif -NL_objects = #if defined _NL NL_objects = Build_Overlaps_det_NEQ.o Build_tilde_vbands.o Build_W_operator.o Berry_polarization_NEQ.o #endif #if defined _SC ELECTRIC_objects = Build_Overlaps_det_NEQ.o Build_tilde_vbands.o Build_W_operator.o Berry_polarization_NEQ.o #endif +#if defined _SC || defined _RT || defined _NL objs = Bare_Hamiltonian.o V_Hartree.o XC_additional_SC_potentials.o XC_potentials.o V_qp_basis_to_H.o V_real_space_to_H.o Vgrad_real_space_to_H.o \ Check_symmetries.o WF_and_dipole_dimensions.o \ ${MAGNETIC_objects} ${PSEUDO_objects} ${NL_objects} ${ELECTRIC_objects} +#endif diff --git a/src/hamiltonian/Bare_Hamiltonian.F b/src/hamiltonian/Bare_Hamiltonian.F index 04cd264d40..aba0aae833 100644 --- a/src/hamiltonian/Bare_Hamiltonian.F +++ b/src/hamiltonian/Bare_Hamiltonian.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): 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. +! Copyright (C) 2009 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. -! -! 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): DV DS ! subroutine Bare_Hamiltonian(E,Xk,k) ! diff --git a/src/hamiltonian/Berry_polarization_NEQ.F b/src/hamiltonian/Berry_polarization_NEQ.F index 207bf5b4e3..ed1d010735 100644 --- a/src/hamiltonian/Berry_polarization_NEQ.F +++ b/src/hamiltonian/Berry_polarization_NEQ.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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. -! -! 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): MG CA ! subroutine Berry_polarization_NEQ(Xen,Xk,i_sp_pol,V_bands,Polarization) ! diff --git a/src/hamiltonian/Build_Overlaps_det_NEQ.F b/src/hamiltonian/Build_Overlaps_det_NEQ.F index 692c87c717..d5907bbecd 100644 --- a/src/hamiltonian/Build_Overlaps_det_NEQ.F +++ b/src/hamiltonian/Build_Overlaps_det_NEQ.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): MG CA ! subroutine Build_overlaps_det_NEQ(en,Xk,i_sp,ikbz,V_bands,Sm1_plus,Sm1_minus,S_det) ! diff --git a/src/hamiltonian/Build_W_operator.F b/src/hamiltonian/Build_W_operator.F index 3ec7c65f36..6eca6e0535 100644 --- a/src/hamiltonian/Build_W_operator.F +++ b/src/hamiltonian/Build_W_operator.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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. -! -! 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): MG CA ! subroutine Build_W_operator(en,Xk,A_input,ik,i_sp,V_bands,H_nl_sc) ! @@ -145,7 +129,7 @@ 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), collapse(2) + !$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))- & diff --git a/src/hamiltonian/Build_tilde_vbands.F b/src/hamiltonian/Build_tilde_vbands.F index b46875d782..fdb117e0cd 100644 --- a/src/hamiltonian/Build_tilde_vbands.F +++ b/src/hamiltonian/Build_tilde_vbands.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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. -! -! 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): MG CA ! subroutine Build_tilde_vbands(en,Xk,ikbz,i_sp,istep,id_red,V_bands,V_tilde) ! diff --git a/src/hamiltonian/Check_symmetries.F b/src/hamiltonian/Check_symmetries.F index ffe64f0a70..f35bed248b 100644 --- a/src/hamiltonian/Check_symmetries.F +++ b/src/hamiltonian/Check_symmetries.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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) 2009 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. -! -! 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 CA DS ! subroutine Check_symmetries(field_dir,field_kind) ! diff --git a/src/hamiltonian/MAG_A_phase.F b/src/hamiltonian/MAG_A_phase.F index 80b8267c0e..4e9548a6af 100644 --- a/src/hamiltonian/MAG_A_phase.F +++ b/src/hamiltonian/MAG_A_phase.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2010 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): DS ! subroutine MAG_A_phase() ! diff --git a/src/hamiltonian/MAG_Hamiltonian.F b/src/hamiltonian/MAG_Hamiltonian.F index deb874c774..f50aeb3d56 100644 --- a/src/hamiltonian/MAG_Hamiltonian.F +++ b/src/hamiltonian/MAG_Hamiltonian.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2009 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): DS AM ! subroutine MAG_Hamiltonian() ! diff --git a/src/hamiltonian/MAG_common_build_A.F b/src/hamiltonian/MAG_common_build_A.F index 22c6aa5f06..3951496ed4 100644 --- a/src/hamiltonian/MAG_common_build_A.F +++ b/src/hamiltonian/MAG_common_build_A.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2009 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 DS ! subroutine MAG_common_build_A(build) ! diff --git a/src/hamiltonian/MAG_initial_check.F b/src/hamiltonian/MAG_initial_check.F index f69540df8b..aeba377036 100644 --- a/src/hamiltonian/MAG_initial_check.F +++ b/src/hamiltonian/MAG_initial_check.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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): DS ! subroutine MAG_initial_check() ! diff --git a/src/hamiltonian/NL_project.dep b/src/hamiltonian/NL_project.dep index a68a6fd8a9..51ce2beb59 100644 --- a/src/hamiltonian/NL_project.dep +++ b/src/hamiltonian/NL_project.dep @@ -1,2 +1,14 @@ + Bare_Hamiltonian.o + Berry_polarization_NEQ.o + Build_Overlaps_det_NEQ.o + Build_W_operator.o + Build_tilde_vbands.o + Check_symmetries.o + V_Hartree.o + V_qp_basis_to_H.o + V_real_space_to_H.o + Vgrad_real_space_to_H.o WF_and_dipole_dimensions.o + XC_additional_SC_potentials.o + XC_potentials.o diff --git a/src/hamiltonian/Pseudo_Hamiltonian.F b/src/hamiltonian/Pseudo_Hamiltonian.F index b8a615b6df..da42aec6e2 100644 --- a/src/hamiltonian/Pseudo_Hamiltonian.F +++ b/src/hamiltonian/Pseudo_Hamiltonian.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2010 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. -! -! 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): DS ! subroutine Pseudo_Hamiltonian(Xk,Xen,l_equilibrium) ! diff --git a/src/hamiltonian/Pseudo_KB_FFT.F b/src/hamiltonian/Pseudo_KB_FFT.F index 1b132fb2e4..eb714c93c6 100644 --- a/src/hamiltonian/Pseudo_KB_FFT.F +++ b/src/hamiltonian/Pseudo_KB_FFT.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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. -! -! 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): DS ! subroutine Pseudo_KB_FFT(kbv,kbv_real_space,kpt,pp_range,npp,i_atom,is,ia,ik) ! diff --git a/src/hamiltonian/Pseudo_KB_G_to_R_space.F b/src/hamiltonian/Pseudo_KB_G_to_R_space.F index 5c3ed74cba..6b277456be 100644 --- a/src/hamiltonian/Pseudo_KB_G_to_R_space.F +++ b/src/hamiltonian/Pseudo_KB_G_to_R_space.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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. -! -! 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): DS ! subroutine Pseudo_KB_G_to_R_space(Xk,Xen) ! diff --git a/src/hamiltonian/Pseudo_KB_gauge_factor.F b/src/hamiltonian/Pseudo_KB_gauge_factor.F index c3a20a1b55..e4336cfb6e 100644 --- a/src/hamiltonian/Pseudo_KB_gauge_factor.F +++ b/src/hamiltonian/Pseudo_KB_gauge_factor.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2010 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. -! -! 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): DS ! subroutine Pseudo_KB_gauge_factor(gauge_factor) ! diff --git a/src/hamiltonian/RT_project.dep b/src/hamiltonian/RT_project.dep index 4e68c876e6..fa80c4982e 100644 --- a/src/hamiltonian/RT_project.dep +++ b/src/hamiltonian/RT_project.dep @@ -1,10 +1,14 @@ Bare_Hamiltonian.o + Check_symmetries.o Pseudo_Hamiltonian.o Pseudo_KB_FFT.o Pseudo_KB_G_to_R_space.o Pseudo_KB_gauge_factor.o + V_Hartree.o V_qp_basis_to_H.o V_real_space_to_H.o Vgrad_real_space_to_H.o WF_and_dipole_dimensions.o + XC_additional_SC_potentials.o + XC_potentials.o diff --git a/src/hamiltonian/SC_project.dep b/src/hamiltonian/SC_project.dep index ea70d8d0a1..15d7a67c65 100644 --- a/src/hamiltonian/SC_project.dep +++ b/src/hamiltonian/SC_project.dep @@ -1,10 +1,22 @@ Bare_Hamiltonian.o + Berry_polarization_NEQ.o + Build_Overlaps_det_NEQ.o + Build_W_operator.o + Build_tilde_vbands.o + Check_symmetries.o + MAG_A_phase.o + MAG_Hamiltonian.o + MAG_common_build_A.o + MAG_initial_check.o Pseudo_Hamiltonian.o Pseudo_KB_FFT.o + Pseudo_KB_G_to_R_space.o Pseudo_KB_gauge_factor.o + V_Hartree.o V_qp_basis_to_H.o V_real_space_to_H.o Vgrad_real_space_to_H.o WF_and_dipole_dimensions.o XC_additional_SC_potentials.o + XC_potentials.o diff --git a/src/hamiltonian/V_Hartree.F b/src/hamiltonian/V_Hartree.F index 977dbcd71d..ada08038dd 100644 --- a/src/hamiltonian/V_Hartree.F +++ b/src/hamiltonian/V_Hartree.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG -! -! 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) 2007 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. -! -! 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): MG ! subroutine V_Hartree(rho,vhr) ! diff --git a/src/hamiltonian/V_qp_basis_to_H.F b/src/hamiltonian/V_qp_basis_to_H.F index 443fe294c6..294f12abe0 100644 --- a/src/hamiltonian/V_qp_basis_to_H.F +++ b/src/hamiltonian/V_qp_basis_to_H.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 ! subroutine V_qp_basis_to_H(ik,i_sp_pol,V,H) ! @@ -29,12 +13,7 @@ subroutine V_qp_basis_to_H(ik,i_sp_pol,V,H) use hamiltonian, ONLY:H_ref_bands use matrix_operate, ONLY:UP_matrix_index use timing_m, ONLY:timing -#if defined _SC || !defined _RT - use parallel_m, ONLY:PAR_IND_QP,HEAD_QP_cpu -#endif -#if defined _RT - use parallel_m, ONLY:PAR_IND_B_mat_ordered,PAR_IND_WF_k,HEAD_QP_cpu -#endif + use parallel_m, ONLY:PAR_IND_QP,HEAD_QP_cpu,PAR_IND_B_mat_ordered,PAR_IND_WF_k,HEAD_QP_cpu,l_par_SC,l_par_RT implicit none ! integer :: ik,i_sp_pol @@ -47,9 +26,9 @@ subroutine V_qp_basis_to_H(ik,i_sp_pol,V,H) ! ! Fill ... ! -#if defined _RT - if (.not.PAR_IND_WF_k%element_1D(ik) .or. .not.HEAD_QP_cpu) return -#endif + if (l_par_RT) then + if (.not.PAR_IND_WF_k%element_1D(ik) .or. .not.HEAD_QP_cpu) return + endif ! call timing('V_qp_basis_to_H',OPR='start') ! @@ -64,12 +43,12 @@ subroutine V_qp_basis_to_H(ik,i_sp_pol,V,H) if(ib>ibp) cycle ! if (.not.HEAD_QP_cpu) cycle -#if defined _SC && !defined _RT - if (.not.(PAR_IND_QP%element_1D(i1))) cycle -#endif -#if defined _RT - 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 -#endif + if (l_par_SC) then + 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 + endif ! ! In the RT simulation the bands QP_table matrix is not ordered ! when the carriers Couloumb scattering is calculated. diff --git a/src/hamiltonian/V_real_space_to_H.F b/src/hamiltonian/V_real_space_to_H.F index 5795afe534..d879b7c202 100644 --- a/src/hamiltonian/V_real_space_to_H.F +++ b/src/hamiltonian/V_real_space_to_H.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, DS +! Copyright (C) 2006 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. -! -! 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. +! Authors (see AUTHORS file for details): AM DS ! subroutine V_real_space_to_H(ik,i_sp_pol,H,WF,V_kind,V,Vxc) ! diff --git a/src/hamiltonian/Vgrad_real_space_to_H.F b/src/hamiltonian/Vgrad_real_space_to_H.F index 4957234e0e..b125dd026c 100644 --- a/src/hamiltonian/Vgrad_real_space_to_H.F +++ b/src/hamiltonian/Vgrad_real_space_to_H.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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. -! -! 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 ! subroutine Vgrad_real_space_to_H(ik,H,WF,V_grad) ! diff --git a/src/hamiltonian/WF_and_dipole_dimensions.F b/src/hamiltonian/WF_and_dipole_dimensions.F index 6caf7e566a..6189135ca2 100644 --- a/src/hamiltonian/WF_and_dipole_dimensions.F +++ b/src/hamiltonian/WF_and_dipole_dimensions.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2010 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 DS ! subroutine WF_and_dipole_dimensions(X,Xk) ! @@ -29,7 +13,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,bz_samp + use R_lattice, ONLY:qindx_S,G_m_G,bz_samp,qindx_S_max_Go 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 @@ -65,7 +49,13 @@ subroutine WF_and_dipole_dimensions(X,Xk) ! if ( l_sc_fock.or.l_sc_exx.or.l_sc_coh.or.l_sc_sex ) then ! - WF_Go_indx=maxval(qindx_S(:,:,2)) ! Sigma_x/c + if(allocated(qindx_S)) then + WF_Go_indx=maxval(qindx_S(:,:,2)) ! Sigma_x/c + elseif(qindx_S_max_Go/=-1) then + WF_Go_indx=qindx_S_max_Go + else + call error('Max Go not defined run setup again') + endif ! if (l_sc_coh.or.l_sc_sex.or.l_sc_srpa) then ! diff --git a/src/hamiltonian/XC_additional_SC_potentials.F b/src/hamiltonian/XC_additional_SC_potentials.F index 389e96dd2e..7becace7de 100644 --- a/src/hamiltonian/XC_additional_SC_potentials.F +++ b/src/hamiltonian/XC_additional_SC_potentials.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2009 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. -! -! 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 ! subroutine XC_additional_SC_potentials() ! diff --git a/src/hamiltonian/XC_potentials.F b/src/hamiltonian/XC_potentials.F index 4a8a5c5eaf..928e5cd2fb 100644 --- a/src/hamiltonian/XC_potentials.F +++ b/src/hamiltonian/XC_potentials.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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. -! -! 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 ! subroutine XC_potentials(POTENTIALS_string) ! diff --git a/src/interface/INIT.F b/src/interface/INIT.F index 9cf4d72d70..e5e2b40b7e 100644 --- a/src/interface/INIT.F +++ b/src/interface/INIT.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 ! integer function INIT(en,q,k,X,Xw,Dip,instr,lnstr,CLOSE_Gs,FINALIZE) ! @@ -30,10 +14,10 @@ integer function INIT(en,q,k,X,Xw,Dip,instr,lnstr,CLOSE_Gs,FINALIZE) ! INIT = 2 : DB listing mode ! 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_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_rim_w,& & 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_X,l_screen +& l_sc_magnetic,l_sc_electric,l_dipoles,l_pf_fxc,l_nl_optics,l_mpa,l_phel_corr,l_X,l_screen #if defined _SCALAPACK use drivers, ONLY:l_slk_test #endif @@ -80,9 +64,9 @@ integer function INIT(en,q,k,X,Xw,Dip,instr,lnstr,CLOSE_Gs,FINALIZE) ! type(levels) ::en type(bz_samp) ::q,k - type(X_t) ::X(4) + type(X_t) ::X(5) type(DIPOLE_t) ::Dip - type(w_samp) ::Xw(4) + type(w_samp) ::Xw(5) integer ::lnstr character(lnstr)::instr logical ::CLOSE_Gs,FINALIZE,QP_field @@ -98,7 +82,7 @@ integer function INIT(en,q,k,X,Xw,Dip,instr,lnstr,CLOSE_Gs,FINALIZE) type(QP_t) ::qp type(w_samp) ::Xxcw type(levels) ::en_sc - integer :: io_X_err(4),io_BS_err,io_BS_Fxc_err,io_QINDX_err,io_ELPH_err(2),io_SC_E_err,i_r + integer :: io_X_err(5),io_BS_err,io_BS_Fxc_err,io_QINDX_err,io_ELPH_err(2),io_SC_E_err,i_r ! logical, external:: file_exists ! @@ -122,10 +106,12 @@ integer function INIT(en,q,k,X,Xw,Dip,instr,lnstr,CLOSE_Gs,FINALIZE) call W_reset(Xw(2),damping=0.001_SP) call W_reset(Xw(3)) call W_reset(Xw(4)) + call W_reset(Xw(5)) call X_reset(X(1),type=1) call X_reset(X(2),type=2) call X_reset(X(3),type=3) call X_reset(X(4),type=4) + call X_reset(X(5),type=5) Xw(2)%n_freqs=1 Xw(4)%n_freqs=2 call DIPOLES_reset(Dip) @@ -320,13 +306,15 @@ subroutine LOCAL_from_runlevels_to_logicals() l_em1d=runlevel_is_on('em1d') l_em1s=runlevel_is_on('em1s') l_ppa=runlevel_is_on('ppa') + l_mpa=runlevel_is_on('mpa') + l_cohsex=runlevel_is_on('cohsex') l_dipoles=runlevel_is_on('dipoles') l_HF_and_locXC=runlevel_is_on('HF_and_locXC') l_gw0=runlevel_is_on('gw0') l_life=runlevel_is_on('life') l_rim=runlevel_is_on('rim_cut') - l_col_cut=runlevel_is_on('rim_cut') - l_cohsex=runlevel_is_on('cohsex') + l_rim_w=runlevel_is_on('rim_w') + l_col_cut=l_rim.or.l_rim_w l_acfdt=runlevel_is_on('acfdt') #if defined _SCALAPACK l_slk_test =runlevel_is_on('slktest') @@ -418,14 +406,19 @@ subroutine LOCAL_setup_before_input_IO() #endif if (l_gw0.and.l_elel_corr) call initactivate(1,'HF_and_locXC') ! - if (any((/l_em1s,l_em1d,l_X,l_optics,l_ppa/))) call initactivate(1,'dipoles') - if (l_ppa) call initactivate(1,'em1d') - if (l_gw0.and..not.any((/l_ppa,l_cohsex,l_HF_and_locXC,& + if (any((/l_em1s,l_em1d,l_X,l_optics,l_ppa,l_mpa/))) call initactivate(1,'dipoles') + if (l_ppa.or.l_mpa) call initactivate(1,'em1d') + if (l_gw0.and..not.any((/l_ppa,l_mpa,l_cohsex,l_HF_and_locXC,& & l_elph_corr,l_phel_corr,l_elphoton_corr/))) call initactivate(1,'em1d dipoles') if (l_cohsex) call initactivate(1,'em1s dipoles') if (l_bss) call initactivate(1,'optics dipoles bse') if (l_bs_fxc) BSS_mode="t" ! + if (l_mpa) then + Xw(5)%n_freqs=4 + Xw(5)%dr=(/0._SP,0.1_SP/)!/HA2EV !damping for MPA + endif + ! if (l_bse) then ! if (l_alda_fxc) BS_res_K_exchange=.TRUE. @@ -456,12 +449,13 @@ subroutine LOCAL_setup_before_input_IO() if (l_dipoles) then n_threads_DIP=0 endif - if (any((/l_optics,l_em1s,l_em1d,l_ppa,l_bse,l_X/))) then + if (any((/l_optics,l_em1s,l_em1d,l_ppa,l_mpa,l_bse,l_X/))) then n_threads_K=0 n_threads_X=0 n_threads_DIP=0 endif - if (l_HF_and_locXC.or.l_gw0.or.l_cohsex.or.l_sc_run) n_threads_SE=0 + if (l_HF_and_locXC.or.l_gw0.or.l_cohsex.or.l_sc_run& +& .or.l_ppa.or.l_mpa) n_threads_SE=0 if (l_real_time) n_threads_RT=0 if (l_nl_optics) n_threads_NL=0 #endif @@ -516,7 +510,8 @@ subroutine LOCAL_after_input_IO ! if (io_BS_err==0) then if ( l_ppa) call X_duplicate(Xbsk,X(4)) - if (.not.l_ppa) call X_duplicate(Xbsk,X(2)) + if ( l_mpa) call X_duplicate(Xbsk,X(5)) + if (.not.l_ppa.and..not.l_mpa) call X_duplicate(Xbsk,X(2)) endif ! endif diff --git a/src/interface/INIT_C_driver_runlevels.F b/src/interface/INIT_C_driver_runlevels.F index 13345555d0..635c0ffbb2 100644 --- a/src/interface/INIT_C_driver_runlevels.F +++ b/src/interface/INIT_C_driver_runlevels.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine INIT_C_driver_runlevels(defs) ! diff --git a/src/interface/INIT_DephMatrix.F b/src/interface/INIT_DephMatrix.F index 6a7a79c5dc..d3f84841f4 100644 --- a/src/interface/INIT_DephMatrix.F +++ b/src/interface/INIT_DephMatrix.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! subroutine INIT_DephMatrix() ! diff --git a/src/interface/INIT_QP.F b/src/interface/INIT_QP.F index 517d4ecd21..3c75fb280f 100644 --- a/src/interface/INIT_QP.F +++ b/src/interface/INIT_QP.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! subroutine INIT_QP(comment) ! diff --git a/src/interface/INIT_QP_ctl_load.F b/src/interface/INIT_QP_ctl_load.F index 166e5c024a..88b6291221 100644 --- a/src/interface/INIT_QP_ctl_load.F +++ b/src/interface/INIT_QP_ctl_load.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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 ! subroutine INIT_QP_ctl_load(defs,ID) ! diff --git a/src/interface/INIT_QP_ctl_switch.F b/src/interface/INIT_QP_ctl_switch.F index 808643afd9..bfc80684bb 100644 --- a/src/interface/INIT_QP_ctl_switch.F +++ b/src/interface/INIT_QP_ctl_switch.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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 ! subroutine INIT_QP_ctl_switch(what) ! diff --git a/src/interface/INIT_RT_ctl_load.F b/src/interface/INIT_RT_ctl_load.F index d31d8512c1..baacd58e69 100644 --- a/src/interface/INIT_RT_ctl_load.F +++ b/src/interface/INIT_RT_ctl_load.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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): DS ! subroutine INIT_RT_ctl_load(defs,i_type) ! diff --git a/src/interface/INIT_RT_ctl_switch.F b/src/interface/INIT_RT_ctl_switch.F index 4e95747423..99921075b1 100644 --- a/src/interface/INIT_RT_ctl_switch.F +++ b/src/interface/INIT_RT_ctl_switch.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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): DS ! subroutine INIT_RT_ctl_switch(what) ! diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 0b8bb36bb1..212f53527a 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 DS ! subroutine INIT_activate() ! @@ -28,8 +12,8 @@ subroutine INIT_activate() use stderr, ONLY:intc,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_real_time,l_ppa,l_lrc_fxc,l_gw0,l_elel_corr,l_elel_scatt,l_elph_corr,l_td_sex,& +& l_chi,l_cohsex,l_life,l_rpa_IP,l_td_hf,l_setup,l_sc_run,l_rim,l_rim_w,& +& l_real_time,l_ppa,l_mpa,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_X #if defined _SC || defined _RT @@ -73,8 +57,8 @@ subroutine INIT_activate() ! ! CPU structure ! - if ((l_optics.and..not.l_bse).or.l_em1s.or.l_em1d.or.l_ppa.or.l_life.or.l_X) then - if (l_em1s.or.l_em1d.or.l_ppa.or.l_life.or.l_X) then + if((l_optics.and..not.l_bse).or.l_em1s.or.l_em1d.or.l_ppa.or.l_mpa.or.l_life.or.l_X) then + if (l_em1s.or.l_em1d.or.l_ppa.or.l_mpa.or.l_life.or.l_X) then call CPU_activate("X_and_IO") else call CPU_activate("X") @@ -150,6 +134,10 @@ subroutine INIT_activate() ! if (l_rim) call initactivate(1,'RandQpts RandGvec QpgFull Em1Anys IDEm1Ref') ! + !RIM_W + ! + if (l_rim_w) call initactivate(1,'RandQpts RandGvecW rimw_type') + ! !Col CUTOFF ! if (l_col_cut) call initactivate(1,'CUTGeo CUTBox CUTRadius CUTCylLen CUTwsGvec CUTCol_test') @@ -179,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 UseNLCC') + if (l_alda_fxc) call initactivate(1,'FxcGRLc FxcLibxc FxcCutScheme UseNLCC') if (l_lrc_fxc) call initactivate(1,'LRC_alpha LRC_beta') if (l_pf_fxc) call initactivate(1,'PF_alpha') ! @@ -187,7 +175,7 @@ subroutine INIT_activate() ! ! Optics(not bse) or GW (no PP) ! - if ((l_optics.and.l_chi).or.(l_em1d.and..not.l_life.and..not.l_ppa.and..not.l_gw0).or.l_X) then + if ((l_optics.and.l_chi).or.(l_em1d.and..not.(l_life.or.l_ppa.or.l_mpa.or.l_gw0)).or.l_X) then ! X_kind ="Xd" if (l_X) X_kind="Xx" @@ -230,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') + call initactivate(1,'BSENGfxc FxcLibxc FxcCutScheme') if( (WF_exx_fraction>0.) .or. (WF_exx_screening>0.) ) call initactivate(1,'BSENGBlk WehDiag WehCpl') endif ! @@ -316,9 +304,9 @@ subroutine INIT_activate() call initactivate(1,'XTermEn') endif ! - ! GW (PPA & COHSEX) + ! GW (PPA, MPA, & COHSEX) ! - if ( (l_em1d.and.l_ppa) .or. (l_em1s.and.l_cohsex)) then + if ( (l_em1d.and.l_ppa) .or. (l_em1d.and.l_mpa) .or. (l_em1s.and.l_cohsex)) then call INIT_QP_ctl_switch('X') call initactivate(1,'RIM_W RIM_W_diag RIM_W_graph') ! @@ -331,6 +319,11 @@ subroutine INIT_activate() call X_activate('Xp',(/'QpntsR','BndsRn','NGsBlk','CGrdSp',& & 'EhEngy','LongDr','PPAPnt'/)) endif + if (l_mpa) then + call X_activate('Xm',(/'QpntsR','BndsRn','NGsBlk','CGrdSp',& +& 'EhEngy','LongDr','EnSamp','EnGrid','EnRnge','ImRnge','DmRnge','ETStps','IntSol'/)) + call initactivate(1,'mpERdb') + endif if (l_cohsex) then call X_activate('Xs',(/'QpntsR','BndsRn','NGsBlk','EhEngy','LongDr'/)) endif @@ -366,7 +359,7 @@ subroutine INIT_activate() if (trim(QP_solver)=="g") then call initactivate(1,'GEnSteps GEnRnge GEnMode GDmRnge GreenFTresh GreenF2QP') else - call initactivate(1,'GWoIter GWIter SCEtresh') + call initactivate(1,'SCEtresh') if (.not.l_cohsex) call initactivate(1,'NewtDchk ExtendOut OnMassShell QPExpand') endif else if (l_life) then @@ -392,16 +385,16 @@ subroutine INIT_activate() 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 - if (.not.l_ppa.and..not.l_cohsex) & + if (.not.l_ppa.and..not.l_mpa.and..not.l_cohsex) & & call X_activate('Xd',(/'BndsRn','NGsBlk',& & 'DmRnge','DmERef','CGrdSp','ETStps','EMStps',& & 'DrudeW','EhEngy','LongDr'/)) if (.not.l_cohsex) call initactivate(1,'GTermKind GTermEn DysSolver') if ( l_cohsex) call initactivate(1,'UseEbands') if (trim(QP_solver)=="g") then - call initactivate(1,'GEnSteps GEnRnge GEnMode GDmRnge GreenFTresh GreenF2QP') + call initactivate(1,'GsampType GEnSteps GEnRnge GImRnge GEnMode GDmRnge GreenFTresh GreenF2QP') else - call initactivate(1,'GWoIter GWIter SCEtresh') + call initactivate(1,'SCEtresh') if (.not.l_cohsex) call initactivate(1,'NewtDchk ExtendOut OnMassShell QPExpand') endif endif @@ -440,8 +433,8 @@ 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_lrc_fxc.and.any((/l_em1s,l_em1d,l_acfdt,l_ppa,l_cohsex,l_gw0/)) ) call initactivate(1,'LRC_alpha LRC_beta') + if(l_alda_fxc.and.any((/l_em1s,l_em1d,l_acfdt,l_ppa,l_mpa,l_cohsex,l_gw0/)) ) call initactivate(1,'FxcGRLc') + if( l_lrc_fxc.and.any((/l_em1s,l_em1d,l_acfdt,l_ppa,l_mpa,l_cohsex,l_gw0/)) ) call initactivate(1,'LRC_alpha LRC_beta') ! ! El-Ph: Frohlich Hamiltonian ! @@ -472,8 +465,8 @@ subroutine INIT_activate() call initactivate(-1,'QpntsRXs') ! if( index(H_potential,"IP")>0 ) call initactivate(1,'HARRLvcs ALLGHAR') - if( index(H_potential,"HARTREE")>0 .or. index(H_potential,"DEFAULT")>0) call initactivate(1,'HARRLvcs ALLGHAR') - if( index(H_potential,"GS_XC")>0 .or. index(H_potential,"DEFAULT")>0 ) call initactivate(1,'VXCRLvcs UseNLCC') + if( index(H_potential,"HARTREE")>0 .or. index(H_potential,"DEFAULT")>0 ) call initactivate(1,'HARRLvcs ALLGHAR') + if( index(H_potential,"GS_XC")>0 .or. index(H_potential,"DEFAULT")>0 ) call initactivate(1,'VXCRLvcs UseNLCC FxcLibxc') ! if (l_eval_collisions) then if( STRING_match(trim(H_potential),"SEX").or.& diff --git a/src/interface/INIT_barriers.F b/src/interface/INIT_barriers.F index 64ed1a5b79..8270628ed2 100644 --- a/src/interface/INIT_barriers.F +++ b/src/interface/INIT_barriers.F @@ -1,30 +1,14 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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 ! subroutine INIT_barriers() ! use drivers, ONLY:l_acfdt,l_bse,l_bss,l_cohsex,l_elph_corr,l_gw0,l_phel_corr,& -& l_eval_collisions,l_life,l_ppa,l_real_time,l_sc_run,l_tddft,l_nl_optics,l_screen +& l_eval_collisions,l_life,l_ppa,l_mpa,l_real_time,l_sc_run,l_tddft,l_nl_optics,l_screen use pars, ONLY:lchlen use D_lattice, ONLY:i_time_rev,i_space_inv use R_lattice, ONLY:Xk_grid_is_uniform @@ -39,7 +23,7 @@ subroutine INIT_barriers() ! logical :: metallic_system, bss_tddft,bse_bsfxc,& TR_or_SI,gw0_raxis,tddft_r_space,bss_diago,bse_sex,& -& bss_haydock,gw0_ppa,gw0_cohsex,tddft_g_space,bss_inv,l_flag +& bss_haydock,gw0_ppa,gw0_mpa,gw0_cohsex,tddft_g_space,bss_inv,l_flag character(lchlen) :: always_on_runlevels,on_runlevels ! ! ... @@ -48,8 +32,9 @@ subroutine INIT_barriers() ! TR_or_SI=i_time_rev==1.or.i_space_inv==1 ! - gw0_raxis=l_gw0.and..not.l_cohsex.and..not.l_ppa + gw0_raxis=l_gw0.and..not.l_cohsex.and..not.l_ppa.and..not.l_mpa gw0_ppa=l_gw0.and.l_ppa + gw0_mpa=l_gw0.and.l_mpa gw0_cohsex=l_gw0.and.l_cohsex ! tddft_r_space=l_tddft.and. l_bse @@ -69,19 +54,9 @@ subroutine INIT_barriers() ! except the ones specified. switch_off_runlevel switches off ! only already activated runlevels ! - ! NON-GPL RUNLEVELS that MUST BE SWITCHED OFF - ! (those runlevels can be on if a non-gpl input file is being reading) - !====================================================================== - ! - ! GPL_INCLUDE_START - !call switch_off_runlevel('acfdt',on_name=' ') - ! GPL_INCLUDE_END - ! ! RUNLEVELS !=========== ! - ! GPL_EXCLUDE_START SC_IGNORE - ! if (l_real_time) then on_runlevels='HF_and_locXC cohsex em1s dipoles negf collisions el_el_corr el_ph_corr ph_el_corr '//& & 'el_el_scatt el_ph_scatt el_photon_scatt el_photon_corr' @@ -111,23 +86,17 @@ subroutine INIT_barriers() goto 1 endif ! - ! GPL_EXCLUDE_END SC_IGNORE - ! if (gw0_cohsex) then call switch_off_runlevel('all',on_name='dyson gw0 em1s dipoles cohsex el_el_corr el_ph_corr ph_el_corr HF_and_locXC '//& & trim(always_on_runlevels)) goto 1 endif ! - ! GPL_EXCLUDE_START - ! if (l_acfdt) then call switch_off_runlevel('all',on_name='acfdt HF_and_locXC '//trim(always_on_runlevels)) goto 1 endif ! - ! GPL_EXCLUDE_END - ! if (l_life) then call switch_off_runlevel('all',on_name='life dipoles em1d el_el_corr ph_el_corr el_photon_corr '//trim(always_on_runlevels)) goto 1 @@ -140,7 +109,12 @@ subroutine INIT_barriers() endif ! if (gw0_ppa) then - on_runlevels='dyson gw0 ppa em1d el_el_corr el_ph_corr ph_el_corr HF_and_locXC' + on_runlevels='dyson gw0 ppa em1d el_el_corr el_ph_corr ph_el_corr HF_and_locXC rim_w' + call switch_off_runlevel('all',on_name=trim(on_runlevels)//' '//trim(always_on_runlevels)) + goto 1 + endif + if (gw0_mpa) then + on_runlevels='dyson gw0 mpa em1d el_el_corr el_ph_corr HF_and_locXC' call switch_off_runlevel('all',on_name=trim(on_runlevels)//' '//trim(always_on_runlevels)) goto 1 endif @@ -155,7 +129,7 @@ subroutine INIT_barriers() ! l_flag=l_bss.or.l_bse if (l_flag) then - on_runlevels='optics bse bss tddft em1s dipoles em1d ppa photolum' + on_runlevels='optics bse bss tddft em1s dipoles em1d ppa photolum rim_w' call switch_off_runlevel('all',on_name=trim(on_runlevels)//' '//trim(always_on_runlevels)) goto 1 endif @@ -183,7 +157,7 @@ subroutine INIT_barriers() ! SPIN !============= if (n_spin>2) then - on_runlevels='optics chi bse bss em1s dipoles em1d ppa HF_and_locXC cohsex dyson gw0 magnetic electric scrun' + on_runlevels='optics chi bse bss em1s dipoles em1d ppa mpa HF_and_locXC cohsex dyson gw0 magnetic electric scrun' on_runlevels=trim(on_runlevels)//' negf collisions el_el_corr el_ph_corr ph_el_corr el_el_scatt el_ph_scatt' call switch_off_runlevel('all',on_name=trim(on_runlevels)//' '//trim(always_on_runlevels)) endif diff --git a/src/interface/INIT_check_databases.F b/src/interface/INIT_check_databases.F index f41219e756..3dda729c61 100644 --- a/src/interface/INIT_check_databases.F +++ b/src/interface/INIT_check_databases.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2019 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 DS ! 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,& @@ -52,9 +36,9 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I ! #include ! - type(X_t) :: X(4),Xbsk + type(X_t) :: X(5),Xbsk type(QP_t) :: qp - type(w_samp) :: Xxcw,Xw(4) + type(w_samp) :: Xxcw,Xw(5) type(levels) :: en,en_sc type(bz_samp) :: q,k type(DIPOLE_t) :: Dip @@ -62,7 +46,7 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I integer :: lnstr character(lnstr) :: instr integer :: INIT - integer :: io_X_err(4),io_BS_err,io_BS_Fxc_err,io_QINDX_err,io_ELPH_err(2),io_SC_E_err + integer :: io_X_err(5),io_BS_err,io_BS_Fxc_err,io_QINDX_err,io_ELPH_err(2),io_SC_E_err ! ! Workspace ! @@ -220,7 +204,7 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I if (io_DIP_err==0) OSTNTS_Vnl_included= Dip%Vnl_included if (io_DIP_err/=0) OSTNTS_Vnl_included= (io_KB_abinit_err==0.or.io_KB_pwscf_err==0) ! - do i_io=1,4 ! Xx Xs Xd Xp + do i_io=1,5 ! Xx Xs Xd Xp Xm ! .a X(i_io)%ib=(/1,en%nb/) ! .b @@ -229,7 +213,7 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I ! if (nqibz>0) then if (trim(code_branch)=="devel-cumulant") BS_q=(/1,nqibz/) - do i_io=1,4 ! Xx Xs Xd Xp + do i_io=1,5 ! Xx Xs Xd Xp Xm X(i_io)%iq=(/1,nqibz/) call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/1,2/),MODE=DUMP,ID=io_ID) io_X_err(i_io)=io_X(X(i_io),Xw(i_io),io_ID) @@ -321,3 +305,4 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I #endif ! end subroutine + diff --git a/src/interface/INIT_input_file.F b/src/interface/INIT_input_file.F index f3361ed398..1b081c906b 100644 --- a/src/interface/INIT_input_file.F +++ b/src/interface/INIT_input_file.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine INIT_input_file() ! diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 0592f292e4..1ec8ffa789 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! @@ -40,12 +24,12 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) use stderr, ONLY:slash use QP_m, ONLY:QP_cg_percent,QP_G_damp,QP_solver,& & QP_n_G_bands,QP_ng_Sx,QP_ng_Sc,QP_ng_SH,QP_ng_Vxc,GW_terminator_E,GW_terminator_Kind,& -& QP_G_er,QP_G_dr,QP_Sc_steps,GWo_iterations,GW_iterations,& +& 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 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,& + 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,& & 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,& @@ -128,9 +112,9 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) type(initdefs)::defs type(levels) ::en type(bz_samp) ::q,k - type(X_t) ::X(4) + type(X_t) ::X(5) type(DIPOLE_t)::Dip - type(w_samp) ::Xw(4) + type(w_samp) ::Xw(5) ! ! Work Space ! @@ -156,6 +140,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it('r',defs,'em1s', '[R][Xs] Statically Screened Interaction') call it('r',defs,'em1d', '[R][X] Dynamically Screened Interaction') call it('r',defs,'ppa', '[R][Xp] Plasmon Pole Approximation for the Screened Interaction') + call it('r',defs,'mpa', '[R][Xm] Multi Pole Approximation for the Screened Interaction') + ! #if defined _RT_SCATT call it('r',defs,'el_el_scatt','[R] Electron-Electron Scattering') #endif @@ -267,8 +253,10 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'GDmRnge', '[GW] G_gw damping range',QP_G_dr,E_unit) call it(defs,'dScStep', '[GW] Energy step to evaluate Z factors',QP_dSc_delta,E_unit,verb_level=V_qp) call it(defs,'DysSolver','[GW] Dyson Equation solver ("n","s","g","q")',QP_solver,protect=.FALSE.,case="a") + call it(defs,'GsampType','[GW] Type of sampling ("ra" FF-RA, "1l" MPA-1l, "2l" MPA-2l)',QP_G_solver) call it(defs,'GEnSteps', '[GW] Green`s Function (GF) energy steps',QP_Sc_steps) call it(defs,'GEnRnge', '[GW] GF energy range',QP_G_er,E_unit) + call it(defs,'GImRnge', '[GW] GF imaginary range',QP_G_ir,E_unit) call it(defs,'GEnMode', '[GW] GF energy mode ("centered","absolute"). "Centered" around the bare energy',& & GF_energy_range_mode,verb_level=V_qp) call it(defs,'GTermKind','[GW] GW terminator ("none","BG" Bruneval-Gonze,"BRS" Berger-Reining-Sottile)', GW_terminator_Kind) @@ -277,16 +265,18 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it('f',defs,'ExtendOut', '[GW] Print all variables in the output file',verb_level=V_qp) call it('f',defs,'QPsymmtrz', '[GW] Force symmetrization of states with the same energy',verb_level=V_qp) ! - ! Xx Xs Xd Xp + ! Xx Xs Xd Xp Xm ! call it(defs,'Chimod', '[X] IP/Hartree/ALDA/LRC/PF/BSfxc',Chi_mode,protect=.FALSE.,case="A") call it(defs,'ChiLinAlgMod', '[X] inversion/lin_sys,cpu/gpu',Chi_linalg_mode,verb_level=V_resp,case="A") call Xload(X(2),Xw(2)) call Xload(X(3),Xw(3)) call Xload(X(4),Xw(4)) - call it(defs,'XTermKind','[X] X terminator ("none","BG" Bruneval-Gonze)',X_terminator_Kind) + call Xload(X(5),Xw(5)) + call it(defs,'XTermKind','[X] X terminator ("none","BG" Bruneval-Gonze)',X_terminator_Kind,verb_level=V_resp) call it(defs,'XTermEn', '[X] X terminator energy (only for kind="BG")',X_terminator_E,E_unit,verb_level=V_resp) call it('f',defs,'DrClassic', '[X] Use a classical model for the drude term',verb_level=V_resp) + call it('f',defs,'mpERdb', '[Xm] Write to disk MPA poles and residues') call it('f',defs,'WriteXo', '[X] Write on the-fly the IP response function',verb_level=V_resp) ! ! BSE/BSK @@ -297,7 +287,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,'FXCcutScheme', '[TDDFT] ("none","lower_Gmax","lower_GmGp") ',ALDA_cut_scheme,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,'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) @@ -321,6 +311,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'BSPLInvTrs', '[BSS PL] Inversion treshold',K_INV_PL%treshold) call it(defs,'BEnSteps', '[BSS] Energy steps',BSS_n_freqs) call it(defs,'DrudeWBS', '[BSE] Drude plasmon',BSS_Wd,E_unit,verb_level=V_resp) + call it('f',defs,'FxcLibxc','[BSK] force computing Fxc via libxc',verb_level=V_resp) 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') @@ -390,7 +381,9 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it('f',defs,'QpgFull', '[F RIM] Coulomb interaction: Full matrix',verb_level=V_RL) ! ! RIM-W - call it(defs,'RandGvecW','[RIM-W] Screened interaction RS components',RIM_W_ng,G_unit,verb_level=V_RL) + !call it(defs,'RandGvecW','[RIM-W] Screened interaction RS components',RIM_W_ng,G_unit,verb_level=V_RL) + call it(defs,'RandGvecW','[RIM-W] Screened interaction RS components',RIM_W_ng,G_unit) + call it(defs,'rimw_type','[RIM-W] Screened interaction limit metal/semiconductor/graphene',rimw_type) ! ! CUTOFF ! @@ -400,8 +393,6 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'CUTCylLen','[CUT] [au] Cylinder length',cyl_length) call it(defs,'CUTwsGvec','[CUT] WS cutoff: number of G to be modified',ws_cutoff) call it('f',defs,'CUTCol_test','[CUT] Perform a cutoff test in R-space',verb_level=V_RL) - call it(defs,'GWIter', '[GW] GW self-consistent (evGW) iterations on eigenvalues',GW_iterations,verb_level=V_qp) - call it(defs,'GWoIter', '[GW] GWo self-consistent (evGWo) iterations on eigenvalues',GWo_iterations,verb_level=V_qp) ! ! S_xc ! @@ -626,8 +617,6 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'AC_n_FR', '[ACFDT] Integration frequency points',ACFDT_n_freqs) call it(defs,'AC_E_Rng', '[ACFDT] Imaginary axis 2nd & 3rd energy points',ACFDT_E_range,E_unit) ! - ! GPL_EXCLUDE_END - ! ! DIPOLES ! call it(defs,'DipBands', '[DIP] Bands range for dipoles',Dip%ib,verb_level=V_resp) @@ -655,15 +644,9 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'FANdEtresh','[ELPH] Energy treshold for Fan denominator',FAN_deltaE_treshold,verb_level=V_ph,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) - ! - ! GPL_EXCLUDE_START - ! call it(defs,'ElPhHBRnge','[ELPH] Hamiltonian bands range',elph_Ham_bands) call it(defs,'ElPhHKpt', '[ELPH] Hamiltonian k-point',elph_Ham_ik) call it(defs,'REStresh', '[ELPH] Residual treshold to report in output files',RES_tresh) - ! - ! GPL_EXCLUDE_END - ! call it('f',defs,'WRgFsq','[ELPH] Dump on file gFsq coefficients') #endif ! @@ -789,7 +772,7 @@ subroutine CPU_structure_load() if (i_s==2) possible_fields='(q,g,k,c,v)' ! X_and_IO if (i_s==3) possible_fields='(q,g,k,c,v)' ! X if (i_s==4) possible_fields='(k,eh,t)' ! BS - if (i_s==5) possible_fields='(q,qp,b)' ! SE + if (i_s==5) possible_fields='(q,g,qp,b)' ! SE if (i_s==6) possible_fields='(k,b,q,qp)' ! RT if (i_s==7) possible_fields='(p,d) ' ! SLK if (i_s==8) possible_fields='(w,k) ' ! NL @@ -826,28 +809,32 @@ subroutine Xload(X,wv) ! Work Space ! integer ::i1,V_iq,V_DmRnge - integer,parameter ::n_des=14 + integer,parameter ::n_des=18 character(8) ::nms(n_des),sfx character(100) ::des(n_des) character(schlen) ::lch1,lch2 ! - nms=(/'GrFnTp','EnRnge','DmRnge','CGrdSp','ETStps','EMStps',& + nms=(/'GrFnTp','EnSamp','EnGrid','EnRnge','ImRnge','DmRnge','CGrdSp','ETStps','IntSol','EMStps',& & 'DrudeW','LongDr','EhEngy','PPAPnt',& & 'NGsBlk','QpntsR','BndsRn','DmERef'/) des(1) ='Green`s function (T)ordered,(R)etarded,(r)senant,(a)ntiresonant [T, R, r, Ta, Ra]' - des(2) ='Energy range' - des(3) ='Damping range' - des(4) ='[o/o] Coarse grid controller' - des(5) ='Total Energy steps' - des(6) ='[o/o] Memory Energy steps' - des(7) ='Drude plasmon' - des(8) ='[cc] Electric Field' - des(9) ='Electron-hole energy range' - des(10)='PPA imaginary energy' - des(11)='Response block size' - des(12)='Transferred momenta' - des(13)='Polarization function bands' - des(14)='Damping reference energy' + des(2) ='Frequency sampling in the complex plane ("1l" one line, "2l" two lines)' + des(3) ='Partition along the real axis ("ho" homogeneous, "lP" linear, "qP" quadratic, "cP" cubic)' + des(4) ='Energy range' + des(5) ='Imaginary range' + des(6) ='Damping range' + des(7) ='[o/o] Coarse grid controller' + des(8) ='Total Energy steps' + des(9) ='MPA interpolation solver ("LA" linear algebra, "PT" Pade-Thiele)' + des(10)='[o/o] Memory Energy steps' + des(11)='Drude plasmon' + des(12)='[cc] Electric Field' + des(13)='Electron-hole energy range' + des(14)='PPA imaginary energy' + des(15)='Response block size' + des(16)='Transferred momenta' + des(17)='Polarization function bands' + des(18)='Damping reference energy' ! do i1=1,n_des lch1=des(i1) @@ -856,32 +843,37 @@ subroutine Xload(X,wv) if (X%whoami==2) sfx='Xs' if (X%whoami==3) sfx='Xd' if (X%whoami==4) sfx='Xp' + if (X%whoami==5) sfx='Xm' write (des(i1),'(4a)') '[',trim(sfx),'] ',trim(lch1) write (nms(i1),'(2a)') lch2(1:6),trim(sfx) enddo ! - V_iq =0 + V_iq = 0 V_DmRnge = 0 ! - if (.not.X%whoami==3.and..not.X%whoami==1) then + if (.not.X%whoami==3.and.(.not.X%whoami==5.or.X%whoami==1)) then V_iq = V_resp V_DmRnge = V_resp endif ! call it(defs,nms( 1),des( 1),X%ordering,verb_level=V_resp) - call it(defs,nms( 2),des( 2),wv%er,E_unit,verb_level=0) - call it(defs,nms( 3),des( 3),wv%dr,E_unit,verb_level=V_DmRnge) - call it(defs,nms( 4),des( 4),X%cg_percentual,verb_level=V_resp) - call it(defs,nms( 5),des( 5),wv%n_freqs,verb_level=0) - call it(defs,nms( 6),des( 6),wv%per_memstps,verb_level=V_resp) - call it(defs,nms( 7),des( 7),X%Wd,E_unit,verb_level=V_resp) - call it(defs,nms( 8),des( 8),X%q0,verb_level=0) - call it(defs,nms( 9),des( 9),X%ehe,E_unit,verb_level=V_resp) - call it(defs,nms(10),des(10),X%ppaE,E_unit,verb_level=0) - call it(defs,nms(11),des(11),X%ng,G_unit,verb_level=0) - call it(defs,nms(12),des(12),X%iq,verb_level=V_iq) - call it(defs,nms(13),des(13),X%ib,verb_level=0) - call it(defs,nms(14),des(14),wv%damp_reference,E_unit,verb_level=V_resp) + call it(defs,nms( 2),des( 2),wv%samp_type,verb_level=0) + call it(defs,nms( 3),des( 3),wv%samp_grid,verb_level=0) + call it(defs,nms( 4),des( 4),wv%er,E_unit,verb_level=0) + call it(defs,nms( 5),des( 5),wv%ir,E_unit,verb_level=0) + call it(defs,nms( 6),des( 6),wv%dr,E_unit,verb_level=V_DmRnge) + call it(defs,nms( 7),des( 7),X%cg_percentual,verb_level=V_resp) + call it(defs,nms( 8),des( 8),wv%n_freqs,verb_level=0) + call it(defs,nms( 9),des( 9),wv%mpa_solver,verb_level=0) + call it(defs,nms(10),des(10),wv%per_memstps,verb_level=V_resp) + call it(defs,nms(11),des(11),X%Wd,E_unit,verb_level=V_resp) + call it(defs,nms(12),des(12),X%q0,verb_level=0) + call it(defs,nms(13),des(13),X%ehe,E_unit,verb_level=V_resp) + call it(defs,nms(14),des(14),X%ppaE,E_unit,verb_level=0) + call it(defs,nms(15),des(15),X%ng,G_unit,verb_level=0) + call it(defs,nms(16),des(16),X%iq,verb_level=V_iq) + call it(defs,nms(17),des(17),X%ib,verb_level=0) + call it(defs,nms(18),des(18),wv%damp_reference,E_unit,verb_level=V_resp) ! end subroutine ! @@ -891,7 +883,7 @@ subroutine DIP_mirror_bands_and_Qs(E_in) ! type(levels), intent(in) :: E_in ! - logical :: is_def(15) + logical :: is_def(16) integer :: i1,bands(2),tmp_bands(2) ! if (initmode/=4) return @@ -902,50 +894,52 @@ subroutine DIP_mirror_bands_and_Qs(E_in) call parser('BndsRnXs', is_def(2)) call parser('BndsRnXd', is_def(3)) call parser('BndsRnXp', is_def(4)) - call parser('DipBands', is_def(5)) - call parser('BSEBands', is_def(6)) - call parser('RTBands', is_def(7)) - call parser('SCBands', is_def(8)) - call parser('NLBands', is_def(9)) - call parser('COLLBands',is_def(10)) - call parser('el_photon_corr',is_def(11)) - if (is_def(11)) call parser('life',is_def(11)) - call parser('QpntsRXd',is_def(12)) - call parser('QpntsRXs',is_def(13)) - call parser('QpntsRXx',is_def(14)) - call parser('BSEQptR', is_def(15)) + call parser('BndsRnXm', is_def(5)) + call parser('DipBands', is_def(6)) + call parser('BSEBands', is_def(7)) + call parser('RTBands', is_def(8)) + call parser('SCBands', is_def(9)) + call parser('NLBands', is_def(10)) + call parser('COLLBands',is_def(11)) + call parser('el_photon_corr',is_def(12)) + if (is_def(12)) call parser('life',is_def(12)) + call parser('QpntsRXd',is_def(13)) + call parser('QpntsRXs',is_def(14)) + call parser('QpntsRXx',is_def(15)) + call parser('BSEQptR', is_def(16)) ! ! Q's ! - if (is_def(12).and.runlevel_is_on('optics')) Dip%iq=X(3)%iq - if (is_def(12).and.runlevel_is_on('em1d') ) Dip%iq=X(3)%iq - if (is_def(12).and.runlevel_is_on('ppa') ) Dip%iq=X(4)%iq - if (is_def(13) ) Dip%iq=X(2)%iq - if (is_def(14) ) Dip%iq=X(1)%iq - if (is_def(15).and..not.runlevel_is_on('ppa').and..not.runlevel_is_on('em1s')) Dip%iq=BS_q + if (is_def(13).and.runlevel_is_on('optics')) Dip%iq=X(3)%iq + if (is_def(13).and.runlevel_is_on('em1d') ) Dip%iq=X(3)%iq + if (is_def(13).and.runlevel_is_on('ppa') ) Dip%iq=X(4)%iq + if (is_def(13).and.runlevel_is_on('mpa') ) Dip%iq=X(5)%iq + if (is_def(14) ) Dip%iq=X(2)%iq + if (is_def(15) ) Dip%iq=X(1)%iq + if (is_def(16).and..not.(runlevel_is_on('ppa').or.runlevel_is_on('em1s').or.runlevel_is_on('mpa') )) Dip%iq=BS_q ! ! Bands ! bands=-1 do i1=1,11 if(.not.(is_def(i1))) cycle - if(i1< 5) tmp_bands=X(i1)%ib - if(i1==5) tmp_bands=Dip%ib - if(i1==6) tmp_bands=BS_bands + if(i1< 6) tmp_bands=X(i1)%ib + if(i1==6) tmp_bands=Dip%ib + if(i1==7) tmp_bands=BS_bands #if defined _RT || defined _NL - if(i1==7) tmp_bands=RT_bands + if(i1==8) tmp_bands=RT_bands #endif #if defined _SC - if(i1==8) tmp_bands=SC_bands + if(i1==9) tmp_bands=SC_bands #endif #if defined _NL - if(i1==9) tmp_bands=NL_bands + if(i1==10) tmp_bands=NL_bands #endif #if defined _RT || defined _SC || defined _NL - if(i1==10) tmp_bands=COLL_bands + if(i1==11) tmp_bands=COLL_bands #endif #if defined _QED - if(i1==11) tmp_bands=QP_n_G_bands + if(i1==12) tmp_bands=QP_n_G_bands #endif if(any((/bands==-1/))) then bands(1)=max(tmp_bands(1), 1 ) @@ -969,10 +963,10 @@ subroutine TMP_mirror_bands( ) ! if(initmode/=4) return ! - call parser('SCbands', is_def(1)) - call parser('RTbands', is_def(2)) - call parser('COLLbands',is_def(3)) - call parser('NLbands', is_def(4)) + call parser('SCBands', is_def(1)) + call parser('RTBands', is_def(2)) + call parser('COLLBands',is_def(3)) + call parser('NLBands', is_def(4)) #endif ! #if defined _SC diff --git a/src/interface/INIT_q_points.F b/src/interface/INIT_q_points.F index 4778762681..53dcb17dc4 100644 --- a/src/interface/INIT_q_points.F +++ b/src/interface/INIT_q_points.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! subroutine INIT_q_points( ) ! diff --git a/src/interface/INIT_read_command_line.F b/src/interface/INIT_read_command_line.F index 0354fd4948..73a7c4d782 100644 --- a/src/interface/INIT_read_command_line.F +++ b/src/interface/INIT_read_command_line.F @@ -1,32 +1,16 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2019 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 DS ! 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_elphoton_scatt,l_em1s,l_em1d,l_ppa,l_phel_scatt,l_phel_corr,l_dipoles,l_X +& l_elphoton_scatt,l_em1s,l_em1d,l_ppa,l_mpa,l_phel_scatt,l_phel_corr,l_dipoles,l_X use BS, ONLY:BSK_mode use BS_solvers, ONLY:BSS_mode use X_m, ONLY:Chi_mode @@ -160,14 +144,16 @@ subroutine INIT_read_command_line(rstr,init_) endif ! if ( trim(rstr_piece(i1)) == 'screen') then - l_em1s= STRING_match(trim(rstr_piece(i1+1)),'s') - l_em1d= (STRING_match(trim(rstr_piece(i1+1)),'d') ) - l_ppa = (STRING_match(trim(rstr_piece(i1+1)),'p') ) + l_em1s= (STRING_same(trim(rstr_piece(i1+1)),'s') ) + l_em1d= (STRING_same(trim(rstr_piece(i1+1)),'d') ) + l_ppa = (STRING_same(trim(rstr_piece(i1+1)),'p') ) + l_mpa = (STRING_same(trim(rstr_piece(i1+1)),'m') ) l_X = (STRING_match(trim(rstr_piece(i1+1)),'X') ) if (l_X) call initactivate(1,'Xx') if (l_em1s) call initactivate(1,'em1s') if (l_em1d) call initactivate(1,'em1d') if (l_ppa) call initactivate(1,'ppa') + if (l_mpa) call initactivate(1,'mpa') endif ! ! BSE/LLR @@ -196,14 +182,14 @@ subroutine INIT_read_command_line(rstr,init_) Chi_mode='HARTREE' ! if(l_bse) then - if(STRING_same(trim(rstr_piece(i1+1)) , 'hartree')) BSK_mode='HARTREE' - if(STRING_same(trim(rstr_piece(i1+1)) , 'hf')) BSK_mode='HF' + if( STRING_same(trim(rstr_piece(i1+1)) , 'hartree')) BSK_mode='HARTREE' + if( STRING_same(trim(rstr_piece(i1+1)) , 'hf')) BSK_mode='HF' if( STRING_same(trim(rstr_piece(i1+1)) , 'alda')) BSK_mode='ALDA' - if(STRING_same(trim(rstr_piece(i1+1)) , 'sex')) BSK_mode='SEX' + if( STRING_same(trim(rstr_piece(i1+1)) , 'sex')) BSK_mode='SEX' if( STRING_same(trim(rstr_piece(i1+1)) , 'bsfxc')) BSK_mode='BSfxc' if( STRING_same(trim(rstr_piece(i1+1)) , 'ip')) BSK_mode='IP' - else if(l_chi.or.l_em1s.or.l_em1d.or.l_ppa) then - if(STRING_same(trim(rstr_piece(i1+1)) , 'hartree')) Chi_mode='HARTREE' + else if(l_chi.or.l_em1s.or.l_em1d.or.l_ppa.or.l_mpa) then + if( STRING_same(trim(rstr_piece(i1+1)) , 'hartree')) Chi_mode='HARTREE' if( STRING_same(trim(rstr_piece(i1+1)) , 'alda')) Chi_mode='ALDA' if( STRING_same(trim(rstr_piece(i1+1)) , 'lrc')) Chi_mode='LRC' if( STRING_same(trim(rstr_piece(i1+1)) , 'bsfxc')) Chi_mode='BSfxc' @@ -282,6 +268,11 @@ subroutine INIT_read_command_line(rstr,init_) l_ppa=.TRUE. if (i_cycle==1) QP_solver="n" call initactivate(1,'ppa el_el_corr') + else if (trim(rstr_piece(i1+1))=='m') then + infile_editing=.true. + l_mpa=.TRUE. + QP_solver="n" + call initactivate(1,'mpa el_el_corr') else if (trim(rstr_piece(i1+1))=='c') then infile_editing=.true. if (i_cycle==1) QP_solver="n" diff --git a/src/interface/INIT_read_command_line_corr_scatt.F b/src/interface/INIT_read_command_line_corr_scatt.F index f38c6539d2..170c450c90 100644 --- a/src/interface/INIT_read_command_line_corr_scatt.F +++ b/src/interface/INIT_read_command_line_corr_scatt.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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 ! subroutine INIT_read_command_line_corr_scatt(KIND,STR,POS,l_ee,l_ep,l_pe,l_eh) ! diff --git a/src/interface/INIT_read_command_line_potentials.F b/src/interface/INIT_read_command_line_potentials.F index e0527925b4..c5b45b8b06 100644 --- a/src/interface/INIT_read_command_line_potentials.F +++ b/src/interface/INIT_read_command_line_potentials.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2019 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 ! logical function INIT_read_command_line_potentials(string,potential_user_string) ! diff --git a/src/interface/INIT_report_and_log_files.F b/src/interface/INIT_report_and_log_files.F index 36de1ff02c..607ecf3012 100644 --- a/src/interface/INIT_report_and_log_files.F +++ b/src/interface/INIT_report_and_log_files.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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 ! subroutine INIT_report_and_log_files() ! diff --git a/src/interface/RT_project.dep b/src/interface/RT_project.dep index a58560f906..a91a355ec5 100644 --- a/src/interface/RT_project.dep +++ b/src/interface/RT_project.dep @@ -1,6 +1,10 @@ INIT.o + INIT_DephMatrix.o + INIT_RT_ctl_load.o + INIT_RT_ctl_switch.o INIT_activate.o INIT_check_databases.o INIT_load.o INIT_read_command_line.o + INIT_read_command_line_potentials.o diff --git a/src/interface/SC_project.dep b/src/interface/SC_project.dep index a58560f906..0231fbbfef 100644 --- a/src/interface/SC_project.dep +++ b/src/interface/SC_project.dep @@ -3,4 +3,5 @@ INIT_check_databases.o INIT_load.o INIT_read_command_line.o + INIT_read_command_line_potentials.o diff --git a/src/interpolate/INTERPOLATION_BZ.F b/src/interpolate/INTERPOLATION_BZ.F index e8fa0d051f..3dda591e0f 100644 --- a/src/interpolate/INTERPOLATION_BZ.F +++ b/src/interpolate/INTERPOLATION_BZ.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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): CA ! subroutine INTERPOLATION_BZ(K,NK,ID,R1D,R2D,C1D,C2D,E) use pars, ONLY:SP diff --git a/src/interpolate/INTERPOLATION_BZ_coeff.F b/src/interpolate/INTERPOLATION_BZ_coeff.F index 7df3d9c94e..25a80fa1b7 100644 --- a/src/interpolate/INTERPOLATION_BZ_coeff.F +++ b/src/interpolate/INTERPOLATION_BZ_coeff.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CA, 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. +! Copyright (C) 2011 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. -! -! 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): CA DS AM ! subroutine INTERPOLATION_BZ_coeff(Xk,VALUEs,engre,nvalues,Nk,ID) ! diff --git a/src/interpolate/INTERPOLATION_BZ_setup.F b/src/interpolate/INTERPOLATION_BZ_setup.F index f462a7784a..aad931e273 100644 --- a/src/interpolate/INTERPOLATION_BZ_setup.F +++ b/src/interpolate/INTERPOLATION_BZ_setup.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2011 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): CA ! subroutine INTERPOLATION_BZ_setup(Xk) ! diff --git a/src/interpolate/INTERPOLATION_coefficients.F b/src/interpolate/INTERPOLATION_coefficients.F index acb666a614..0fa2a7fab8 100644 --- a/src/interpolate/INTERPOLATION_coefficients.F +++ b/src/interpolate/INTERPOLATION_coefficients.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): 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. +! Copyright (C) 2006 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): CA DS ! subroutine INTERPOLATION_coefficients(R1D,R2D,C1D,C2D,E,k,Nk,ID,ID_obj) ! diff --git a/src/interpolate/INTERPOLATION_create_the_grid.F b/src/interpolate/INTERPOLATION_create_the_grid.F index d9b7041466..bac5e5c301 100644 --- a/src/interpolate/INTERPOLATION_create_the_grid.F +++ b/src/interpolate/INTERPOLATION_create_the_grid.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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): CA ! subroutine INTERPOLATION_create_the_grid(GRID) ! diff --git a/src/interpolate/INTERPOLATION_driver_do.F b/src/interpolate/INTERPOLATION_driver_do.F index 86801e5b43..86ed41a9b4 100644 --- a/src/interpolate/INTERPOLATION_driver_do.F +++ b/src/interpolate/INTERPOLATION_driver_do.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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 DS ! subroutine INTERPOLATION_driver_do(operation,ID,OUT_k,OUT_E,FineGrid) ! diff --git a/src/interpolate/INTERPOLATION_driver_end.F b/src/interpolate/INTERPOLATION_driver_end.F index e9e32e977b..7cb914054c 100644 --- a/src/interpolate/INTERPOLATION_driver_end.F +++ b/src/interpolate/INTERPOLATION_driver_end.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2012 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. -! -! 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 DS ! subroutine INTERPOLATION_driver_end(ID) ! diff --git a/src/interpolate/INTERPOLATION_driver_seed.F b/src/interpolate/INTERPOLATION_driver_seed.F index cd36cd3d49..cc67320565 100644 --- a/src/interpolate/INTERPOLATION_driver_seed.F +++ b/src/interpolate/INTERPOLATION_driver_seed.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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. -! -! 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 DS ! subroutine INTERPOLATION_driver_seed(operation,ID,dims,SEED_k,SEED_E,SEED_RT,SEED_QP,SEED_R3,& & NEAREST,QUIET,SERIAL) diff --git a/src/interpolate/INTERPOLATION_fourier.F b/src/interpolate/INTERPOLATION_fourier.F index 864057e50b..230b908ee7 100644 --- a/src/interpolate/INTERPOLATION_fourier.F +++ b/src/interpolate/INTERPOLATION_fourier.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CA, 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. +! Copyright (C) 2018 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. -! -! 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): CA AM ! subroutine INTERPOLATION_fourier(K,VALUES,engre,nvalues,NK,ID) ! diff --git a/src/interpolate/INTERPOLATION_integral_respect.F b/src/interpolate/INTERPOLATION_integral_respect.F index d2f2172ee9..06411ff785 100644 --- a/src/interpolate/INTERPOLATION_integral_respect.F +++ b/src/interpolate/INTERPOLATION_integral_respect.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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 ! subroutine INTERPOLATION_integral_respect(ID,OUT_k,OUT,NK) ! diff --git a/src/interpolate/INTERPOLATION_nearest_E.F b/src/interpolate/INTERPOLATION_nearest_E.F index 3959ea39ce..948af32da4 100644 --- a/src/interpolate/INTERPOLATION_nearest_E.F +++ b/src/interpolate/INTERPOLATION_nearest_E.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2012 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. -! -! 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 DS ! subroutine INTERPOLATION_nearest_E(Energy,qp,E_diff_tresh,i_qp_ref,i_sp_pol) ! diff --git a/src/interpolate/INTERPOLATION_nearest_k.F b/src/interpolate/INTERPOLATION_nearest_k.F index 3091a357d9..a931032a43 100644 --- a/src/interpolate/INTERPOLATION_nearest_k.F +++ b/src/interpolate/INTERPOLATION_nearest_k.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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): DS AM ! subroutine INTERPOLATION_nearest_k(K_in,V_in,K_out,V_out) ! diff --git a/src/interpolate/INTERPOLATION_vec_in_star.F b/src/interpolate/INTERPOLATION_vec_in_star.F index ac04e6f9db..5ac813b2ff 100644 --- a/src/interpolate/INTERPOLATION_vec_in_star.F +++ b/src/interpolate/INTERPOLATION_vec_in_star.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CA, 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. +! Copyright (C) 2006 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. -! -! 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): CA AM ! logical function INTERPOLATION_vec_in_star(vec,nstar,star_vec) ! diff --git a/src/io/.objects b/src/io/.objects index aff74a8293..6962cdbb0c 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_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_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 cde6f2310e..50ca185728 100644 --- a/src/io/DOUBLE_project.dep +++ b/src/io/DOUBLE_project.dep @@ -14,6 +14,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/io/RT_SCATT_project.dep b/src/io/RT_SCATT_project.dep deleted file mode 100644 index a75397278f..0000000000 --- a/src/io/RT_SCATT_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - io_RT_components.o - diff --git a/src/io/io_ATMPROJ_pwscf.F b/src/io/io_ATMPROJ_pwscf.F index 2d4b6dbade..3843f22881 100644 --- a/src/io/io_ATMPROJ_pwscf.F +++ b/src/io/io_ATMPROJ_pwscf.F @@ -1,30 +1,14 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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): DS ! integer function io_ATMPROJ_pwscf(ID) ! use atom_proj - use pars, ONLY:IP,SP,schlen,cZERO + use pars, ONLY:IP,SP,schlen,cZERO,IP_YIO use electrons, ONLY:n_sp_pol use stderr, ONLY:intc use R_lattice, ONLY:nkibz @@ -75,7 +59,7 @@ integer function io_ATMPROJ_pwscf(ID) endif ! varname="ATOM_PROJ_TABLE" - call def_variable_bulk(ID,trim(varname),1,shape(atomic_table),IP+100) + call def_variable_bulk(ID,trim(varname),1,shape(atomic_table),IP_YIO) call io_variable_bulk(ID,1,I2=atomic_table) ! endif diff --git a/src/io/io_BSS_Haydock.F b/src/io/io_BSS_Haydock.F index 23d1334cb1..e3319e7aa3 100644 --- a/src/io/io_BSS_Haydock.F +++ b/src/io/io_BSS_Haydock.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, DS +! Copyright (C) 2015 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. -! -! 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. +! Authors (see AUTHORS file for details): AM DS ! integer function io_BSS_Haydock(ID,iq,it,reached_treshold,mode,Af,Bf,Cf,Vnm1,Vn,Vnp1) ! diff --git a/src/io/io_BSS_diago.F b/src/io/io_BSS_diago.F index 321efe5a7e..05e263801c 100644 --- a/src/io/io_BSS_diago.F +++ b/src/io/io_BSS_diago.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! 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) diff --git a/src/io/io_BSS_invert.F b/src/io/io_BSS_invert.F index e8a3c5cdca..a712ff3baa 100644 --- a/src/io/io_BSS_invert.F +++ b/src/io/io_BSS_invert.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! integer function io_BSS_invert(iq,W,ID) ! diff --git a/src/io/io_BS_Fxc.F b/src/io/io_BS_Fxc.F index 79d36146ff..508dcb6bd6 100644 --- a/src/io/io_BS_Fxc.F +++ b/src/io/io_BS_Fxc.F @@ -1,29 +1,13 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! integer function io_BS_Fxc(iq,FXC_W,ID,X) ! - use pars, ONLY:schlen,IP + use pars, ONLY:schlen,IP,IP_YIO use units, ONLY:HA2EV use stderr, ONLY:intc use BS, ONLY:BS_K_dim @@ -72,7 +56,7 @@ integer function io_BS_Fxc(iq,FXC_W,ID,X) ! if (io_BS_Fxc/=0) goto 1 ! - call def_variable_elemental(ID,"FXC_parameters",11,IP+100,0) + call def_variable_elemental(ID,"FXC_parameters",11,IP_YIO,0) ! call io_variable_elemental(ID,DB_I0=FXC_n_g_db,& & VAR=" FXC|Matrix size ",I0=FXC_n_g_corr,CHECK=.true.,OP=(/"<="/),DESCRIPTOR=FXC_desc) diff --git a/src/io/io_COL_CUT.F b/src/io/io_COL_CUT.F index a751dbeb68..26998bd959 100644 --- a/src/io/io_COL_CUT.F +++ b/src/io/io_COL_CUT.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! integer function io_COL_CUT(ID) ! diff --git a/src/io/io_DB1.F b/src/io/io_DB1.F index 90b2f2ec9e..93d2bd5a0e 100644 --- a/src/io/io_DB1.F +++ b/src/io/io_DB1.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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 ! integer function io_DB1(E,k,ID) ! diff --git a/src/io/io_DB1_selective_scan.F b/src/io/io_DB1_selective_scan.F index 9faeda6539..25c172a782 100644 --- a/src/io/io_DB1_selective_scan.F +++ b/src/io/io_DB1_selective_scan.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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 ! integer function io_DB1_selective_scan(what,DB1_path,E,k,db1_alat,db1_a,COM_mode) ! diff --git a/src/io/io_Double_Grid.F b/src/io/io_Double_Grid.F index 2a6637d859..c6fb60acba 100644 --- a/src/io/io_Double_Grid.F +++ b/src/io/io_Double_Grid.F @@ -1,29 +1,13 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! integer function io_Double_Grid(E,Xk,ID,what) ! - use pars, ONLY:schlen + use pars, ONLY:schlen,IP_YIO,CR_YIO use electrons, ONLY:levels,FineGd_E_components_alloc use descriptors, ONLY:IO_desc_reset use R_lattice, ONLY:bz_samp,BZ_FineGd_mode,bz_samp_FineGd_alloc,FineGd_desc @@ -83,17 +67,17 @@ integer function io_Double_Grid(E,Xk,ID,what) ! if (io_Double_Grid/=0) goto 1 ! - call def_variable_elemental(ID,VAR="GLOBAL_SYMM_MODE",VAR_SZ=1,VAR_KIND=0,MENU=0) + call def_variable_elemental(ID,VAR="GLOBAL_SYMM_MODE",VAR_SZ=1,VAR_KIND=CR_YIO,MENU=0) call io_variable_elemental(ID,CH0=BZ_FineGd_mode,VAR=' [FineGd] Brillouin Symmetry mode'& & ,CHECK=.TRUE.,OP=(/"=="/),DESCRIPTOR=FineGd_desc) - call def_variable_elemental(ID,VAR="BZ_SYMM_MODE",VAR_SZ=1,VAR_KIND=0,MENU=0) + call def_variable_elemental(ID,VAR="BZ_SYMM_MODE",VAR_SZ=1,VAR_KIND=CR_YIO,MENU=0) call io_variable_elemental(ID,CH0=Xk%FGbz%FG_mode,VAR=' [FineGd] Fine Grid BZ mapped mode'& & ,DESCRIPTOR=FineGd_desc) - call def_variable_elemental(ID,VAR="IBZ_SYMM_MODE",VAR_SZ=1,VAR_KIND=0,MENU=0) + call def_variable_elemental(ID,VAR="IBZ_SYMM_MODE",VAR_SZ=1,VAR_KIND=CR_YIO,MENU=0) call io_variable_elemental(ID,CH0=Xk%FGibz%FG_mode,VAR=' [FineGd] Fine Grid IBZ mapped mode'& & ,DESCRIPTOR=FineGd_desc) ! - call def_variable_elemental(ID,VAR="PARS",VAR_SZ=5,VAR_KIND=IP+100,MENU=0) + call def_variable_elemental(ID,VAR="PARS",VAR_SZ=5,VAR_KIND=IP_YIO,MENU=0) call io_variable_elemental(ID,I0=E%FG%nb,VAR=' [FineGd] Bands',DESCRIPTOR=FineGd_desc) call io_variable_elemental(ID,I0=E%FG%nk,VAR=' [FineGd] Number of pts (Energy grid)'& & ,DESCRIPTOR=FineGd_desc) @@ -103,11 +87,11 @@ integer function io_Double_Grid(E,Xk,ID,what) call io_variable_elemental(ID,I0=Xk%FGbz%N,VAR=' [FineGd] Number of pts (fine+coarse, BZ-map)'& & ,DESCRIPTOR=FineGd_desc) ! - call def_variable_elemental(ID,VAR="",VAR_SZ=0,VAR_KIND=0,MENU=1) + call def_variable_elemental(ID,VAR="",VAR_SZ=0,VAR_KIND=CR_YIO,MENU=1) ! #if defined _ELPH if(l_PH_DG) then - call def_variable_elemental(ID,VAR="EKplusQmode",VAR_SZ=1,VAR_KIND=0,MENU=0) + call def_variable_elemental(ID,VAR="EKplusQmode",VAR_SZ=1,VAR_KIND=CR_YIO,MENU=0) call io_variable_elemental(ID,CH0=EkplusQ_mode,VAR='[Ekpq_mode] E(k+q) energy mode'& & ,CHECK=.TRUE.,OP=(/"=="/),DESCRIPTOR=FineGd_desc) endif @@ -180,15 +164,15 @@ subroutine elemental_IO(FG,what,kind) VAR_NAME=kind//"_"//what ! if (what=="N_MAPPED") then - call def_variable_bulk(ID, trim(VAR_NAME),2, VAR_SZ=shape(FG%N_mapped),VAR_KIND=IP+100,silent=.TRUE. ) + call def_variable_bulk(ID, trim(VAR_NAME),2, VAR_SZ=shape(FG%N_mapped),VAR_KIND=IP_YIO,silent=.TRUE. ) call io_variable_bulk(ID,2, I1=FG%N_mapped ) endif if (what=="K_RANGE") then - call def_variable_bulk(ID, trim(VAR_NAME),3, VAR_SZ=shape(FG%k_range),VAR_KIND=IP+100,silent=.TRUE. ) + call def_variable_bulk(ID, trim(VAR_NAME),3, VAR_SZ=shape(FG%k_range),VAR_KIND=IP_YIO,silent=.TRUE. ) call io_variable_bulk(ID,3, I2=FG%k_range ) endif if (what=="K_MAP") then - call def_variable_bulk(ID, trim(VAR_NAME),4, VAR_SZ=shape(FG%k_map),VAR_KIND=IP+100,silent=.TRUE. ) + call def_variable_bulk(ID, trim(VAR_NAME),4, VAR_SZ=shape(FG%k_map),VAR_KIND=IP_YIO,silent=.TRUE. ) call io_variable_bulk(ID,4, I1=FG%k_map ) endif if (what=="WEIGHTS") then @@ -200,7 +184,7 @@ subroutine elemental_IO(FG,what,kind) call io_variable_bulk(ID,6, R2=FG%pt ) endif if (what=="E_MAP") then - call def_variable_bulk(ID, trim(VAR_NAME),7, VAR_SZ=shape(FG%E_map),VAR_KIND=IP+100,silent=.TRUE. ) + call def_variable_bulk(ID, trim(VAR_NAME),7, VAR_SZ=shape(FG%E_map),VAR_KIND=IP_YIO,silent=.TRUE. ) call io_variable_bulk(ID,7, I1=FG%E_map ) endif end subroutine diff --git a/src/io/io_ELPH.F b/src/io/io_ELPH.F index f9532a5f49..54a0f728ce 100644 --- a/src/io/io_ELPH.F +++ b/src/io/io_ELPH.F @@ -1,27 +1,10 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM 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. +! Copyright (C) 2015 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 AC ! -#if defined _ELPH integer function io_ELPH(ID,what) ! use pars, ONLY:schlen @@ -153,4 +136,3 @@ integer function io_ELPH(ID,what) call timing("io_ELPH",OPR="STOP") ! end function -#endif diff --git a/src/io/io_E_SOC_map.F b/src/io/io_E_SOC_map.F index 97b37518af..6ae0394cdc 100644 --- a/src/io/io_E_SOC_map.F +++ b/src/io/io_E_SOC_map.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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): DS ! integer function io_E_SOC_map(En,kpt,ID) ! diff --git a/src/io/io_GROT.F b/src/io/io_GROT.F index 6ebe0b5318..3f60e63c2c 100644 --- a/src/io/io_GROT.F +++ b/src/io/io_GROT.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! integer function io_GROT(io_db) ! diff --git a/src/io/io_HF_and_locXC.F b/src/io/io_HF_and_locXC.F index 703b8f6354..00e80da994 100644 --- a/src/io/io_HF_and_locXC.F +++ b/src/io/io_HF_and_locXC.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! integer function io_HF_and_locXC(ID) ! diff --git a/src/io/io_KB_abinit.F b/src/io/io_KB_abinit.F index 828ca081f3..e8eced81d8 100644 --- a/src/io/io_KB_abinit.F +++ b/src/io/io_KB_abinit.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! integer function io_KB_abinit(ID) ! diff --git a/src/io/io_KB_pwscf.F b/src/io/io_KB_pwscf.F index 88a8c02904..e3b798193d 100644 --- a/src/io/io_KB_pwscf.F +++ b/src/io/io_KB_pwscf.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 DS ! integer function io_KB_pwscf(ID) ! diff --git a/src/io/io_KB_real_space.F b/src/io/io_KB_real_space.F index 7cfc8d0194..14aa291119 100644 --- a/src/io/io_KB_real_space.F +++ b/src/io/io_KB_real_space.F @@ -1,27 +1,10 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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 ! -#if defined _SC || defined _RT integer function io_KB_real_space(ID,kbv_real_space,kbv_real_space_table) ! use pars, ONLY:SP @@ -87,4 +70,3 @@ integer function io_KB_real_space(ID,kbv_real_space,kbv_real_space_table) 1 call io_disconnect(ID=ID) ! end function io_KB_real_space -#endif diff --git a/src/io/io_MPA.F b/src/io/io_MPA.F new file mode 100644 index 0000000000..cd1e98a335 --- /dev/null +++ b/src/io/io_MPA.F @@ -0,0 +1,206 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2014 The Yambo Team +! +! Authors (see AUTHORS file for details): DALV AF +! +integer function io_MPA(X,Xw,ID) + ! + use pars, ONLY:SP,schlen + use units, ONLY:HA2EV + use R_lattice, ONLY:nqibz,g_vec + 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_bulk,io_header,& +& def_variable_bulk,io_variable_bulk,def_variable_elemental,io_variable_elemental,& +& io_fragment,ver_is_gt_or_eq + use IO_m, ONLY:io_sec,io_com,io_status,read_is_on,write_is_on,io_serial_number,serial_number,& +& NONE,IO_INCOMPATIBLE_VAR,io_MULTIPOLE,IO_NOT_ALLOWED,io_extension,& +& IO_OUTDATED_DB,frag_MULTIPOLE,IO_NO_DATABASE,io_mode,DUMP,frag_RESPONSE + use stderr, ONLY:intc + use timing_m, ONLY:timing + use mpa_m, ONLY:MPA_E_mat,MPA_R_mat,MPA_freqs,MPA_alloc + ! +#include + ! + type(X_t) :: X + type(w_samp):: Xw + integer :: ID + ! + !Work Space + ! + integer :: sec_size,i1,iq,i_err,io_com_save,io_err,ID_frag + logical :: different_db_RL_order + character(schlen) :: ch,db_desc + character(2) :: local_XC_KIND + real(SP), allocatable :: RL_vecs_disk(:,:) + complex(SP),allocatable :: X_on_disk(:,:) + ! + integer, external :: variables_MPA + ! + ! checks & return + ! + if (.not.io_MULTIPOLE) then + io_MPA=IO_NOT_ALLOWED + call io_disconnect(ID,FORCE=.TRUE.) + return + endif + ! + call timing('io_MPA',OPR='start') + ! + different_db_RL_order=.false. + ! + ID_frag=0 + ! + io_extension(ID)='mpa_ER' + ! + iq=0 + do i1=1,size(io_sec(ID,:)) + if (io_sec(ID,i1)==0) cycle + iq=io_sec(ID,i1)/2 + enddo + ! + io_MPA=io_connect(desc=trim(io_extension(ID)),type=2,ID=ID,FORCE_READ_MODE=iq>0.and.frag_RESPONSE) + if (io_MPA/=0) goto 1 + ! + if (any((/io_sec(ID,:)==1/))) then + ! + ! Header + ! + io_MPA=io_header(ID,QPTS=.true.,R_LATT=.true.,WF=.false.,FRAG=frag_MULTIPOLE) + if (io_MPA/=0) goto 1 + ! + ! Global Descriptions + !===================== + ! + io_MPA=variables_MPA(ID,MPA_desc,X) + if (io_MPA/=0) goto 1 + ! + ! Close & Menu lower line + ! + if (.not.any((/io_sec(ID,:)==2/))) then + call io_elemental(ID,VAR="",VAR_SZ=0,MENU=1) + io_MPA=io_status(ID) + if (io_MPA/=0) goto 1 + else + call io_elemental(ID,VAR="",VAR_SZ=0,MENU=0) + endif + endif + ! + if (iq==0) goto 1 + ! + call io_fragment(ID,ID_frag,i_fragment=iq,ierr=io_err) + io_MPA=io_err + if (io_err/=0) goto 1 + ! + ! 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) + call def_variable_elemental(ID_frag,trim(ch),sec_size,SP,1) + ! + 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,"",0,0,1) + io_MPA=io_status(ID_frag) + ! + io_com(ID_frag)=io_com_save + ! + if (io_MPA/=0) goto 1 + ! + endif + ! + if (any((/io_sec(ID,:)==2*iq+1/))) then + ! + ! Xw%p + ! + if (read_is_on(ID)) then + YAMBO_FREE(Xw%p) + YAMBO_ALLOC(Xw%p,(Xw%n_freqs)) + endif + ! + ! poles @iq + ! + ch="MPA_E_Q_"//trim(intc(iq)) + ! + ! + call def_variable_bulk(ID_frag,trim(ch),1,(/2,shape(MPA_E_mat)/),SP) + call io_variable_bulk(ID_frag,1,C3=MPA_E_mat,IPOS=(/1,1,1,1/)) + ! + ! residues @iq + ! + ch="MPA_R_Q_"//trim(intc(iq)) + ! + call def_variable_bulk(ID_frag,trim(ch),1,(/2,shape(MPA_R_mat)/),SP) + call io_variable_bulk(ID_frag,1,C3=MPA_R_mat,IPOS=(/1,1,1,1/)) + ! + if (read_is_on(ID) .and. different_db_RL_order) then + call error('[io_MPA] different_db_RL_order not implemented') + ! + YAMBO_ALLOC(X_on_disk,(X%ng,X%ng)) + do i1=1,Xw%n_freqs + X_on_disk=X_mat(:,:,i1) + X_mat(X_RLcomp_ig(:),X_RLcomp_ig(:),i1)=X_on_disk + enddo + YAMBO_FREE(X_on_disk) + endif + ! + endif + ! + ! Sections 1 & 2 are used in VERIFY mode. + ! Now that the menu is closed I can return with io_MPA/=0 if there is a restart point + ! + if (io_mode(ID)/=DUMP) then + io_MPA=IO_NO_DATABASE + if (io_err==0) io_MPA=iq + endif + ! +1 call io_fragment_disconnect(ID,ID_frag) + call io_disconnect(ID) + ! + call timing('io_MPA',OPR='stop') + ! +end function +! +! +integer function variables_MPA(ID,local_desc,X) + ! + use pars, ONLY:schlen,lchlen + use units, ONLY:HA2EV + use descriptors, ONLY:IO_desc,IO_desc_reset + use X_m, ONLY:X_t + use IO_int, ONLY:io_elemental,ver_is_gt_or_eq + use IO_m, ONLY:io_status,read_is_on + implicit none + ! + integer ::ID + type(IO_desc) ::local_desc + type(X_t) ::X + ! + ! Work Space + ! + integer ::i_local_desc,sec_size + character(schlen) ::X_label,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) + ! + variables_MPA=io_status(ID) + ! +end function diff --git a/src/io/io_NL.F b/src/io/io_NL.F index fb97190a83..df331f2efc 100644 --- a/src/io/io_NL.F +++ b/src/io/io_NL.F @@ -1,39 +1,24 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): MG CA ! -! 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 _NL integer function io_NL(what,ID) ! - use pars, ONLY:schlen + use pars, ONLY:schlen,SP,IP,LP,IP_YIO,LP_YIO,CR_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 +& n_frequencies,NL_J_t use real_time, ONLY:NE_steps + use fields, ONLY:n_ext_fields 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 - use IO_int, ONLY:io_connect,io_disconnect,io_bulk,io_header,& -& io_fragment,io_elemental + use IO_int, ONLY:io_connect,io_disconnect,io_bulk,io_header,def_variable_elemental,& +& io_fragment,io_elemental,io_variable_elemental + use stderr, ONLY:intc ! #if defined _TIMING use timing_m, ONLY:timing @@ -113,34 +98,40 @@ integer function io_NL(what,ID) ! if(what=="Nonlinear_REF") goto 2 ! - ! Efield - ! - 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="",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 ",& - & R1=Efield(i_Prb)%versor,WARN=.true.,OP=(/"==","==","=="/)) - call io_elemental(ID_frag,VAR="[FIELDs] Intensity [kWCMm2] ",& - & R0=Efield(i_Prb)%intensity,CHECK=.true.,OP=(/"=="/),UNIT=AU2KWCMm2) - call io_elemental(ID_frag,VAR="[FIELDs] Field width [fs] ",& - & R0=Efield(i_Prb)%width,CHECK=.true.,OP=(/"=="/)) - call io_elemental(ID_frag,VAR="[FIELDs] Frequency range [eV] ",& - & R1=Efield(i_Prb)%frequency,CHECK=.true.,OP=(/"==","=="/),UNIT=HA2EV) - call io_elemental(ID_frag,VAR="[FIELDs] Frequency steps ",& - & I0=Efield(i_Prb)%n_frequencies,CHECK=.true.,OP=(/"=="/)) - call io_elemental(ID_frag,VAR="[FIELDs] Frequency step [eV] ",& - & R0=Efield(i_Prb)%W_step,CHECK=.true.,OP=(/"=="/),UNIT=HA2EV) - call io_elemental(ID_frag,VAR='[FIELDs] 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,VAR="",VAR_SZ=0,MENU=0) + ! Efields are stored in each fragment with the different parameters + ! + do i_Prb=1,n_ext_fields + call def_variable_elemental(ID_frag,"Field_Name_"//trim(intc(i_Prb)),1,CR_YIO,0) + call io_variable_elemental(ID_frag,CH0=Efield(i_Prb)%ef_name,VAR=' [FIELDs] Type ',CHECK=.true.,OP=(/"=="/)) + + call def_variable_elemental(ID_frag,"Field_Versor_"//trim(intc(i_Prb)),3,SP,0) + call io_variable_elemental(ID_frag,VAR="[FIELDs] Versor ",R1=Efield(i_Prb)%versor, & +& WARN=.true.,OP=(/"==","==","=="/)) + call def_variable_elemental(ID_frag,"Field_Intensity_"//trim(intc(i_Prb)),1,SP,0) + call io_variable_elemental(ID_frag,VAR="[FIELDs] Intensity ",TERMINATOR="[kWCMm2]",& +& R0=Efield(i_Prb)%intensity,CHECK=.true.,OP=(/"=="/),UNIT=AU2KWCMm2) + + call def_variable_elemental(ID_frag,"Field_Damping_"//trim(intc(i_Prb)),1,SP,0) + 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 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) + + enddo ! ! Polarization ! @@ -150,6 +141,12 @@ integer function io_NL(what,ID) ! if(what=="Nonlinear_REF") goto 1 ! + ! Current + ! + write (VAR_name,'(a,i4.4)') 'NL_J_freq_',i_fragment + call io_bulk(ID_frag,VAR=trim(VAR_name),VAR_SZ=shape(NL_J_t)) + call io_bulk(ID_frag,R2=NL_J_t) + ! ! E_ext ! write (VAR_name,'(a,i4.4)') 'E_ext_freq_',i_fragment @@ -177,4 +174,3 @@ integer function io_NL(what,ID) #endif ! end function -#endif diff --git a/src/io/io_NLCC_pwscf.F b/src/io/io_NLCC_pwscf.F index ef8b19ae8d..16e97adaa9 100644 --- a/src/io/io_NLCC_pwscf.F +++ b/src/io/io_NLCC_pwscf.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AF -! -! 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. +! Copyright (C) 2017 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): AF ! integer function io_NLCC_pwscf(ID) ! diff --git a/src/io/io_PH.F b/src/io/io_PH.F index 1fcfa93728..6bb24f3728 100644 --- a/src/io/io_PH.F +++ b/src/io/io_PH.F @@ -1,31 +1,14 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! -#if defined _PHEL integer function io_PH(ID) ! use units, ONLY:HA2EV - use pars, ONLY:SP,schlen + use pars, ONLY:SP,schlen,CR_YIO use R_lattice, ONLY:nqbz use QP_m, ONLY:QP_G_damp,l_extended_output,QP_solver,On_Mass_Shell_approx use X_m, ONLY:X_DbGd_percentual @@ -54,10 +37,10 @@ integer function io_PH(ID) ! if (any((/io_sec(ID,:)==1/))) then call IO_desc_reset(PHEL_desc) - call def_variable_elemental(ID,"CH_PHEL_PARAMETERS",1,0,0) + call def_variable_elemental(ID,"CH_PHEL_PARAMETERS",1,CR_YIO,0) call io_variable_elemental(ID,VAR="[PHEL] Self-Energy mode",CH0=PH_Self_Energy_mode,DESCRIPTOR=PHEL_desc,& & CHECK=.TRUE.,OP=(/"=="/)) - call def_variable_elemental(ID,"CH_PHEL_SOLVER",1,0,0) + call def_variable_elemental(ID,"CH_PHEL_SOLVER",1,CR_YIO,0) call io_variable_elemental(ID,VAR="[PHEL] Solver",CH0=QP_solver,DB_CH0=QP_solver_disk,DESCRIPTOR=PHEL_desc,& & CHECK=.TRUE.,OP=(/"=="/)) call def_variable_elemental(ID,"PHEL_PARAMETERS",13,SP,0) @@ -138,4 +121,3 @@ integer function io_PH(ID) call io_disconnect(ID=ID) ! end function -#endif diff --git a/src/io/io_QINDX.F b/src/io/io_QINDX.F index 186e4bd399..47068435e5 100644 --- a/src/io/io_QINDX.F +++ b/src/io/io_QINDX.F @@ -1,33 +1,27 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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 DS ! -! 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 Read and write scattering indexes +! +! io_sec=1 general parameters +! io_sec=2 q-points +! io_sec=3 qindx_X +! io_sec=4 qindx_S +! io_sec=5 qindx_B +! io_Sec=6 qindx_C ! integer function io_QINDX(Xk,q,io_db) ! - use pars, ONLY:SP,IP + 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,& & bse_scattering,QP_states_k,nXkibz,qindx_alloc,& & Xk_grid_is_uniform,bz_samp,nXkbz,coll_scattering,q_pt,& -& sigma_scattering,X_scattering,k_GRIDS_string +& 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 use IO_int, ONLY:io_connect,io_disconnect,& @@ -43,7 +37,7 @@ integer function io_QINDX(Xk,q,io_db) ! ! Work Space ! - integer :: ioScatt,id_frag + integer :: ioScatt,id_frag,n_pars ! call timing('io_QINDX',OPR='start') ! @@ -54,38 +48,39 @@ integer function io_QINDX(Xk,q,io_db) ! io_QINDX=io_header(io_db,IMPOSE_SN=.true.,FRAG=frag_QINDX) ! - ! In V. 3.0.7 a real parameter (RL_v_comp_norm) has been removed - ! In revision 3085 the coll indx has been ceated with two new logicals - ! in the header - ! - if (.not.ver_is_gt_or_eq(io_db,revision=5545)) io_QINDX=IO_OUTDATED_DB + if (.not.ver_is_gt_or_eq(io_db,revision=22000)) io_QINDX=IO_OUTDATED_DB if (io_QINDX/=0) goto 1 ! - if (.not.ver_is_gt_or_eq(io_db,revision=18984)) call def_variable_elemental(io_db,"PARS",9,SP,0) - if ( ver_is_gt_or_eq(io_db,revision=18984)) call def_variable_elemental(io_db,"PARS",7,SP,0) + call def_variable_elemental(io_db,"nXkbz",1,IP_YIO,0) + call io_variable_elemental(io_db,VAR="Polarization last K ( bz)",I0=nXkbz) + ! + call def_variable_elemental(io_db,"nXkibz",1,IP_YIO,0) + call io_variable_elemental(io_db,VAR="Polarization last K (ibz)",I0=nXkibz) ! - call io_variable_elemental(io_db,I0=nXkbz) - call io_variable_elemental(io_db,VAR="Polarization last K",I0=nXkibz) + call def_variable_elemental(io_db,"QP_states_k",2,IP_YIO,0) call io_variable_elemental(io_db,VAR="QP states",I1=QP_states_k,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 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,"qindx_S_max_Go",1,IP_YIO,0) + call io_variable_elemental(io_db,I0=qindx_S_max_Go) + ! + call def_variable_elemental(io_db,"Xk_grid_is_uniform",1,LP_YIO,0) call io_variable_elemental(io_db,VAR="X grid is uniform",L0=Xk_grid_is_uniform) - io_QINDX=io_status(io_db) - if (ver_is_gt_or_eq(io_db,revision=18984)) then - call def_variable_elemental(io_db,"CH_GRIDS",1,0,0) - call io_variable_elemental(io_db,VAR="Grids",CH0=k_GRIDS_string,CHECK=.TRUE.,OP=(/"=="/)) - call def_variable_elemental(io_db,"GRID_LOGICALS",4,SP,0) - endif ! - call io_variable_elemental(io_db,VAR="BS scattering",L0=bse_scattering,CHECK=.true.,OP=(/"=="/)) - call io_variable_elemental(io_db,VAR="COLL scattering",L0=coll_scattering,CHECK=.true.,OP=(/"=="/)) + io_QINDX=io_status(io_db) ! - if (ver_is_gt_or_eq(io_db,revision=18984)) then - call io_variable_elemental(io_db,VAR="Sigma scattering",L0=sigma_scattering,CHECK=.true.,OP=(/"=="/)) - call io_variable_elemental(io_db,VAR="X scattering",L0=X_scattering,CHECK=.true.,OP=(/"=="/)) - endif + call def_variable_elemental(io_db,"GRIDS_CH",1,CR_YIO,0) + call io_variable_elemental(io_db,VAR="Grids (string)",CH0=k_GRIDS_string,CHECK=.FALSE.) + call def_variable_elemental(io_db,"GRIDS_IV",4,IP_YIO,0) + call io_variable_elemental(io_db,VAR="Grids (int-vector)",I1=k_GRIDS_vector,CHECK=.TRUE.,OP=(/"<=","<=","<=","<="/)) ! call def_variable_elemental(io_db,"",0,0,1) + ! ioScatt=io_status(io_db) nqbz=q%nbz nqibz=q%nibz @@ -130,7 +125,7 @@ integer function io_QINDX(Xk,q,io_db) ! io_extension(io_db)='kindx' call io_fragment(io_db,id_frag,i_fragment=1) - call def_variable_bulk(id_frag,"Qindx",1,shape(qindx_X),IP+100) + call def_variable_bulk(id_frag,"Qindx",1,shape(qindx_X),IP_YIO) call io_variable_bulk(id_frag,1,I3=qindx_X) call io_fragment_disconnect(io_db,id_frag) ! @@ -145,7 +140,7 @@ integer function io_QINDX(Xk,q,io_db) ! io_extension(io_db)='kindx' call io_fragment(io_db,id_frag,i_fragment=2) - call def_variable_bulk(id_frag,"Sindx",2,shape(qindx_S),IP+100) + call def_variable_bulk(id_frag,"Sindx",2,shape(qindx_S),IP_YIO) call io_variable_bulk(id_frag,2,I3=qindx_S) call io_fragment_disconnect(io_db,id_frag) ! @@ -160,7 +155,7 @@ integer function io_QINDX(Xk,q,io_db) ! io_extension(io_db)='kindx' 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') + call def_variable_bulk(id_frag,"Bindx",3,(/nXkbz,nXkbz,2/),IP_YIO,par_io_kind='independent') ! 46341 is the sqare root of the maximum integer 2147483647 ! qindx_B is size nXkbz*nXkbz ! NETCDF has problems in reading when this number overcomes 2147483647 @@ -193,14 +188,14 @@ integer function io_QINDX(Xk,q,io_db) endif ! if (any((/io_sec(io_db,:)==6/))) then - if (coll_scattering.and.ver_is_gt_or_eq(io_db,revision=3085)) then + if (coll_scattering) then if (read_is_on(io_db)) call qindx_alloc('C') ! ! Fragmentation (4): COLL indx ! io_extension(io_db)='kindx' call io_fragment(io_db,id_frag,i_fragment=4) - call def_variable_bulk(id_frag,"Cindx",4,shape(qindx_C),IP+100) + call def_variable_bulk(id_frag,"Cindx",4,shape(qindx_C),IP_YIO) call io_variable_bulk(id_frag,4,I3=qindx_C) call io_fragment_disconnect(io_db,id_frag) endif @@ -214,7 +209,7 @@ end function io_QINDX ! integer function qindx_B_init(ID,ID_frag) ! - use pars, ONLY:IP + use pars, ONLY:IP,IP_YIO 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 @@ -227,7 +222,7 @@ integer function qindx_B_init(ID,ID_frag) qindx_B_init=io_connect(desc='kindx',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') + call def_variable_bulk(ID_frag,"Bindx",3,(/nXkbz,nXkbz,2/),IP_YIO,par_io_kind='independent') ! call io_control(ACTION=RD,ID=ID_frag) ! diff --git a/src/io/io_QP_and_GF.F b/src/io/io_QP_and_GF.F index 6936070c79..ba7eb37a96 100644 --- a/src/io/io_QP_and_GF.F +++ b/src/io/io_QP_and_GF.F @@ -1,32 +1,15 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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 ! integer function io_QP_and_GF(what,qp,ID) use pars, ONLY:SP,schlen use D_lattice, ONLY:alat use electrons, ONLY:n_sp_pol - use QP_m, ONLY:QP_t,QP_G_dr,QP_G_er,GW_iterations,& -& GWo_iterations,GF_is_causal,QP_G_Zoom_treshold + use QP_m, ONLY:QP_t,QP_G_dr,QP_G_er,GF_is_causal,QP_G_Zoom_treshold use IO_int, ONLY:io_connect,io_disconnect,io_header,io_elemental,io_bulk,& & ver_is_gt_or_eq use IO_m, ONLY:io_sec,io_status,read_is_on,& @@ -57,6 +40,9 @@ integer function io_QP_and_GF(what,qp,ID) integer , allocatable ::qp_table_disk(:,:) real(SP), allocatable ::qp_DATA_disk(:,:,:) ! + ! These variables are not used anymore, just for back compatibility + integer :: GW_iterations,GWo_iterations + ! integer, external :: io_descriptors ! type_two_DB=.FALSE. @@ -162,13 +148,15 @@ integer function io_QP_and_GF(what,qp,ID) call io_elemental(ID,I0=qp%nk,DB_I0=QP_nk_disk,CHECK=.true.,OP=(/"<="/)) call io_elemental(ID,I0=qp%n_states,DB_I0=QP_n_states_disk,& & VAR='QP tot states ',CHECK=.true.,OP=(/"<="/)) - if (ver_is_gt_or_eq(ID,revision=15200)) then - call io_elemental(ID,I0=GWo_iterations,& + if (.not.ver_is_gt_or_eq(ID,revision=22010)) then + if (ver_is_gt_or_eq(ID,revision=15200)) then + call io_elemental(ID,I0=GWo_iterations,& & VAR='GWo SC iterations ',CHECK=.true.,OP=(/"=="/)) - else - GWo_iterations=0 + else + GWo_iterations=0 + endif + call io_elemental(ID,I0=GW_iterations,VAR='GW SC iterations',CHECK=.true.,OP=(/"=="/)) endif - call io_elemental(ID,I0=GW_iterations,VAR='GW SC iterations',CHECK=.true.,OP=(/"=="/)) ! call io_elemental(ID,I0=qp%desc%n,DB_I0=n_descs_disk,CHECK=.true.,OP=(/"<="/)) call io_elemental(ID,VAR="",VAR_SZ=0,MENU=0) diff --git a/src/io/io_RIM.F b/src/io/io_RIM.F index 85478e3e03..113acc08c5 100644 --- a/src/io/io_RIM.F +++ b/src/io/io_RIM.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! integer function io_RIM(ID) ! diff --git a/src/io/io_RIM_W.F b/src/io/io_RIM_W.F index 736b1db606..bd2e8ca26f 100644 --- a/src/io/io_RIM_W.F +++ b/src/io/io_RIM_W.F @@ -1,27 +1,11 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! -integer function io_RIM_W(ID,mode) +integer function io_RIM_W(ID,mode,Xw) ! use pars, ONLY:SP use R_lattice, ONLY:RIM_W_ng,RIM_n_rand_pts,RIM_W_is_diagonal,RL_vol,RIM_RL_vol,& @@ -30,9 +14,12 @@ integer function io_RIM_W(ID,mode) use IO_m, ONLY:io_sec,read_is_on,io_status use IO_int, ONLY:io_connect,io_disconnect,io_header,& & io_elemental,io_bulk + use frequency, ONLY:w_samp + ! #include ! integer :: ID + type(w_samp) :: Xw character(3) :: mode ! ! Work Space @@ -82,12 +69,12 @@ integer function io_RIM_W(ID,mode) if (any((/io_sec(ID,:)==2/))) then ! if (read_is_on(ID)) then - YAMBO_ALLOC(RIM_W,(nqibz,RIM_W_ng,RIM_W_ng)) + YAMBO_ALLOC(RIM_W,(Xw%n_freqs,nqibz,RIM_W_ng,RIM_W_ng)) if(l_PPA_E) YAMBO_ALLOC(RIM_W_E,(RIM_W_ng,RIM_W_ng)) endif ! - call io_bulk(ID,VAR="RIM_W",VAR_SZ=(/shape(RIM_W)/)) - call io_bulk(ID,R3=RIM_W) + call io_bulk(ID,VAR="RIM_W",VAR_SZ=(/2,Xw%n_freqs,nqibz,RIM_W_ng,RIM_W_ng/)) + call io_bulk(ID,C4=RIM_W) ! if(l_PPA_E) then call io_bulk(ID,VAR="RIM_W_E",VAR_SZ=(/shape(RIM_W_E)/)) diff --git a/src/io/io_RT_components.F b/src/io/io_RT_components.F index 411bc4c2f3..569ae6a7b4 100644 --- a/src/io/io_RT_components.F +++ b/src/io/io_RT_components.F @@ -1,27 +1,10 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2008 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 DS ! -! 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 integer function io_RT_components(what,ID) ! ! What can be E WF V OBSERV(J,P,M,...) G_lesser G_lesser_RESTART @@ -236,4 +219,3 @@ integer function io_RT_components(what,ID) call timing('io_RT_components',OPR='stop') ! end function -#endif diff --git a/src/io/io_RT_components_G_lesser.F b/src/io/io_RT_components_G_lesser.F index 9e98b28825..527d5cef8c 100644 --- a/src/io/io_RT_components_G_lesser.F +++ b/src/io/io_RT_components_G_lesser.F @@ -1,27 +1,10 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 DS ! -! 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 subroutine io_RT_components_G_lesser(ID,T_size) ! use pars, ONLY:SP,schlen @@ -180,4 +163,3 @@ subroutine io_RT_components_G_lesser(ID,T_size) if (G_IO_steps>=10) call netcdf_call(nf90_sync(io_unit(ID)),ID) ! end subroutine io_RT_components_G_lesser -#endif diff --git a/src/io/io_RT_components_OBS.F b/src/io/io_RT_components_OBS.F index 42c9d2dc4c..686f38b41e 100644 --- a/src/io/io_RT_components_OBS.F +++ b/src/io/io_RT_components_OBS.F @@ -1,27 +1,10 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 DS ! -! 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 subroutine io_RT_components_OBS(ID,what) ! use pars, ONLY:SP,schlen @@ -96,4 +79,3 @@ subroutine io_RT_components_OBS(ID,what) end select ! end subroutine -#endif diff --git a/src/io/io_RT_components_Reference.F b/src/io/io_RT_components_Reference.F index 356024549c..4a8e1c64dc 100644 --- a/src/io/io_RT_components_Reference.F +++ b/src/io/io_RT_components_Reference.F @@ -1,27 +1,10 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 DS ! -! 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 subroutine io_RT_components_Reference(ID) ! use pars, ONLY:SP @@ -96,4 +79,3 @@ subroutine elemental_LIFE_IO(LIFE) end subroutine ! end subroutine io_RT_components_Reference -#endif diff --git a/src/io/io_RT_components_TIME_points.F b/src/io/io_RT_components_TIME_points.F index 20605b05a9..795b3cd3a4 100644 --- a/src/io/io_RT_components_TIME_points.F +++ b/src/io/io_RT_components_TIME_points.F @@ -1,30 +1,13 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 DS ! -! 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 subroutine io_RT_components_TIME_points(ID,VAR_SZ,load_RESTART_info,UNLIMITED_time,TYP) ! - use pars, ONLY:IP,SP,schlen + use pars, ONLY:IP,SP,schlen,IP_YIO use drivers, ONLY:l_real_time use units, ONLY:AUT2FS use RT_output_m, ONLY:RT_desc @@ -57,14 +40,14 @@ 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_TIME_steps_last_nsteps",3,IP+100,0) + 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) call io_variable_elemental(ID,I0=TYP%N) ! if (RT_do_IO("G_lesser_RESTART").and. l_real_time) then dim_name="G_MEM_steps" - call def_variable_bulk(ID,"MEMORY_TIME_POINTS",2,(/G_MEM_steps/),IP+100,dim_name,silent=.true.) + call def_variable_bulk(ID,"MEMORY_TIME_POINTS",2,(/G_MEM_steps/),IP_YIO,dim_name,silent=.true.) call io_variable_bulk(ID,2,I1=MEM_pointer) if (read_is_on(ID)) then i_min_index=minval(MEM_pointer) @@ -98,4 +81,3 @@ subroutine io_RT_components_TIME_points(ID,VAR_SZ,load_RESTART_info,UNLIMITED_ti if (write_is_on(ID)) TYP%first_IO(2)=.FALSE. ! end subroutine io_RT_components_TIME_points -#endif diff --git a/src/io/io_RT_components_header.F b/src/io/io_RT_components_header.F index 7e9443beea..f5531243da 100644 --- a/src/io/io_RT_components_header.F +++ b/src/io/io_RT_components_header.F @@ -1,30 +1,13 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 DS ! -! 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 subroutine io_RT_components_header(ID,what,loading_carr_before_neq,io_RT_components) ! - use pars, ONLY:IP,SP,LP + use pars, ONLY:IP,SP,LP,IP_YIO,LP_YIO use R_lattice, ONLY:nqbz use IO_int, ONLY:io_header,def_variable_elemental,io_variable_elemental,& & def_variable_bulk,io_variable_bulk @@ -61,7 +44,7 @@ subroutine io_RT_components_header(ID,what,loading_carr_before_neq,io_RT_compone ! that make the RT_carriers databases independent ! if (RT_do_IO("carriers")) then - call def_variable_elemental(ID,"RT_carriers_dimensions",4,IP+100,0) + call def_variable_elemental(ID,"RT_carriers_dimensions",4,IP_YIO,0) call io_variable_elemental(ID,I0=RT_carriers%nk) call io_variable_elemental(ID,I1=RT_carriers%nb) call io_variable_elemental(ID,I0=RT_carriers%nstates) @@ -72,17 +55,16 @@ subroutine io_RT_components_header(ID,what,loading_carr_before_neq,io_RT_compone call io_variable_bulk(ID,4,R2=RT_carriers%kpt) call def_variable_bulk(ID,"RT_k_weight",5,(/RT_carriers%nk/),SP) call io_variable_bulk(ID,5,R1=RT_carriers%k_weight) - call def_variable_bulk(ID,"RT_table",6,(/RT_carriers%nstates,4/),IP+100) + call def_variable_bulk(ID,"RT_table",6,(/RT_carriers%nstates,4/),IP_YIO) call io_variable_bulk(ID,6,I2=RT_carriers%table) ! endif ! if (RT_do_IO("ANY_G")) then - call def_variable_elemental(ID,"Save_G_history",1,LP+100,0) + call def_variable_elemental(ID,"Save_G_history",1,LP_YIO,0) call io_variable_elemental(ID,L0=SAVE_G_history) endif ! io_RT_components=io_status(ID) ! end subroutine io_RT_components_header -#endif diff --git a/src/io/io_SC_components.F b/src/io/io_SC_components.F index de039f0b84..e8da3c3f3e 100644 --- a/src/io/io_SC_components.F +++ b/src/io/io_SC_components.F @@ -1,27 +1,10 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2008 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 ! -#if defined _SC integer function io_SC_components(what,E_sc,ID) ! ! what can be E WF V OBSERVABLES (J,P,D...) G @@ -240,4 +223,3 @@ integer function io_SC_components(what,E_sc,ID) call timing('io_SC_components',OPR='stop') ! end function -#endif diff --git a/src/io/io_USPP_pwscf.F b/src/io/io_USPP_pwscf.F index 415f283f5a..3646c153cf 100644 --- a/src/io/io_USPP_pwscf.F +++ b/src/io/io_USPP_pwscf.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AF -! -! 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. +! Copyright (C) 2018 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): AF ! integer function io_USPP_pwscf(ID) ! diff --git a/src/io/io_Vnl.F b/src/io/io_Vnl.F index 60e4747e6b..c8eee1c101 100644 --- a/src/io/io_Vnl.F +++ b/src/io/io_Vnl.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2011 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 ! integer function io_Vnl(Dip,Xen,ID) ! diff --git a/src/io/io_WF.F b/src/io/io_WF.F index f72b3f5294..134c532060 100644 --- a/src/io/io_WF.F +++ b/src/io/io_WF.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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. -! -! 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 DS ! integer function io_WF(ID,wf,wf_d) ! diff --git a/src/io/io_X.F b/src/io/io_X.F index 87bfaaea1b..cbdd3ba4b5 100644 --- a/src/io/io_X.F +++ b/src/io/io_X.F @@ -1,32 +1,16 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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 ! integer function io_X(X,Xw,ID) ! use pars, ONLY:SP,schlen use units, ONLY:HA2EV use R_lattice, ONLY:g_vec - use X_m, ONLY:X_t,X_mat,X_RLcomp_ig,X_desc,X_ALLOC_elemental + use X_m, ONLY:X_t,X_mat,X_par,X_RLcomp_ig,X_desc,X_ALLOC_elemental use frequency, ONLY:w_samp use IO_int, ONLY:io_connect,io_disconnect,io_elemental,io_bulk,io_header,& & def_variable_bulk,io_variable_bulk,def_variable_elemental,io_variable_elemental,& @@ -36,9 +20,6 @@ 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 -#if defined _PAR_IO - use X_m, ONLY:X_par -#endif ! #include ! @@ -48,7 +29,7 @@ integer function io_X(X,Xw,ID) ! !Work Space ! - integer ::sec_size,i1,iq,i_err,io_com_save,io_err,ID_frag + integer ::sec_size,i1,ig1,ig2,iq,i_err,io_com_save,io_err,ID_frag logical ::different_db_RL_order,EM1S_NOSOC character (schlen) ::ch,db_desc character (2) ::local_XC_KIND @@ -64,7 +45,7 @@ integer function io_X(X,Xw,ID) return endif ! - ! I assume that he RL ordering used to build X is not different + ! I assume that the RL ordering used to build X is not different ! from the one in DB1 ! different_db_RL_order=.false. @@ -75,6 +56,7 @@ integer function io_X(X,Xw,ID) if (X%whoami==2) db_desc='em1s' if (X%whoami==3) db_desc='em1d' if (X%whoami==4) db_desc='pp' + if (X%whoami==5) db_desc='Xmpa' if (STRING_same(X%KERNEL,"IP")) db_desc='Xo' ! io_X=io_connect(desc=trim(db_desc),type=2,ID=ID,FORCE_READ_MODE=(.not.any((/io_sec(ID,:)==1/))).and.frag_RESPONSE) @@ -88,6 +70,7 @@ integer function io_X(X,Xw,ID) if (X%whoami==2) local_XC_KIND="Xs" if (X%whoami==3) local_XC_KIND="Xd" if (X%whoami==4) local_XC_KIND="Xp" + if (X%whoami==5) local_XC_KIND="Xm" ! EM1S_NOSOC=.TRUE. ! @@ -149,7 +132,7 @@ integer function io_X(X,Xw,ID) io_X=io_err if (io_err/=0) goto 1 ! - ! type(X_t) ::X(4) x s d p + ! type(X_t) ::X(5) x s d p m ! if (any((/io_sec(ID,:)==2*iq/)) ) then ! @@ -201,29 +184,75 @@ integer function io_X(X,Xw,ID) ! ch="X_Q_"//trim(intc(iq)) ! -#if defined _PAR_IO + ! on write: + ! - serial IO => use X_mat + ! - parallel IO => use X_par + ! + ! on read: (independently of _PAR_IO) + ! - if allocated X_mat => use X_mat + ! - if allocated X_par => use X_par + ! - if nothing allocated use X_mat (backward compatibility) + ! - if both are allocated, but are filled + ! + ! Note that only X_par(1) is used since io_X is called + ! only when io_RESPONSE=.true., implying one q-point + ! at a time is dealt with. + ! 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') 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/)) +#else + 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_mat(:,:,:Xw%n_freqs),IPOS=(/1,1,1,1/)) +#endif ! else if(read_is_on(ID)) then -#endif ! - if (.not.allocated(X_mat).and.read_is_on(ID)) call X_ALLOC_elemental('X',(/X%ng,X%ng,Xw%n_freqs/)) - 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_mat(:,:,:Xw%n_freqs),IPOS=(/1,1,1,1/)) + if (.not.allocated(X_par)) then + if (.not.allocated(X_mat)) call X_ALLOC_elemental('X',(/X%ng,X%ng,Xw%n_freqs/)) + endif + ! + if (allocated(X_mat)) 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_mat(:,:,:Xw%n_freqs),IPOS=(/1,1,1,1/)) + 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/)) + endif ! -#if defined _PAR_IO endif -#endif + ! + ! handle different RL_ordering ! if (read_is_on(ID) .and. different_db_RL_order) then - YAMBO_ALLOC(X_on_disk,(X%ng,X%ng)) - do i1=1,Xw%n_freqs - X_on_disk=X_mat(:,:,i1) - X_mat(X_RLcomp_ig(:),X_RLcomp_ig(:),i1)=X_on_disk - enddo + ! + if (allocated(X_mat)) then + YAMBO_ALLOC(X_on_disk,(X%ng,X%ng)) + do i1=1,Xw%n_freqs + X_on_disk=X_mat(:,:,i1) + X_mat(X_RLcomp_ig(:),X_RLcomp_ig(:),i1)=X_on_disk + enddo + endif + ! + if (allocated(X_par)) 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 + ! + X_on_disk=X_par(1)%blc(:,:,i1) + ! + do ig2=X_par(1)%cols(1),X_par(1)%cols(2) + do ig1=X_par(1)%rows(1),X_par(1)%rows(2) + X_par(1)%blc(X_RLcomp_ig(ig1),X_RLcomp_ig(ig2),i1)=X_on_disk(ig1,ig2) + enddo + enddo + ! + enddo + endif + ! YAMBO_FREE(X_on_disk) endif ! diff --git a/src/io/io_descriptors.F b/src/io/io_descriptors.F index aafb6ef4f9..11151c0105 100644 --- a/src/io/io_descriptors.F +++ b/src/io/io_descriptors.F @@ -1,29 +1,13 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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): DS AM ! function io_descriptors(desc,name,ID,QUIET) ! - use pars, ONLY:schlen,SP,DP,IP,LP + use pars, ONLY:schlen,SP,DP,IP,LP,IP_YIO,LP_YIO,CR_YIO use descriptors, ONLY:IO_desc use IO_m, ONLY:io_status,variable_exist,read_is_on,io_com,NONE use IO_int, ONLY:def_variable_elemental,io_variable_elemental,& @@ -48,7 +32,7 @@ function io_descriptors(desc,name,ID,QUIET) ! if (read_is_on(ID) .and. .not.variable_exist(ID,name//"_N_DESCRIPTORS")) return ! - call def_variable_elemental(ID,name//"_N_DESCRIPTORS",1,IP+100,0) + call def_variable_elemental(ID,name//"_N_DESCRIPTORS",1,IP_YIO,0) call io_variable_elemental(ID,I0=desc%n,DB_I0=n_descs_disk,CHECK=.true.,OP=(/"<="/)) ! if (n_descs_disk==0) then @@ -62,7 +46,7 @@ function io_descriptors(desc,name,ID,QUIET) dim_name(1)=trim(name)//"_string_len" dim_name(2)=trim(name)//"_desc_size" ! - call def_variable_bulk(ID,name//"_DESCRIPTORS_SIZES",2,(/desc_size/),IP+100,dim_names=dim_name(2:2)) + call def_variable_bulk(ID,name//"_DESCRIPTORS_SIZES",2,(/desc_size/),IP_YIO,dim_names=dim_name(2:2)) call io_variable_bulk(ID,2,I1=desc%size(:n_descs_disk)) ! call def_variable_bulk(ID,name//"_DESCRIPTORS_NAMES",1,(/schlen,desc_size/),0,dim_names=dim_name) @@ -81,12 +65,12 @@ function io_descriptors(desc,name,ID,QUIET) ! if (desc%kind(i1)=='') cycle ! - if(desc%kind(i1)=='i') VAR_KIND=IP+100 + if(desc%kind(i1)=='i') VAR_KIND=IP_YIO if(desc%kind(i1)=='d') VAR_KIND=DP if(desc%kind(i1)=='r') VAR_KIND=SP if(desc%kind(i1)=='c') VAR_KIND=SP - if(desc%kind(i1)=='l') VAR_KIND=LP+100 - if(desc%kind(i1)=='s') VAR_KIND=0 + if(desc%kind(i1)=='l') VAR_KIND=LP_YIO + if(desc%kind(i1)=='s') VAR_KIND=CR_YIO ! N=desc%size(i1) ! diff --git a/src/io/io_gFsq.F b/src/io/io_gFsq.F index 84b88ecbb8..f2328ff4c6 100644 --- a/src/io/io_gFsq.F +++ b/src/io/io_gFsq.F @@ -1,27 +1,10 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM 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. +! 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 AC ! -#if defined _ELPH integer function io_gFsq(ID) ! use pars, ONLY:schlen @@ -113,4 +96,3 @@ integer function io_gFsq(ID) call timing("io_gFsq",OPR="STOP") ! end function -#endif diff --git a/src/io/io_header.F b/src/io/io_header.F index c782fbb0cc..db64184826 100644 --- a/src/io/io_header.F +++ b/src/io/io_header.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! integer function io_header(ID,QPTS,R_LATT,WF,IMPOSE_SN,TEMP,KPTS,D_LATT,XC_KIND,& & CUTOFF,GAUGE,IMPOSE_GAUGE,ACCEPT_SPIN,PARALLEL_STRUCTURE,FRAG,IMPOSE,NOWARN_SER) diff --git a/src/io/io_out_of_date.F b/src/io/io_out_of_date.F index 6d81242d2d..de896c2ce1 100644 --- a/src/io/io_out_of_date.F +++ b/src/io/io_out_of_date.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! integer function io_out_of_date(ID) ! diff --git a/src/io/load_SC_components.F b/src/io/load_SC_components.F index a8e42ae52b..5f7d415615 100644 --- a/src/io/load_SC_components.F +++ b/src/io/load_SC_components.F @@ -1,27 +1,10 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM MG -! -! 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. +! Copyright (C) 2008 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 MG ! -#if defined _SC subroutine load_SC_components(what,E,COM_,MODE_,ik,i_sp_pol,n_bands,kind,& & xc_functional,perturbation) ! @@ -138,4 +121,3 @@ subroutine load_SC_components(what,E,COM_,MODE_,ik,i_sp_pol,n_bands,kind,& endif ! end subroutine -#endif diff --git a/src/io/variables_DIPOLES.F b/src/io/variables_DIPOLES.F index 38328318d2..291e85b5dd 100644 --- a/src/io/variables_DIPOLES.F +++ b/src/io/variables_DIPOLES.F @@ -1,29 +1,13 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2011 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. -! -! 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 DS ! integer function variables_DIPOLES(Dip,ID) ! - use pars, ONLY:SP + use pars, ONLY:SP,CR_YIO use units, ONLY:HA2EV use DIPOLES, ONLY:DIPOLE_t,DIP_desc use IO_m, ONLY:io_status @@ -59,17 +43,17 @@ integer function variables_DIPOLES(Dip,ID) ! ! Character variables ! - call def_variable_elemental(ID,"APPROACH",1,0,0) + call def_variable_elemental(ID,"APPROACH",1,CR_YIO,0) call io_variable_elemental(ID,VAR="Approach used",CH0=Dip%approach,CHECK=.true.,OP=(/"=="/),& & DESCRIPTOR=DIP_desc) ! - call def_variable_elemental(ID,"KINDS",1,0,0) + call def_variable_elemental(ID,"KINDS",1,CR_YIO,0) call io_variable_elemental(ID,VAR="Dipoles computed",CH0=Dip%computed,CHECK=.true.,OP=(/"<="/),& & DESCRIPTOR=DIP_desc) ! ! Wavefunctions xc ! - call def_variable_elemental(ID,'WAVE_FUNC_XC',1,0,0) + call def_variable_elemental(ID,'WAVE_FUNC_XC',1,CR_YIO,0) call io_variable_elemental(ID,DB_CH0=Dipole_WF_xc_string,CH0=loaded_WF_xc_string,VAR=' Wavefunctions',CHECK=.true.,OP=(/"=="/),& & DESCRIPTOR=DIP_desc) call io_elemental(ID,VAR="",VAR_SZ=0) diff --git a/src/io/variables_ELPH.F b/src/io/variables_ELPH.F index 4ae717f757..474278c369 100644 --- a/src/io/variables_ELPH.F +++ b/src/io/variables_ELPH.F @@ -1,27 +1,10 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM 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. +! 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 AC ! -#if defined _ELPH integer function variables_ELPH(ID,what) ! use pars, ONLY:SP @@ -116,4 +99,3 @@ integer function variables_ELPH(ID,what) variables_ELPH=io_status(ID) ! end function -#endif diff --git a/src/io/variables_NL.F b/src/io/variables_NL.F index 6eeda61236..709d6855ad 100644 --- a/src/io/variables_NL.F +++ b/src/io/variables_NL.F @@ -1,29 +1,13 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG, 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. +! Copyright (C) 2016 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): MG AC ! -! 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 _NL 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, & & WF_sample_ondisk,n_order,NL_desc @@ -34,7 +18,7 @@ integer function variables_NL(ID) use fields, ONLY:n_ext_fields use fields, ONLY:Efield use IO_m, ONLY:io_status - use IO_int, ONLY:io_elemental,ver_is_gt_or_eq + use IO_int, ONLY:io_elemental,ver_is_gt_or_eq,io_variable_elemental,def_variable_elemental use descriptors, ONLY:IO_desc_reset use stderr, ONLY:intc ! @@ -49,95 +33,123 @@ integer function variables_NL(ID) ! ! PARAMETERS ! - call io_elemental(ID,VAR="NLPARS",VAR_SZ=14,MENU=0) - call io_elemental(ID,VAR="[RT] Time steps",I0=NE_steps, CHECK=.true.,OP=(/"=="/), & -& DESCRIPTOR=NL_desc) - call io_elemental(ID,VAR="[RT] Time step",TERMINATOR="[fs]",R0=RT_step, CHECK=.true.,OP=(/"=="/), & + call def_variable_elemental(ID,"NE_steps",1,IP_YIO,0) + call io_variable_elemental(ID,VAR="[RT] Time steps",I0=NE_steps,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=NL_desc) + + call def_variable_elemental(ID,"RT_step",1,SP,0) + call io_variable_elemental(ID,VAR="[RT] Time step",TERMINATOR="[fs]",R0=RT_step, CHECK=.true.,OP=(/"=="/), & & DESCRIPTOR=NL_desc,UNIT=AUT2FS) - call io_elemental(ID,VAR="[NL] Damping",TERMINATOR="[eV]",R0=NL_damping, CHECK=.true.,OP=(/"=="/), & + + call def_variable_elemental(ID,"NL_damping",1,SP,0) + call io_variable_elemental(ID,VAR="[NL] Damping",TERMINATOR="[eV]",R0=NL_damping, CHECK=.true.,OP=(/"=="/), & & DESCRIPTOR=NL_desc,UNIT=HA2EV) - call io_elemental(ID,VAR="[NL] Bands range",I1=RT_bands, CHECK=.true.,OP=(/"==","=="/), & + + call def_variable_elemental(ID,"RT_bands",2,IP_YIO,0) + call io_variable_elemental(ID,VAR="[NL] Bands range",I1=RT_bands, CHECK=.true.,OP=(/"==","=="/), & & DESCRIPTOR=NL_desc) - call io_elemental(ID,VAR="[NL] Energy range",R1=NL_er, CHECK=.true.,OP=(/"==","=="/), & + + call def_variable_elemental(ID,"NL_er",2,SP,0) + call io_variable_elemental(ID,VAR="[NL] Energy range",R1=NL_er, CHECK=.true.,OP=(/"==","=="/), & & DESCRIPTOR=NL_desc,UNIT=HA2EV) - call io_elemental(ID,VAR="[NL] Number of freqs",I0=n_frequencies,CHECK=.true.,OP=(/"=="/), & + + call def_variable_elemental(ID,"n_frequencies",1,IP_YIO,0) + call io_variable_elemental(ID,VAR="[NL] Number of freqs",I0=n_frequencies,CHECK=.true.,OP=(/"=="/), & & DESCRIPTOR=NL_desc) - call io_elemental(ID,VAR="[NL] Force 2nd approx",L0=l_force_SndOrd,CHECK=.true.,OP=(/"=="/), & + + call def_variable_elemental(ID,"l_force_SndOrd",1,LP_YIO,0) + call io_variable_elemental(ID,VAR="[NL] Force 2nd approx",L0=l_force_SndOrd,CHECK=.true.,OP=(/"=="/), & & DESCRIPTOR=NL_desc) - call io_elemental(ID,VAR="[NL] Use DIPOLES",L0=l_use_DIPOLES,CHECK=.true.,OP=(/"=="/), & + + call def_variable_elemental(ID,"l_use_DIPOLES",1,LP_YIO,0) + call io_variable_elemental(ID,VAR="[NL] Use DIPOLES",L0=l_use_DIPOLES,CHECK=.true.,OP=(/"=="/), & & DESCRIPTOR=NL_desc) - call io_elemental(ID,VAR="[NL] Induced Field",L0=l_RT_induced_field,CHECK=.true.,OP=(/"=="/), & + + 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) - call io_elemental(ID,VAR="[NL] Number of G in HARTREE",I0=QP_ng_SH,CHECK=.true.,OP=(/"=="/), & + + call def_variable_elemental(ID,"QP_ng_SH",1,IP_YIO,0) + call io_variable_elemental(ID,VAR="[NL] Number of G in HARTREE",I0=QP_ng_SH,CHECK=.true.,OP=(/"=="/), & & DESCRIPTOR=NL_desc) - call io_elemental(ID,VAR="[NL] Number of G in EXCHANGE(DFT)",I0=QP_ng_Sx,CHECK=.true.,OP=(/"=="/), & + + 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 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) + + 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) ! ! 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 +! 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) - call io_elemental(ID,CH0=Integrator_name,VAR=' [RT] Integrator ',CHECK=.true.,OP=(/"=="/), & + 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) - call io_elemental(ID,VAR="",VAR_SZ=0,MENU=0) ! ! CORRELATION ! - call io_elemental(ID,VAR="CORRELATION",CH0="",VAR_SZ=1,MENU=0) - call io_elemental(ID,CH0=NL_correlation,VAR=' [NL] Correlation ',CHECK=.true.,OP=(/"=="/), & + call def_variable_elemental(ID,"Correlation",1,CR_YIO,0) + call io_variable_elemental(ID,CH0=NL_correlation,VAR=' [NL] Correlation ',CHECK=.true.,OP=(/"=="/), & & DESCRIPTOR=NL_desc) ! ! Efield ! do i_Prb=1,n_ext_fields - call io_elemental(ID,VAR="FIELD_NAME"//trim(intc(i_Prb)),CH0="",VAR_SZ=1,MENU=0) - call io_elemental(ID,CH0=Efield(i_Prb)%ef_name,VAR=' [FIELDs] Type ',CHECK=.true.,OP=(/"=="/), & + call def_variable_elemental(ID,"Field_Name_"//trim(intc(i_Prb)),1,CR_YIO,0) + call io_variable_elemental(ID,CH0=Efield(i_Prb)%ef_name,VAR=' [FIELDs] Type ',CHECK=.true.,OP=(/"=="/), & & DESCRIPTOR=NL_desc) - call io_elemental(ID,VAR="",VAR_SZ=0,MENU=0) - ! - call io_elemental(ID,VAR="EXTERNAL_FIELD"//trim(intc(i_Prb)),VAR_SZ=10,MENU=0) - call io_elemental(ID,VAR="[FIELDs] Versor ",R1=Efield(i_Prb)%versor,WARN=.true.,OP=(/"==","==","=="/), & + + call def_variable_elemental(ID,"Field_Versor_"//trim(intc(i_Prb)),3,SP,0) + call io_variable_elemental(ID,VAR="[FIELDs] Versor ",R1=Efield(i_Prb)%versor,WARN=.true.,OP=(/"==","==","=="/), & & DESCRIPTOR=NL_desc) - call io_elemental(ID,VAR="[FIELDs] Intensity ",TERMINATOR="[kWCMm2]",& + call def_variable_elemental(ID,"Field_Intensity_"//trim(intc(i_Prb)),1,SP,0) + call io_variable_elemental(ID,VAR="[FIELDs] Intensity ",TERMINATOR="[kWCMm2]",& & R0=Efield(i_Prb)%intensity,CHECK=.true.,OP=(/"=="/),UNIT=AU2KWCMm2, & & DESCRIPTOR=NL_desc) - call io_elemental(ID,VAR="[FIELDs] Damping ",TERMINATOR="[fs]",& + + call def_variable_elemental(ID,"Field_Damping_"//trim(intc(i_Prb)),1,SP,0) + call io_variable_elemental(ID,VAR="[FIELDs] Damping ",TERMINATOR="[fs]",& & R0=Efield(i_Prb)%FWHM,CHECK=.true.,OP=(/"=="/),& & DESCRIPTOR=NL_desc) - call io_elemental(ID,VAR="[FIELDs] Frequency range ",TERMINATOR="[eV]",& + + 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 io_elemental(ID,VAR="[FIELDs] Frequency steps",I0=Efield(i_Prb)%n_frequencies,CHECK=.true.,OP=(/"=="/),& + + 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 io_elemental(ID,VAR="[FIELDs] Frequency step ",TERMINATOR="[eV]",& + + 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 io_elemental(ID,VAR=" [FIELDs] Initial time ",TERMINATOR="[fs]",& + + call def_variable_elemental(ID,"Field_Initial_time_"//trim(intc(i_Prb)),1,SP,0) + call io_variable_elemental(ID,VAR=" [FIELDs] Initial time ",TERMINATOR="[fs]",& & R0=Efield(i_Prb)%t_initial,CHECK=.true.,OP=(/"=="/),UNIT=AUT2FS,& & DESCRIPTOR=NL_desc) - call io_elemental(ID,VAR="",VAR_SZ=0,MENU=0) + enddo ! variables_NL=io_status(ID) ! end function -#endif diff --git a/src/io/variables_RT_dynamic.F b/src/io/variables_RT_dynamic.F index c28ed21c64..cb18d39b79 100644 --- a/src/io/variables_RT_dynamic.F +++ b/src/io/variables_RT_dynamic.F @@ -1,30 +1,13 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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): DS ! -#if defined _RT integer function variables_RT_dynamic(ID) ! - use pars, ONLY:SP,IP + use pars, ONLY:SP,IP,CR_YIO use units, ONLY:AUT2FS use RT_output_m, ONLY:RT_desc,n_RT_desc_static,TIME_STEP_desc use RT_lifetimes, ONLY:RT_life_extrap_times,RT_life_extrap_times @@ -77,9 +60,8 @@ integer function variables_RT_dynamic(ID) ! variables_RT_dynamic=io_descriptors(TIME_STEP_desc,"TIME_STEP",ID,.FALSE.) ! - call def_variable_elemental(ID,VAR="",VAR_SZ=0,VAR_KIND=0,MENU=1) + call def_variable_elemental(ID,VAR="",VAR_SZ=0,VAR_KIND=CR_YIO,MENU=1) ! variables_RT_dynamic =io_status(ID) ! end function variables_RT_dynamic -#endif diff --git a/src/io/variables_RT_static.F b/src/io/variables_RT_static.F index d2d1e0d385..32d5ee8ddc 100644 --- a/src/io/variables_RT_static.F +++ b/src/io/variables_RT_static.F @@ -1,30 +1,13 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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): DS ! -#if defined _RT integer function variables_RT_static(ID) ! - use pars, ONLY:SP,LP,IP + use pars, ONLY:SP,LP,IP,IP_YIO,CR_YIO,LP_YIO use units, ONLY:AUT2FS,AU2KWCMm2,HA2EV use drivers, ONLY:l_elph_scatt,l_elel_scatt,l_elel_corr,l_elphoton_scatt use stderr, ONLY:intc @@ -63,17 +46,17 @@ integer function variables_RT_static(ID) ! ! RT_vars ! - call def_variable_elemental(ID,VAR="RT_bands_kpts",VAR_SZ=3,VAR_KIND=IP+100,MENU=0) + call def_variable_elemental(ID,VAR="RT_bands_kpts",VAR_SZ=3,VAR_KIND=IP_YIO,MENU=0) call io_variable_elemental(ID,I1=RT_bands,VAR=' [RT] Bands',CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=RT_desc) if (read_is_on(ID)) H_ref_bands=RT_bands call io_variable_elemental(ID,I0=RT_nk,VAR=' [RT] K-points',CHECK=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc) - call def_variable_elemental(ID,VAR="POTENTIAL",VAR_SZ=1,VAR_KIND=0,MENU=0) + call def_variable_elemental(ID,VAR="POTENTIAL",VAR_SZ=1,VAR_KIND=CR_YIO,MENU=0) call io_variable_elemental(ID,CH0=RT_potential,VAR=' [RT] Potential',WARN=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc) ! ! ELPH_vars ! #if defined _ELPH - call def_variable_elemental(ID,VAR="ELPH_vars",VAR_SZ=5,VAR_KIND=IP+100,MENU=0) + 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,& @@ -86,13 +69,13 @@ integer function variables_RT_static(ID) ! ! E-E_vars ! - call def_variable_elemental(ID,VAR="E-E_vars",VAR_SZ=2,VAR_KIND=LP+100,MENU=0) + call def_variable_elemental(ID,VAR="E-E_vars",VAR_SZ=2,VAR_KIND=LP_YIO,MENU=0) call io_variable_elemental(ID,L0=l_elel_scatt,VAR=" [E-E] Coulomb scattering", CHECK=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc) call io_variable_elemental(ID,L0=l_elel_corr,VAR=" [E-E] Coulomb correlation", CHECK=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc) ! ! E-PHOTON_vars ! - call def_variable_elemental(ID,VAR="E-PHOTON_vars",VAR_SZ=1,VAR_KIND=LP+100,MENU=0) + call def_variable_elemental(ID,VAR="E-PHOTON_vars",VAR_SZ=1,VAR_KIND=LP_YIO,MENU=0) call io_variable_elemental(ID,L0=l_elphoton_scatt,VAR=" [E-PHOTON] Scattering", CHECK=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc) ! ! FineGrid descriptors @@ -116,13 +99,13 @@ integer function variables_RT_static(ID) ! ! Lifetimes Extrapolation ! - call def_variable_elemental(ID,VAR='RT_life_extrapolation',VAR_SZ=1,VAR_KIND=LP+100,MENU=0) + call def_variable_elemental(ID,VAR='RT_life_extrapolation',VAR_SZ=1,VAR_KIND=LP_YIO,MENU=0) call io_variable_elemental(ID,L0=l_RT_lifetimes_extrapolation,& & VAR=" [RT] Lifetimes extrapolation",WARN=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc) ! ! INTEGRATOR ! - call def_variable_elemental(ID,VAR="INTEGRATOR",VAR_SZ=1,VAR_KIND=0,MENU=0) + call def_variable_elemental(ID,VAR="INTEGRATOR",VAR_SZ=1,VAR_KIND=CR_YIO,MENU=0) call io_variable_elemental(ID,CH0=Integrator_name, VAR=' [RT] Integrator',CHECK=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc) ! ! RT_OTHERS @@ -153,7 +136,7 @@ integer function variables_RT_static(ID) ! ! CONSTRAINS !====================== - call def_variable_elemental(ID,VAR="CONSTRAINS",VAR_SZ=2,VAR_KIND=LP+100,MENU=0) + call def_variable_elemental(ID,VAR="CONSTRAINS",VAR_SZ=2,VAR_KIND=LP_YIO,MENU=0) call io_variable_elemental(ID,L0=l_RT_impose_N_dN,& & VAR=' [CONSTRAINS] N (ee+ep) & dN (ep)', CHECK=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc) call io_variable_elemental(ID,L0=l_RT_impose_E,& @@ -163,7 +146,7 @@ integer function variables_RT_static(ID) !====================== if (l_NE_with_fields_disk) then ! - call def_variable_elemental(ID,VAR="GAUGE_TYPE",VAR_SZ=1,VAR_KIND=0,MENU=0) + call def_variable_elemental(ID,VAR="GAUGE_TYPE",VAR_SZ=1,VAR_KIND=CR_YIO,MENU=0) call io_variable_elemental(ID,CH0=global_gauge, VAR=' [FIELDs] Gauge Type',CHECK=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc) ! do i1=1,n_ext_fields @@ -201,4 +184,3 @@ integer function variables_RT_static(ID) variables_RT_static =io_status(ID) ! end function variables_RT_static -#endif diff --git a/src/io/variables_SC.F b/src/io/variables_SC.F index e9fa48b9e1..ee6adb6e0d 100644 --- a/src/io/variables_SC.F +++ b/src/io/variables_SC.F @@ -1,27 +1,10 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2010 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 DS ! -! 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 _SC integer function variables_SC(ID,what) ! use units, ONLY:AU2Tesla,DEG2RAD,AU2VMm1 @@ -183,4 +166,3 @@ integer function variables_SC(ID,what) if (variables_SC/=0) return ! end function -#endif diff --git a/src/io/variables_X.F b/src/io/variables_X.F index 81c43e9836..602c50efef 100644 --- a/src/io/variables_X.F +++ b/src/io/variables_X.F @@ -1,31 +1,15 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2011 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 DS ! integer function variables_X(ID,local_desc,X,EM1S_NOSOC) ! use units, ONLY:HA2EV use descriptors, ONLY:IO_desc,IO_desc_reset - use pars, ONLY:SP,IP,schlen + use pars, ONLY:SP,IP,schlen,CR_YIO use X_m, ONLY:X_t,use_X_DbGd,X_DbGd_nkpts,X_DbGd_percentual,OPTICAL_averaged_dirs_string use IO_m, ONLY:io_status,read_is_on,variable_exist use IO_int, ONLY:def_variable_elemental,io_variable_elemental,ver_is_gt_or_eq @@ -74,14 +58,14 @@ integer function variables_X(ID,local_desc,X,EM1S_NOSOC) ! VAR_NAME=trim(X_label)//"Time_ordering" if (read_is_on(ID) .and. .not. variable_exist(ID,trim(VAR_NAME))) VAR_NAME=trim(X_label)//"PARS_2" - call def_variable_elemental(ID,trim(VAR_NAME),1,0,0) + call def_variable_elemental(ID,trim(VAR_NAME),1,CR_YIO,0) call io_variable_elemental(ID,VAR="X Time ordering",CH0=X%ordering,WARN=.true.,DESCRIPTOR=local_desc) ! if (ver_is_gt_or_eq(ID,(/3,0,5/))) then ! ! TDDFT_KERNEL ! - call def_variable_elemental(ID,trim(X_label)//"TDDFT_KERNEL",1,0,0) + call def_variable_elemental(ID,trim(X_label)//"TDDFT_KERNEL",1,CR_YIO,0) call io_variable_elemental(ID,VAR="X Hxc Kernel",CH0=X%KERNEL,CHECK=.true.,DESCRIPTOR=local_desc) ! ! DRUDE @@ -125,7 +109,7 @@ integer function variables_X(ID,local_desc,X,EM1S_NOSOC) endif ! if (ver_is_gt_or_eq(ID,revision=21155)) then - call def_variable_elemental(ID,trim(X_label)//"OPTICAL_AVERAGE",1,0,0) + call def_variable_elemental(ID,trim(X_label)//"OPTICAL_AVERAGE",1,CR_YIO,0) call io_variable_elemental(ID,VAR="X Optical Averaged directions",CH0=OPTICAL_averaged_dirs_string,& & CHECK=.true.,DESCRIPTOR=local_desc) endif diff --git a/src/io/ver_is_gt_or_eq.F b/src/io/ver_is_gt_or_eq.F index 86c12c04b1..cb1eb782ca 100644 --- a/src/io/ver_is_gt_or_eq.F +++ b/src/io/ver_is_gt_or_eq.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 ! logical function ver_is_gt_or_eq(ID,version,revision) ! diff --git a/src/io_parallel/COLLISIONS_dbname.F b/src/io_parallel/COLLISIONS_dbname.F index 406701508a..8a056806a5 100644 --- a/src/io_parallel/COLLISIONS_dbname.F +++ b/src/io_parallel/COLLISIONS_dbname.F @@ -1,27 +1,10 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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. +! Copyright (C) 2006 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 CA DS ! -#if defined _RT || defined _SC || defined _QED subroutine COLLISIONS_dbname(coll_kind,db_name) ! use pars, ONLY:schlen @@ -48,4 +31,3 @@ subroutine COLLISIONS_dbname(coll_kind,db_name) endif ! end subroutine COLLISIONS_dbname -#endif diff --git a/src/io_parallel/io_BS_PAR_block.F b/src/io_parallel/io_BS_PAR_block.F index 8749b0d242..d6af88dbd5 100644 --- a/src/io_parallel/io_BS_PAR_block.F +++ b/src/io_parallel/io_BS_PAR_block.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): HM, 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. +! 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. -! -! 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): HM DS ! subroutine io_BS_PAR_block(iq,i_block,ID,mode) ! diff --git a/src/io_parallel/io_BS_PAR_free.F b/src/io_parallel/io_BS_PAR_free.F index a06dcbb262..c1e55aaf22 100644 --- a/src/io_parallel/io_BS_PAR_free.F +++ b/src/io_parallel/io_BS_PAR_free.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): HM, 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. +! 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. -! -! 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): HM DS ! subroutine io_BS_PAR_free(ID_head,ID,mode,l_kernel_complete) ! diff --git a/src/io_parallel/io_BS_PAR_init.F b/src/io_parallel/io_BS_PAR_init.F index f732184905..92f26d68a5 100644 --- a/src/io_parallel/io_BS_PAR_init.F +++ b/src/io_parallel/io_BS_PAR_init.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): HM, 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. +! 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. -! -! 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): HM DS ! integer function io_BS_PAR_init(iq,ID,mode) ! @@ -29,7 +13,7 @@ integer function io_BS_PAR_init(iq,ID,mode) use BS, ONLY:BS_K_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 + use IO_m, ONLY:io_BS_K,io_file,write_is_on,read_is_on,YAMBO_DEF_CHUNK use IO_int, ONLY:io_connect,def_variable_bulk ! implicit none @@ -44,6 +28,7 @@ integer function io_BS_PAR_init(iq,ID,mode) 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 :: chunksize(3) ! io_BS_PAR_init=-1 ! @@ -88,6 +73,11 @@ integer function io_BS_PAR_init(iq,ID,mode) ch(2,:)="BSE_COUPLING" ch(3,:)="BSE_ANTI-RESONANT" ! + ! Intitiate chucking array with 0 + chunksize(1) = 2 !! Complex dim + chunksize(2) = 0 + chunksize(3) = 0 + ! if (.not.BS_K_coupling ) n_vars=1 if ( BS_K_coupling ) n_vars=2 if (.not.l_BS_ares_from_res) n_vars=n_vars+1 @@ -148,6 +138,13 @@ integer function io_BS_PAR_init(iq,ID,mode) BS_IO_dim(:,2) = (/BS_K_dim(1),BS_K_dim(1)/) endif ! + ! For now we adapt chunking only to 2D_standard + chunksize(2) = YAMBO_DEF_CHUNK + chunksize(3) = YAMBO_DEF_CHUNK + ! If BSE matrix is 1) then @@ -65,47 +49,47 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) & R1=BSqpts(:,iq),CHECK=.true.,OP=(/"==","==","=="/),DESCRIPTOR=desc) endif ! - call def_variable_elemental(ID,"Dimension",1,IP+100,0) + call def_variable_elemental(ID,"Dimension",1,IP_YIO,0) call io_variable_elemental(ID,VAR="[K] Dimension",I0=BS_K_dim(1),CHECK=.true.,OP=(/"=="/),DESCRIPTOR=desc) ! - call def_variable_elemental(ID,"Bands",2,IP+100,0) + call def_variable_elemental(ID,"Bands",2,IP_YIO,0) call io_variable_elemental(ID,VAR="[K] Bands",I1=BS_bands,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=desc) ! - call def_variable_elemental(ID,"RES_EXCH",1,LP+100,0) + call def_variable_elemental(ID,"RES_EXCH",1,LP_YIO,0) call io_variable_elemental(ID,DB_L0=res_exch_disk,VAR="[K] Exchange res",& & L0=BS_res_K_exchange,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=desc) ! - call def_variable_elemental(ID,"RES_CORR",1,LP+100,0) + call def_variable_elemental(ID,"RES_CORR",1,LP_YIO,0) call io_variable_elemental(ID,DB_L0=res_corr_disk,& & VAR="[K] Correlation res",L0=BS_res_K_corr,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=desc) ! - call def_variable_elemental(ID,"COUPLING",1,LP+100,0) + call def_variable_elemental(ID,"COUPLING",1,LP_YIO,0) call io_variable_elemental(ID,DB_L0=cpl_disk,& & VAR="[K] Kernel`s coupling ",L0=BS_K_coupling,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=desc) ! - call def_variable_elemental(ID,"CPL_EXCH",1,LP+100,0) + call def_variable_elemental(ID,"CPL_EXCH",1,LP_YIO,0) call io_variable_elemental(ID,DB_L0=cpl_exch_disk,& & VAR="[K] Exchange cpl",L0=BS_cpl_K_exchange,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=desc) ! - call def_variable_elemental(ID,"CPL_CORR",1,LP+100,0) + call def_variable_elemental(ID,"CPL_CORR",1,LP_YIO,0) call io_variable_elemental(ID,DB_L0=cpl_corr_disk,& & VAR="[K] Correlation cpl",L0=BS_cpl_K_corr,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=desc) ! - call def_variable_elemental(ID,"W_BARE",1,LP+100,0) + call def_variable_elemental(ID,"W_BARE",1,LP_YIO,0) call io_variable_elemental(ID,DB_L0=td_hf_disk,& & VAR="[K] W interaction is bare",L0=l_td_hf,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=desc) ! - call def_variable_elemental(ID,"ALDA_KERNEL",1,LP+100,0) + call def_variable_elemental(ID,"ALDA_KERNEL",1,LP_YIO,0) call io_variable_elemental(ID,& & VAR="[K] ALDA kernel in R-space",L0=BS_K_is_ALDA,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=desc) ! if (res_exch_disk.or.cpl_exch_disk) then - call def_variable_elemental(ID,"RL_EXCH",1,IP+100,0) + call def_variable_elemental(ID,"RL_EXCH",1,IP_YIO,0) call io_variable_elemental(ID,& & VAR="[K] RL vectors exchange",I0=BS_n_g_exch,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=desc) endif if (res_corr_disk.or.cpl_corr_disk) then - call def_variable_elemental(ID,"RL_CORR",1,IP+100,0) + call def_variable_elemental(ID,"RL_CORR",1,IP_YIO,0) call io_variable_elemental(ID,& & VAR="[K] RL vectors correlation",I0=BS_n_g_W,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=desc) endif @@ -121,18 +105,18 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) ! Interaction ! if (res_corr_disk.or.cpl_corr_disk) then - call def_variable_elemental(ID,"BS_W_DIAGONAL",1,LP+100,0) + call def_variable_elemental(ID,"BS_W_DIAGONAL",1,LP_YIO,0) call io_variable_elemental(ID,& & VAR="[W] Interaction is diagonal",L0=BS_W_is_diagonal,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=desc) ! - call def_variable_elemental(ID,"BS_W_NG",1,IP+100,0) + call def_variable_elemental(ID,"BS_W_NG",1,IP_YIO,0) call io_variable_elemental(ID,VAR="[W] Matrix size",I0=X%ng,WARN=.true.,OP=(/"=="/),DESCRIPTOR=desc) ! ! Only if full screened interaction is used ! if (.not.td_hf_disk) then ! - call def_variable_elemental(ID,"BS_W_BANDS",2,IP+100,0) + call def_variable_elemental(ID,"BS_W_BANDS",2,IP_YIO,0) call io_variable_elemental(ID,VAR="[W] Bands",I1=X%ib,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=desc) ! call def_variable_elemental(ID,"BS_W_EH_RANGE",2,SP,0) @@ -142,27 +126,27 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) call def_variable_elemental(ID,"BS_W_POLES",1,SP,0) call io_variable_elemental(ID,VAR="[W] Poles",TERMINATOR="[o/o]",R0=X%cg_percentual,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=desc) ! - call def_variable_elemental(ID,"BS_W_DIP_NG",1,IP+100,0) + call def_variable_elemental(ID,"BS_W_DIP_NG",1,IP_YIO,0) call io_variable_elemental(ID,& & VAR="[W] RL vectors in the sum",I0=X%ngostnts,WARN=.true.,OP=(/"<="/),DESCRIPTOR=desc) ! - call def_variable_elemental(ID,"BS_W_DIP_rVnl",1,LP+100,0) + call def_variable_elemental(ID,"BS_W_DIP_rVnl",1,LP_YIO,0) call io_variable_elemental(ID,& & VAR="[W] [r,Vnl] included",L0=X%Vnl_included,WARN=.true.,OP=(/"=="/),DESCRIPTOR=desc) ! - call def_variable_elemental(ID,"BS_W_DIP_rVnl",1,LP+100,0) + call def_variable_elemental(ID,"BS_W_DIP_rVnl",1,LP_YIO,0) call io_variable_elemental(ID,VAR="[W] Longitudinal Gauge",L0=local_long_gauge,DESCRIPTOR=desc) ! call def_variable_elemental(ID,"BS_W_q_dir",3,SP,0) call io_variable_elemental(ID,VAR="[W] Field direction",R1=X%q0,CHECK=.true.,OP=(/"==","==","=="/),DESCRIPTOR=desc) call def_variable_elemental(ID,"",0,0,0) ! - call def_variable_elemental(ID,"W_Cutoff",1,0,0) + call def_variable_elemental(ID,"W_Cutoff",1,CR_YIO,0) call io_variable_elemental(ID,VAR="[W] Coulomb Cutoff",CH0=cut_geometry,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=desc) ! ! W_TDDFT_KERNEL ! - call def_variable_elemental(ID,"W_TDDFT_KERNEL",1,0,0) + call def_variable_elemental(ID,"W_TDDFT_KERNEL",1,CR_YIO,0) call io_variable_elemental(ID,VAR='[W] Hxc Kernel',CH0=X%KERNEL,CHECK=.true.,DESCRIPTOR=desc) ! endif @@ -173,7 +157,7 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) ! However the ndb.BS_PAR_Q1 used for restart in the test-suite should ! be updated, otherwise the hBN/GW-OPTICS/ corresponding test fails ! - call def_variable_elemental(ID,"W_DbGd",2,IP+100,0) + call def_variable_elemental(ID,"W_DbGd",2,IP_YIO,0) call io_variable_elemental(ID,I0=RIM_ng,& & VAR='[RIM] RL components col',CHECK=.true.,OP=(/"=="/),DESCRIPTOR=desc,DO_NOT_DUMP=.TRUE.) call io_variable_elemental(ID,I0=RIM_n_rand_pts,& @@ -185,7 +169,7 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) ! ! SOC ! - call def_variable_elemental(ID,"PERT_SOC",1,LP+100,MENU=0) + call def_variable_elemental(ID,"PERT_SOC",1,LP_YIO,MENU=0) call io_variable_elemental(ID,L0=BS_perturbative_SOC,& & VAR='[SOC] Perturbative SOC',CHECK=.true.,OP=(/"=="/),DESCRIPTOR=desc,DO_NOT_DUMP=.TRUE.) endif @@ -197,7 +181,7 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) ! Check if BSE kernel is written in triangular form ! if (write_is_on(ID).or.variable_exist(ID,"BSE_KERNEL_IO_MODE")) then - call def_variable_elemental(ID,"BSE_KERNEL_IO_MODE",1,0,0) + call def_variable_elemental(ID,"BSE_KERNEL_IO_MODE",1,CR_YIO,0) call io_variable_elemental(ID,VAR="[IO] Kernel IO mode",CH0=BSK_IO_mode) else BSK_IO_mode="2D_standard" @@ -206,7 +190,7 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) #endif ! if (ver_is_gt_or_eq(ID,revision=20415)) then - call def_variable_elemental(ID,"X_kind",1,0,0) + 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) endif ! diff --git a/src/io_parallel/variables_BS_more.F b/src/io_parallel/variables_BS_more.F index db4d7ce206..137875c598 100644 --- a/src/io_parallel/variables_BS_more.F +++ b/src/io_parallel/variables_BS_more.F @@ -1,29 +1,13 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! 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 DS ! integer function variables_BS_more(ID,mode) ! - use pars, ONLY:IP,SP,LP,schlen + 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 IO_m, ONLY:nf90_sync,io_unit,write_is_on,read_is_on,& & variable_exist,NF90_unlimited,netcdf_dim_size @@ -53,7 +37,7 @@ integer function variables_BS_more(ID,mode) if(write_is_on(ID)) io_var=trim(mode)=="start".or.(trim(mode)=="end".and.l_BSE_kernel_complete) if( read_is_on(ID)) io_var=trim(mode)=="start".and.variable_exist(ID,"BSE_KERNEL_COMPLETE") if(io_var) then - call def_variable_elemental(ID,"BSE_KERNEL_COMPLETE",1,LP+100,0) + call def_variable_elemental(ID,"BSE_KERNEL_COMPLETE",1,LP_YIO,0) call io_variable_elemental(ID,VAR=" Kernel complete",DB_L0=l_BSE_kernel_complete,L0=l_BSE_kernel_complete) endif ! diff --git a/src/io_serial/io_BS.F b/src/io_serial/io_BS.F index ba55e80966..e7e450ddf8 100644 --- a/src/io_serial/io_BS.F +++ b/src/io_serial/io_BS.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 ,BSS_desc -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. +! Copyright (C) 2015 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 ! ! Analogously to io_DIPOLES, we write the io files of BS with the ! information of the q-vector diff --git a/src/io_serial/io_COLLISIONS.F b/src/io_serial/io_COLLISIONS.F index 2ef7c1b5df..c8fde7467d 100644 --- a/src/io_serial/io_COLLISIONS.F +++ b/src/io_serial/io_COLLISIONS.F @@ -1,31 +1,13 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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) 2009 The Yambo Team ! -#if defined _SC || _RT || _QED +! Authors (see AUTHORS file for details): AM CA DS ! integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_,COMM) ! - use pars, ONLY:schlen,IP,SP + use pars, ONLY:schlen,IP,SP,IP_YIO use R_lattice, ONLY:RIM_ng,RIM_n_rand_pts use collision_ext, ONLY:COLLISIONS_cutoff,COLLISIONS_element,COLL_bands,COLLISIONS_group,COLLISIONS_CV_only use IO_m, ONLY:io_sec,io_status,IO_OUTDATED_DB,read_is_on,IO_mode,& @@ -178,7 +160,7 @@ integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_,COMM) 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+100) + call def_variable_bulk(ID,'COLLISIONS_STATE',1,(/COLL%N,4/),IP_YIO) call io_variable_bulk(ID,1,I2=COLL%state) ! io_COLLISIONS=io_status(ID) @@ -215,7 +197,7 @@ integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_,COMM) ! if (any(io_sec(ID,:)==2)) then ! - call def_variable_bulk(ID_frag,'N_COLLISIONS_STATES',1,(/1/),IP+100,silent=.true.) + call def_variable_bulk(ID_frag,'N_COLLISIONS_STATES',1,(/1/),IP_YIO,silent=.true.) call io_variable_bulk(ID_frag,1,I0=COLL_element%N) ! endif @@ -252,5 +234,3 @@ integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_,COMM) call timing('io_COLLISIONS',OPR='stop') ! end function io_COLLISIONS -! -#endif diff --git a/src/io_serial/io_DIPOLES.F b/src/io_serial/io_DIPOLES.F index 001eaa1672..560c336c2a 100644 --- a/src/io_serial/io_DIPOLES.F +++ b/src/io_serial/io_DIPOLES.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 DS ! integer function io_DIPOLES(Dip,ID) ! diff --git a/src/io_serial/io_Overlaps.F b/src/io_serial/io_Overlaps.F index 79c3a4ff21..617e5fad46 100644 --- a/src/io_serial/io_Overlaps.F +++ b/src/io_serial/io_Overlaps.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM 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. +! Copyright (C) 2011 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 CA MG DS ! integer function io_Overlaps(Dip,ID) ! diff --git a/src/io_serial/variables_BS.F b/src/io_serial/variables_BS.F index cd7e4476a2..4424696e09 100644 --- a/src/io_serial/variables_BS.F +++ b/src/io_serial/variables_BS.F @@ -1,29 +1,13 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2007 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 DS ! integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) ! - use pars, ONLY:SP,IP,LP + use pars, ONLY:SP,IP,LP,IP_YIO,LP_YIO,CR_YIO use units, ONLY:HA2EV use drivers, ONLY:l_td_hf use X_m, ONLY:X_t @@ -143,14 +127,14 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) ! ! v 3.0.11: Inclusion of cut_geometry ! - call def_variable_elemental(ID,"W_Cutoff",1,0,0) + call def_variable_elemental(ID,"W_Cutoff",1,CR_YIO,0) call io_variable_elemental(ID,& & VAR="[W] Coulomb Cutoff",CH0=cut_geometry,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=desc) endif ! ! W_TDDFT_KERNEL ! - call def_variable_elemental(ID,"W_TDDFT_KERNEL",1,0,0) + call def_variable_elemental(ID,"W_TDDFT_KERNEL",1,CR_YIO,0) call io_variable_elemental(ID,VAR='[W] Hxc Kernel',CH0=X%KERNEL,CHECK=.true.,DESCRIPTOR=desc) ! endif @@ -161,7 +145,7 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) ! However the ndb.BS_PAR_Q1 used for restart in the test-suite should ! be updated, otherwise the hBN/GW-OPTICS/ corresponding test fails ! - call def_variable_elemental(ID,"W_DbGd",2,IP+100,0) + call def_variable_elemental(ID,"W_DbGd",2,IP_YIO,0) call io_variable_elemental(ID,I0=RIM_ng,& & VAR='[RIM] RL components',TERMINATOR='[col]',CHECK=.true.,OP=(/"=="/),DESCRIPTOR=desc,DO_NOT_DUMP=.TRUE.) call io_variable_elemental(ID,I0=RIM_n_rand_pts,& @@ -171,7 +155,7 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) ! Perturbative SOC ! if (write_is_on(ID).or.variable_exist(ID,"PERT_SOC")) then - call def_variable_elemental(ID,"PERT_SOC",1,LP+100,MENU=0) + call def_variable_elemental(ID,"PERT_SOC",1,LP_YIO,MENU=0) call io_variable_elemental(ID,L0=BS_perturbative_SOC,& & VAR='[SOC] Perturbative SOC',CHECK=.true.,OP=(/"=="/),DESCRIPTOR=desc,DO_NOT_DUMP=.TRUE.) endif @@ -179,7 +163,7 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) endif ! if (ver_is_gt_or_eq(ID,revision=20415)) then - call def_variable_elemental(ID,"X_kind",1,0,0) + call def_variable_elemental(ID,"X_kind",1,CR_YIO,0) call io_variable_elemental(ID,VAR="[K] Kernel long-range exchange",CH0=BSE_L_kind,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=desc) endif ! diff --git a/src/linear_algebra/LINEAR_ALGEBRA_driver.F b/src/linear_algebra/LINEAR_ALGEBRA_driver.F index e796a4df8b..fc004e95e5 100644 --- a/src/linear_algebra/LINEAR_ALGEBRA_driver.F +++ b/src/linear_algebra/LINEAR_ALGEBRA_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM,AF -! -! 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) 2016 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. -! -! 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 AF ! subroutine LINEAR_ALGEBRA_driver(idriver,lib_in,& & M,M_slk,& diff --git a/src/linear_algebra/MATRIX_slepc.F b/src/linear_algebra/MATRIX_slepc.F index d1f405d54b..0850af19b4 100644 --- a/src/linear_algebra/MATRIX_slepc.F +++ b/src/linear_algebra/MATRIX_slepc.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): HM 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. +! Copyright (C) 2016 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): HM DS ! ! headers ! diff --git a/src/linear_algebra/PARALLEL_HERMITIAN_diagonalization.F b/src/linear_algebra/PARALLEL_HERMITIAN_diagonalization.F index 10612ad670..08c57b2c19 100644 --- a/src/linear_algebra/PARALLEL_HERMITIAN_diagonalization.F +++ b/src/linear_algebra/PARALLEL_HERMITIAN_diagonalization.F @@ -1,32 +1,10 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org -! -! Authors (see AUTHORS file for details): AM,AF -! -! 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. +! License-Identifier: GPL ! +! Copyright (C) 2016 The Yambo Team ! 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, -! or http://www.gnu.org/copyleft/gpl.txt . +! Authors (see AUTHORS file for details): AM AF ! subroutine PARALLEL_HERMITIAN_diagonalization(M, V, N, E) ! diff --git a/src/linear_algebra/PARALLEL_M_by_M.F b/src/linear_algebra/PARALLEL_M_by_M.F index 4dd20c6aa5..93e354f333 100644 --- a/src/linear_algebra/PARALLEL_M_by_M.F +++ b/src/linear_algebra/PARALLEL_M_by_M.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AF, 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. +! Copyright (C) 2016 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. -! -! 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): AF AM ! subroutine PARALLEL_M_by_M(A,B,C,transa,transb,m,n,k) ! diff --git a/src/linear_algebra/PARALLEL_M_by_V.F b/src/linear_algebra/PARALLEL_M_by_V.F index ae82e02201..1247d74f03 100644 --- a/src/linear_algebra/PARALLEL_M_by_V.F +++ b/src/linear_algebra/PARALLEL_M_by_V.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine PARALLEL_M_by_V(transa,N,A,X,Y) ! diff --git a/src/linear_algebra/PARALLEL_inversion.F b/src/linear_algebra/PARALLEL_inversion.F index 85216f67fb..b9a0570be5 100644 --- a/src/linear_algebra/PARALLEL_inversion.F +++ b/src/linear_algebra/PARALLEL_inversion.F @@ -1,32 +1,20 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, AF -! -! 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) 2016 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. -! -! 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 AF ! ! 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, -! or http://www.gnu.org/copyleft/gpl.txt . +! License-Identifier: GPL +! +! Copyright (C) 2016 The Yambo Team +! +! Authors (see AUTHORS file for details): AM AF ! subroutine PARALLEL_inversion(M,N) ! diff --git a/src/linear_algebra/PARALLEL_lin_system.F b/src/linear_algebra/PARALLEL_lin_system.F index 92a17604a4..ed509f205f 100644 --- a/src/linear_algebra/PARALLEL_lin_system.F +++ b/src/linear_algebra/PARALLEL_lin_system.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AF, 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. +! Copyright (C) 2016 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. -! -! 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): AF AM ! subroutine PARALLEL_lin_system(A,B,n,nrhs) ! diff --git a/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F b/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F index d3d5cec556..7f2ed10f66 100644 --- a/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F +++ b/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM,AF -! -! 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) 2006 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. -! -! 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 AF ! subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) ! diff --git a/src/linear_algebra/SERIAL_SVD_inversion.F b/src/linear_algebra/SERIAL_SVD_inversion.F index 4e6957bd97..4740ced738 100644 --- a/src/linear_algebra/SERIAL_SVD_inversion.F +++ b/src/linear_algebra/SERIAL_SVD_inversion.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! subroutine SERIAL_SVD_inversion(n,M,SVD_digits) ! diff --git a/src/linear_algebra/SERIAL_diagonalization.F b/src/linear_algebra/SERIAL_diagonalization.F index 899e6c73e7..5db0e97d2a 100644 --- a/src/linear_algebra/SERIAL_diagonalization.F +++ b/src/linear_algebra/SERIAL_diagonalization.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! subroutine SERIAL_diagonalization(n,M,E,V_left,V_right) ! diff --git a/src/linear_algebra/SERIAL_inversion.F b/src/linear_algebra/SERIAL_inversion.F index e1e57a46d2..5e4fffc3a6 100644 --- a/src/linear_algebra/SERIAL_inversion.F +++ b/src/linear_algebra/SERIAL_inversion.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine SERIAL_inversion(n,M,det,eval_det) ! diff --git a/src/linear_algebra/SERIAL_lin_system.F b/src/linear_algebra/SERIAL_lin_system.F index cc40189ad8..34082eb90d 100644 --- a/src/linear_algebra/SERIAL_lin_system.F +++ b/src/linear_algebra/SERIAL_lin_system.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AF -! -! 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. +! Copyright (C) 2015 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): AF ! subroutine SERIAL_lin_system(n,nrhs,A,B) ! diff --git a/src/linear_algebra/SLK_ORTHO_group.F b/src/linear_algebra/SLK_ORTHO_group.F index 5af0276042..995762b7e9 100644 --- a/src/linear_algebra/SLK_ORTHO_group.F +++ b/src/linear_algebra/SLK_ORTHO_group.F @@ -1,14 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, AF +! Copyright (C) 2016 The Yambo Team ! -! Copyright (C) 2001-2007 Quantum-ESPRESSO 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, -! or http://www.gnu.org/copyleft/gpl.txt . +! Authors (see AUTHORS file for details): AM AF ! subroutine SLK_ORTHO_group( ORTHO, POOL, nproc_try_in, comm_all ) ! diff --git a/src/linear_algebra/SLK_ORTHO_init.F b/src/linear_algebra/SLK_ORTHO_init.F index 75c1dbc6eb..fee1c0acec 100644 --- a/src/linear_algebra/SLK_ORTHO_init.F +++ b/src/linear_algebra/SLK_ORTHO_init.F @@ -1,14 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, AF +! Copyright (C) 2016 The Yambo Team ! -! Copyright (C) 2001-2007 Quantum-ESPRESSO 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, -! or http://www.gnu.org/copyleft/gpl.txt . +! Authors (see AUTHORS file for details): AM AF ! subroutine SLK_ORTHO_init( ORTHO, POOL, n_CPU_in ) ! diff --git a/src/linear_algebra/SLK_setup.F b/src/linear_algebra/SLK_setup.F index 69889a8efc..40fb0ede5f 100644 --- a/src/linear_algebra/SLK_setup.F +++ b/src/linear_algebra/SLK_setup.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, AF +! Copyright (C) 2006 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. -! -! 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. +! Authors (see AUTHORS file for details): AM AF ! subroutine SLK_setup( idriver, ncpu_in_use, ORTHO, POOL, COMM, INDEX_comm, slk_error) ! diff --git a/src/linear_algebra/SLK_test.F b/src/linear_algebra/SLK_test.F index 3bad0d5eba..9b0df0de57 100644 --- a/src/linear_algebra/SLK_test.F +++ b/src/linear_algebra/SLK_test.F @@ -1,32 +1,20 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, AF -! -! 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) 2016 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. -! -! 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 AF ! ! 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, -! or http://www.gnu.org/copyleft/gpl.txt . +! License-Identifier: GPL +! +! Copyright (C) 2016 The Yambo Team +! +! Authors (see AUTHORS file for details): AM AF ! subroutine SLK_test(E,k,q) ! diff --git a/src/matrices/.objects b/src/matrices/.objects index 13873af80f..13ae9ec6f0 100644 --- a/src/matrices/.objects +++ b/src/matrices/.objects @@ -2,4 +2,4 @@ SLK_objs = SLK_matrix_init.o #endif objs = $(SLK_objs) MATRIX_init.o MATRIX_duplicate.o MATRIX_transfer_side_crop.o \ - MATRIX_BSE_to_PAR.o MATRIX_PAR_to_from_PAR.o MATRIX_transfer.o + MATRIX_BSE_to_PAR.o MATRIX_PAR_to_from_PAR.o MATRIX_transfer.o MATRIX_transpose.o diff --git a/src/matrices/MATRIX_BSE_to_PAR.F b/src/matrices/MATRIX_BSE_to_PAR.F index f7123482b9..440a6af147 100644 --- a/src/matrices/MATRIX_BSE_to_PAR.F +++ b/src/matrices/MATRIX_BSE_to_PAR.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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. -! -! 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 ! subroutine MATRIX_BSE_to_PAR( M_bse , M_slk ) ! diff --git a/src/matrices/MATRIX_PAR_to_from_PAR.F b/src/matrices/MATRIX_PAR_to_from_PAR.F index d5c5e6996a..fc0c3ba5bb 100644 --- a/src/matrices/MATRIX_PAR_to_from_PAR.F +++ b/src/matrices/MATRIX_PAR_to_from_PAR.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 ! subroutine MATRIX_PAR_to_from_PAR( BLC_s, ROWS_s, COLS_s,& & BLC_r, ROWS_r, COLS_r ) diff --git a/src/matrices/MATRIX_duplicate.F b/src/matrices/MATRIX_duplicate.F index f78c758e03..d6d2fb3c16 100644 --- a/src/matrices/MATRIX_duplicate.F +++ b/src/matrices/MATRIX_duplicate.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! subroutine MATRIX_duplicate( operation, M_in, INDEX_in, M_out ) ! @@ -32,25 +16,31 @@ subroutine MATRIX_duplicate( operation, M_in, INDEX_in, M_out ) ! character(*) :: operation type(PAR_matrix), optional :: M_in - type(PAR_matrix) :: M_out integer , optional :: INDEX_in + type(PAR_matrix) :: M_out ! ! Work Space ! integer :: i_row,i_col,i_r,i_c,i_b,Nb_i(2),Nb_o(2) real(SP) :: pre_factor + logical :: do_Transpose,do_Conjg ! call MATRIX_reset(M_out) ! - if (operation=="free") then - YAMBO_FREE(M_out%blc) - return - endif + ! deallocation is done by MATRIX_reset + if (operation=="free") return + ! + if (.not.present(M_in)) call error("[MATRIX] M_in required and not present") + ! + do_Transpose=index(operation,"T")>0 + do_Conjg=index(operation,"C")>0 + ! ! M_out%kind = M_in%kind M_out%I = M_in%I - M_out%N = M_in%N - M_out%desc = M_in%desc + M_out%N = M_in%N + M_out%Nb = M_in%Nb + M_out%desc = M_in%desc M_out%lwork = M_in%lwork M_out%lrwork = M_in%lrwork M_out%liwork = M_in%liwork @@ -66,7 +56,7 @@ subroutine MATRIX_duplicate( operation, M_in, INDEX_in, M_out ) M_out%BLCncols = M_in%BLCncols M_out%BLCrows = M_in%BLCrows M_out%BLCcols = M_in%BLCcols - if (operation=="+TC".or.operation=="+T") then + if (do_Transpose) then M_out%rows = M_in%cols M_out%cols = M_in%rows M_out%nrows = M_in%ncols @@ -77,6 +67,8 @@ subroutine MATRIX_duplicate( operation, M_in, INDEX_in, M_out ) M_out%BLCncols = M_in%BLCnrows endif ! + ! redefine Nb, if needed + ! Nb_i=(/1, M_in%Nb /) Nb_o=(/1, M_out%Nb/) if (present(INDEX_in)) then @@ -86,6 +78,8 @@ subroutine MATRIX_duplicate( operation, M_in, INDEX_in, M_out ) endif M_out%Nb = Nb_o(2)-Nb_o(1)+1 ! + ! allocation + ! YAMBO_ALLOC(M_out%blc,(M_out%BLCrows(1):M_out%BLCrows(2),M_out%cols(1):M_out%BLCcols(2),Nb_o(1):Nb_o(2))) M_out%blc=cZERO ! @@ -97,10 +91,8 @@ subroutine MATRIX_duplicate( operation, M_in, INDEX_in, M_out ) pre_factor=1._SP if (index(operation,"-")>0 ) pre_factor=-1._SP ! -#if defined _OPENMP - !$omp parallel default(shared), private(i_row,i_col,i_r,i_c,i_b) - !$omp do -#endif + !$omp parallel do default(shared), private(i_row,i_col,i_r,i_c,i_b), & + !$omp & collapse(2) do i_row=M_in%rows(1),M_in%rows(2) do i_col=M_in%cols(1),M_in%cols(2) do i_b=Nb_i(1),Nb_i(2) @@ -108,12 +100,12 @@ subroutine MATRIX_duplicate( operation, M_in, INDEX_in, M_out ) i_r=i_row i_c=i_col ! - if (index(operation,"T")>0) then + if (do_Transpose) then i_r=i_col i_c=i_row endif ! - if (index(operation,"C")>0 ) then + if (do_Conjg) then M_out%blc(i_r,i_c,i_b+Nb_o(1)-Nb_i(1))=pre_factor*conjg(M_in%blc(i_row,i_col,i_b)) else M_out%blc(i_r,i_c,i_b+Nb_o(1)-Nb_i(1))=pre_factor*M_in%blc(i_row,i_col,i_b) @@ -122,9 +114,6 @@ subroutine MATRIX_duplicate( operation, M_in, INDEX_in, M_out ) enddo enddo enddo -#if defined _OPENMP - !$omp enddo - !$omp end parallel -#endif + !$omp end parallel do ! end subroutine diff --git a/src/matrices/MATRIX_init.F b/src/matrices/MATRIX_init.F index 3982849525..e0ecea6479 100644 --- a/src/matrices/MATRIX_init.F +++ b/src/matrices/MATRIX_init.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! subroutine MATRIX_init( what, M_par, N, Nb) ! diff --git a/src/matrices/MATRIX_transfer.F b/src/matrices/MATRIX_transfer.F index 0309042aa9..7e02b9ded9 100644 --- a/src/matrices/MATRIX_transfer.F +++ b/src/matrices/MATRIX_transfer.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 ! subroutine MATRIX_transfer( M_in, M_bse, M, M_out, INDEX_in, INDEX_out, SND, RCV, COMM, COMM_name) ! diff --git a/src/matrices/MATRIX_transfer_side_crop.F b/src/matrices/MATRIX_transfer_side_crop.F index 649fdf2d1d..0ac7aeffb1 100644 --- a/src/matrices/MATRIX_transfer_side_crop.F +++ b/src/matrices/MATRIX_transfer_side_crop.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine MATRIX_transfer_side_crop(I,J,O) ! diff --git a/src/matrices/MATRIX_transpose.F b/src/matrices/MATRIX_transpose.F new file mode 100644 index 0000000000..62215597d3 --- /dev/null +++ b/src/matrices/MATRIX_transpose.F @@ -0,0 +1,64 @@ +! +! Copyright (C) 2000-2020 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 MATRIX_transpose( operation, M_in, M_out ) + ! + ! performs the transpose (or transpose conjugate) of a distributed + ! matrix. + ! + ! operation = "T" | "TC" + ! + ! M_in is overwritten in output unless M_out is present + ! + use interfaces, ONLY:MATRIX_duplicate + use matrix, ONLY:PAR_matrix,MATRIX_reset +#include + ! + character(*) :: operation + type(PAR_matrix), optional :: M_in + type(PAR_matrix) :: M_out + ! + ! Work Space + ! + type(PAR_matrix) :: M_tmp + ! + ! note that here the parallel distribution is changed + ! is order to minimize (i.e. avoid) data transfer + ! + if (trim(operation)/="T".and.trim(operation)/="TC") & +& call error("[MATRIX] invalid operation in MATRIX_transpose") + ! + call MATRIX_reset(M_tmp) + ! + if (present(M_in)) then + call MATRIX_duplicate(operation, M_in=M_in, M_out=M_tmp) + else + call MATRIX_duplicate(operation, M_in=M_out, M_out=M_tmp) + endif + ! + call MATRIX_reset(M_out) + call MATRIX_duplicate("+1", M_in=M_tmp, M_out=M_out) + ! + call MATRIX_reset(M_tmp) + ! +end subroutine diff --git a/src/matrices/SLK_matrix_init.F b/src/matrices/SLK_matrix_init.F index 1a6ee5c335..73dc223171 100644 --- a/src/matrices/SLK_matrix_init.F +++ b/src/matrices/SLK_matrix_init.F @@ -1,32 +1,20 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, AF -! -! 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) 2016 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. -! -! 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 AF ! ! 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, -! or http://www.gnu.org/copyleft/gpl.txt . +! License-Identifier: GPL +! +! Copyright (C) 2016 The Yambo Team +! +! Authors (see AUTHORS file for details): AM AF ! subroutine SLK_matrix_init(M_slk, N, N_blocks) ! diff --git a/src/memory/MEM_bits.F b/src/memory/MEM_bits.F index 4b8cd8be85..d7a2649627 100644 --- a/src/memory/MEM_bits.F +++ b/src/memory/MEM_bits.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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 ! integer function MEM_LIB_finder( name ) ! diff --git a/src/memory/MEM_defaults.F b/src/memory/MEM_defaults.F index 81035949f9..67cbdcfeb5 100644 --- a/src/memory/MEM_defaults.F +++ b/src/memory/MEM_defaults.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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 ! subroutine MEM_defaults( ) ! diff --git a/src/memory/MEM_error.F b/src/memory/MEM_error.F index 144f45d9c0..32ca9dde6b 100644 --- a/src/memory/MEM_error.F +++ b/src/memory/MEM_error.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 DS ! subroutine MEM_error(what) ! diff --git a/src/memory/MEM_free.F b/src/memory/MEM_free.F index 5fe64bb8eb..17d16a4015 100644 --- a/src/memory/MEM_free.F +++ b/src/memory/MEM_free.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 DS ! subroutine MEM_free(what,Sz) ! diff --git a/src/memory/MEM_global_mesg.F b/src/memory/MEM_global_mesg.F index 05875fbe84..82c421d303 100644 --- a/src/memory/MEM_global_mesg.F +++ b/src/memory/MEM_global_mesg.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 DS ! subroutine MEM_global_mesg(what,xkind,HOST_SIZE) ! diff --git a/src/memory/MEM_library.F b/src/memory/MEM_library.F index ec5356c850..70ff46873b 100644 --- a/src/memory/MEM_library.F +++ b/src/memory/MEM_library.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine MEM_library(member,shelf) ! diff --git a/src/memory/MEM_manager_alloc.F b/src/memory/MEM_manager_alloc.F index c92fd303f9..9174f07c6f 100644 --- a/src/memory/MEM_manager_alloc.F +++ b/src/memory/MEM_manager_alloc.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 DS ! subroutine MEM_manager_alloc(what,Sz,Kn,where) ! diff --git a/src/memory/MEM_manager_init.F b/src/memory/MEM_manager_init.F index 279a74c400..3e96710017 100644 --- a/src/memory/MEM_manager_init.F +++ b/src/memory/MEM_manager_init.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 DS ! subroutine MEM_manager_init(what,adding,Sz,i_SHELF,i_COMPONENT,i_SAVE,SHELF,TRUNK,just_started) ! diff --git a/src/memory/MEM_manager_messages.F b/src/memory/MEM_manager_messages.F index 8d2ffc6f2a..3e4c2fe1c7 100644 --- a/src/memory/MEM_manager_messages.F +++ b/src/memory/MEM_manager_messages.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 DS ! subroutine MEM_manager_messages(what,adding,MEM_now_Kb,where) ! diff --git a/src/memory/MEM_report.F b/src/memory/MEM_report.F index 1494d8433c..20a496f5a4 100644 --- a/src/memory/MEM_report.F +++ b/src/memory/MEM_report.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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 ! subroutine MEM_report( REPORT ) ! diff --git a/src/memory/MEM_treshold_estimate.F b/src/memory/MEM_treshold_estimate.F index a53618d441..f6dd4cdea5 100644 --- a/src/memory/MEM_treshold_estimate.F +++ b/src/memory/MEM_treshold_estimate.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine MEM_treshold_estimate( ) ! diff --git a/src/modules/.objects b/src/modules/.objects index 47d63686fb..1b408d74cc 100644 --- a/src/modules/.objects +++ b/src/modules/.objects @@ -1,5 +1,5 @@ #if defined _SC || defined _RT || defined _QED || defined _NL -COMMON_objects = mod_collision_ext.o mod_plasma.o mod_COLL_interfaces.o mod_H_interfaces.o +COMMON_objects = mod_collision_ext.o mod_plasma.o mod_H_interfaces.o #endif #if defined _SC SC_objects = mod_SC.o @@ -12,7 +12,6 @@ RT_objects_post = mod_fields.o mod_RT_output.o mod_RT_control.o mod_RT_operatio #if defined _ELPH_ITERATIVE RT_objects_iterative = mod_RT_iterative.o #endif -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 @@ -21,6 +20,7 @@ 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 +RT_objects_pre = mod_RT_lifetimes.o mod_RT_occupations.o mod_real_time.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\ @@ -30,9 +30,9 @@ objs = mod_pars.o mod_units.o mod_lexical_sort.o mod_stderr.o mod_memory.o mod_o mod_matrix_operate.o mod_D_lattice.o mod_frequency.o \ mod_vec_operate.o mod_X.o mod_DIPOLES.o \ mod_functions.o mod_zeros.o mod_atom_proj.o mod_pseudo.o \ - mod_QP.o mod_collision_el.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_IO.o mod_IO_interfaces.o mod_COLL_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_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/DOUBLE_project.dep b/src/modules/DOUBLE_project.dep index 41c1b927ed..258e7e544e 100644 --- a/src/modules/DOUBLE_project.dep +++ b/src/modules/DOUBLE_project.dep @@ -14,6 +14,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/modules/ELPH_project.dep b/src/modules/ELPH_project.dep index b5839bd7cb..3a7a3f8e0f 100644 --- a/src/modules/ELPH_project.dep +++ b/src/modules/ELPH_project.dep @@ -1,2 +1,3 @@ SET_defaults.o + mod_interfaces.o diff --git a/src/modules/NL_project.dep b/src/modules/NL_project.dep index 65bdf5a427..3b9be1f900 100644 --- a/src/modules/NL_project.dep +++ b/src/modules/NL_project.dep @@ -1,4 +1,11 @@ SET_defaults.o mod_BS_solvers.o + mod_H_interfaces.o + mod_NL_interfaces.o + mod_collision_ext.o + mod_electric.o + mod_fields.o mod_interfaces.o + mod_nl_optics.o + mod_plasma.o diff --git a/src/modules/PHEL_project.dep b/src/modules/PHEL_project.dep new file mode 100644 index 0000000000..99bf7caa2b --- /dev/null +++ b/src/modules/PHEL_project.dep @@ -0,0 +1,2 @@ + mod_interfaces.o + diff --git a/src/modules/QED_project.dep b/src/modules/QED_project.dep index b5839bd7cb..f5cd30c6af 100644 --- a/src/modules/QED_project.dep +++ b/src/modules/QED_project.dep @@ -1,2 +1,5 @@ SET_defaults.o + mod_H_interfaces.o + mod_collision_ext.o + mod_plasma.o diff --git a/src/modules/RT_project.dep b/src/modules/RT_project.dep index b5839bd7cb..8812c6f028 100644 --- a/src/modules/RT_project.dep +++ b/src/modules/RT_project.dep @@ -1,2 +1,9 @@ SET_defaults.o + mod_H_interfaces.o + mod_RT_control.o + mod_RT_operations.o + mod_RT_output.o + mod_collision_ext.o + mod_fields.o + mod_plasma.o diff --git a/src/modules/SC_project.dep b/src/modules/SC_project.dep index b5839bd7cb..b9bcd799a2 100644 --- a/src/modules/SC_project.dep +++ b/src/modules/SC_project.dep @@ -1,2 +1,9 @@ SET_defaults.o + mod_H_interfaces.o + mod_SC.o + mod_collision_ext.o + mod_electric.o + mod_fields.o + mod_magnetic.o + mod_plasma.o diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index d7daecf8ae..dcd69fc168 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine SET_defaults(INSTR,IND,OD,COM_DIR) ! @@ -40,8 +24,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) 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, & -& QP_Sc_steps,QP_G_er,QP_G_dr,SC_band_mixing,& -& GWo_SC_done,GWo_iterations,GW_iterations,& +& QP_Sc_steps,QP_G_er,QP_G_ir,QP_G_dr,SC_band_mixing,QP_G_solver,& & COHSEX_use_empties,On_Mass_Shell_approx,& & Vnlxc_kind,Vxc_kind,l_extended_output,l_GW_terminator,& & GW_terminator_E @@ -53,12 +36,12 @@ 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,& -& cutoff_presets,k_map +& 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 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,& -& more_io_path,core_io_path,com_path,repfile,grid_paths,fat_log +& more_io_path,core_io_path,com_path,repfile,grid_paths,fat_log,exp_user 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 @@ -154,6 +137,11 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) fat_log = .FALSE. if (index(INSTR,'fatlog')>0) fat_log=.TRUE. ! + ! Experienced User + ! + exp_user = .FALSE. + if (index(INSTR,'expuser')>0) exp_user=.TRUE. + ! ! CPU structures ! call CPU_str_reset() @@ -280,6 +268,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) k_map%g0_idx =-1 k_map%q_step =-1 k_map%max_kdir= 0 + qindx_S_max_Go=-1 ! ! RIM ! @@ -292,6 +281,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) ! RIM-W ! RIM_W_ng=0 + RIMW_type="default" ! ! CUTOFF ! @@ -317,7 +307,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) n_spinor=1 n_spin_den=1 l_spin_orbit = .FALSE. - filled_tresh=0.00001 + filled_tresh =0.00001_SP ! ! Magnetization and density ! @@ -389,12 +379,11 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) QP_solver=' ' QP_G_damp=0.1/HA2EV QP_dSc_delta=0.1/HA2EV + QP_G_solver='ra' QP_G_er=(/-10._SP/HA2EV,10._SP/HA2EV/) + QP_G_ir=(/0._SP/HA2EV,0._SP/HA2EV/) QP_G_dr=0.1/HA2EV QP_cg_percent=100._SP - GWo_iterations=0 - GW_iterations =0 - GWo_SC_done=.FALSE. COHSEX_use_empties=.FALSE. On_Mass_Shell_approx=.FALSE. SC_E_threshold=0.01/HA2EV diff --git a/src/modules/SET_logicals.F b/src/modules/SET_logicals.F index 169dfd1419..9ed8cae0fd 100644 --- a/src/modules/SET_logicals.F +++ b/src/modules/SET_logicals.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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. -! -! 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 ! subroutine SET_logicals() ! @@ -27,9 +11,10 @@ subroutine SET_logicals() use drivers, ONLY:l_eval_collisions use parallel_m, ONLY:IO_write_default,master_cpu,myid,master_cpu,myid,n_log_CPUs,ncpu 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, & + 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,io_MULTIPOLE, & +& frag_DIP,frag_RESPONSE,frag_MULTIPOLE,frag_HF,frag_SC,frag_DG, & & 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 @@ -68,6 +53,7 @@ subroutine SET_logicals() !======== io_DIP =.TRUE. io_RESPONSE =.TRUE. + io_MULTIPOLE =.TRUE. io_SCREEN =.FALSE. io_HF =.TRUE. io_COLLs =.TRUE. @@ -103,16 +89,17 @@ subroutine SET_logicals() ! ! DBs fragmentation !=================== - frag_DIP =.TRUE. - frag_RESPONSE=.TRUE. - frag_SCREEN =.TRUE. - frag_HF =.FALSE. - frag_SC =.TRUE. - frag_RT =.TRUE. - frag_ELPH =.TRUE. - frag_QINDX =.FALSE. - frag_BS_K =.FALSE. - frag_DG =.TRUE. + frag_DIP =.TRUE. + frag_RESPONSE =.TRUE. + frag_MULTIPOLE=.TRUE. + frag_SCREEN =.TRUE. + frag_HF =.FALSE. + frag_SC =.TRUE. + frag_RT =.TRUE. + frag_ELPH =.TRUE. + frag_QINDX =.FALSE. + frag_BS_K =.FALSE. + frag_DG =.TRUE. ! ch_piece=' ' call STRING_split(DBs_FRAG_control_string,ch_piece) diff --git a/src/modules/YPP_ELPH_project.dep b/src/modules/YPP_ELPH_project.dep new file mode 100644 index 0000000000..51510bad65 --- /dev/null +++ b/src/modules/YPP_ELPH_project.dep @@ -0,0 +1,2 @@ + mod_ELPH.o + mod_PHEL.o diff --git a/src/modules/mod_ACFDT.F b/src/modules/mod_ACFDT.F index 35986b3b99..9503170a30 100644 --- a/src/modules/mod_ACFDT.F +++ b/src/modules/mod_ACFDT.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module ACFDT use pars, ONLY:SP diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index 70698f4696..fab9ab42ea 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, MG -! -! 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) 2006 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. -! -! 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 MG ! module BS ! @@ -328,7 +312,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_BS_solvers.F b/src/modules/mod_BS_solvers.F index c81ad327a3..56e228b36f 100644 --- a/src/modules/mod_BS_solvers.F +++ b/src/modules/mod_BS_solvers.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! module BS_solvers ! diff --git a/src/modules/mod_COLL_interfaces.F b/src/modules/mod_COLL_interfaces.F index ad1f74d1ea..209c38736f 100644 --- a/src/modules/mod_COLL_interfaces.F +++ b/src/modules/mod_COLL_interfaces.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module COLL_interfaces ! diff --git a/src/modules/mod_DICHROISM.F b/src/modules/mod_DICHROISM.F index a326425186..248cb2a53b 100644 --- a/src/modules/mod_DICHROISM.F +++ b/src/modules/mod_DICHROISM.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2011 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 DS ! module DICHROISM ! diff --git a/src/modules/mod_DIPOLES.F b/src/modules/mod_DIPOLES.F index 6a35765059..189499889c 100644 --- a/src/modules/mod_DIPOLES.F +++ b/src/modules/mod_DIPOLES.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): DS ! module DIPOLES ! diff --git a/src/modules/mod_D_lattice.F b/src/modules/mod_D_lattice.F index 24512f2bed..6d1a3088ef 100644 --- a/src/modules/mod_D_lattice.F +++ b/src/modules/mod_D_lattice.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module D_lattice ! diff --git a/src/modules/mod_ELPH.F b/src/modules/mod_ELPH.F index 5532cfbc07..7628f7d51d 100644 --- a/src/modules/mod_ELPH.F +++ b/src/modules/mod_ELPH.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 ! module ELPH ! @@ -64,6 +48,7 @@ module ELPH integer :: ID_E_kpq=1 integer :: ID_E_kpq_obj=1 real(SP) :: E_kpq_sh_fact=20.0_SP + real(SP) :: Efermi_DbGd=0._SP ! type E_kpq_fine_grid integer :: nk diff --git a/src/modules/mod_FFT.F b/src/modules/mod_FFT.F index 8838d40894..e3a2e84c91 100644 --- a/src/modules/mod_FFT.F +++ b/src/modules/mod_FFT.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module FFT_m use pars, ONLY: SP diff --git a/src/modules/mod_H_interfaces.F b/src/modules/mod_H_interfaces.F index 47123ec149..ffe75b00a3 100644 --- a/src/modules/mod_H_interfaces.F +++ b/src/modules/mod_H_interfaces.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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): DS ! module H_interfaces ! diff --git a/src/modules/mod_IO.F b/src/modules/mod_IO.F index ed4b22aa03..f8c6dc2328 100644 --- a/src/modules/mod_IO.F +++ b/src/modules/mod_IO.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 DS ! module IO_m ! @@ -48,6 +32,7 @@ module IO_m character(lchlen) :: DBs_IO_control_string = "none" logical :: io_DIP logical :: io_RESPONSE + logical :: io_MULTIPOLE logical :: io_HF logical :: io_COLLs logical :: io_OBSERVABLES @@ -61,6 +46,7 @@ module IO_m logical :: frag_DIP logical :: frag_DG logical :: frag_RESPONSE + logical :: frag_MULTIPOLE logical :: frag_WF logical :: frag_QINDX logical :: frag_HF @@ -122,6 +108,11 @@ module IO_m #else complex(SP), parameter :: YAMBO_CMPLX_NO_FILL = cmplx(nf90_fill_real, nf90_fill_real) #endif + ! + ! Netcdf chunking + ! For SP, we chunk in 2MB and double 4MB. These are in general small chunk sizes. + ! For more information see https://www.unidata.ucar.edu/software/netcdf/workshops/2011/nc4chunking/ + integer, parameter :: YAMBO_DEF_CHUNK = 512 ! ! Units ! @@ -253,12 +244,14 @@ integer function manage_action(IO_ACTION,NOW,FIRST,LAST,PAR_index,element_1D) manage_action=IO_ACTION ! if (IO_ACTION== OP_IF_START_RD_CL_IF_END.and.NOW> start_.and.NOW< end_) manage_action= RD + if (IO_ACTION== RD_CL_IF_END.and. NOW< end_) manage_action= RD if (IO_ACTION== OP_IF_START_RD_CL_IF_END.and.NOW==start_ ) manage_action= OP_RD if (IO_ACTION== OP_IF_START_RD_CL_IF_END.and. NOW==end_) manage_action= RD_CL if (IO_ACTION== RD_CL_IF_END.and. NOW==end_) manage_action= RD_CL if (IO_ACTION== OP_IF_START_RD_CL_IF_END.and.NOW==start_.and.NOW==end_) manage_action= OP_RD_CL ! if (IO_ACTION== OP_IF_START_WR_CL_IF_END.and.NOW> start_.and.NOW< end_) manage_action= WR + if (IO_ACTION== WR_CL_IF_END.and. NOW< end_) manage_action= WR if (IO_ACTION== OP_IF_START_WR_CL_IF_END.and.NOW==start_ ) manage_action= OP_WR if (IO_ACTION== OP_IF_START_WR_CL_IF_END.and. NOW==end_) manage_action= WR_CL if (IO_ACTION== WR_CL_IF_END.and. NOW==end_) manage_action= WR_CL diff --git a/src/modules/mod_IO_interfaces.F b/src/modules/mod_IO_interfaces.F index f901be345d..76201c1b5b 100644 --- a/src/modules/mod_IO_interfaces.F +++ b/src/modules/mod_IO_interfaces.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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. -! -! 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 DS ! module IO_int ! @@ -110,7 +94,7 @@ subroutine def_variable_elemental(ID,VAR,VAR_SZ,VAR_KIND,MENU,dim_names,par_io_k character(*), optional, intent(in) :: par_io_kind end subroutine def_variable_elemental ! - subroutine def_variable_bulk(ID,VAR,VAR_ID,VAR_SZ,VAR_KIND,dim_names,par_io_kind,silent) + subroutine def_variable_bulk(ID,VAR,VAR_ID,VAR_SZ,VAR_KIND,dim_names,par_io_kind,silent,chunksize) use pars, ONLY:schlen integer, intent(in) :: ID character(*), intent(in) :: VAR @@ -120,6 +104,7 @@ subroutine def_variable_bulk(ID,VAR,VAR_ID,VAR_SZ,VAR_KIND,dim_names,par_io_kind character(schlen), optional, intent(in) :: dim_names(:) character(*), optional, intent(in) :: par_io_kind logical, optional, intent(in) :: silent + integer, optional, intent(in) :: chunksize(:) end subroutine def_variable_bulk ! subroutine io_variable_elemental(ID,VAR,CHECK,WARN,OP, & diff --git a/src/modules/mod_LIVE_t.F b/src/modules/mod_LIVE_t.F index 5e3076bb7f..cbce26e758 100644 --- a/src/modules/mod_LIVE_t.F +++ b/src/modules/mod_LIVE_t.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module LIVE_t ! @@ -443,7 +427,11 @@ subroutine live_timing_update(xch,ech) ! Copyright (C) 1998-2002 ABINIT group (DCA, XG, GMR, LSI, MM, MT) ! This file is distributed under the terms of the ! GNU General Public License, see ~ABINIT/Infos/copyright - ! or http://www.gnu.org/copyleft/gpl.txt . +! License-Identifier: GPL +! +! Copyright (C) 2006 The Yambo Team +! +! Authors (see AUTHORS file for details): AM ! ! NOTES ! For CPU time, contains machine-dependent code (choice will be selected diff --git a/src/modules/mod_MAGNONS.F b/src/modules/mod_MAGNONS.F index 781ffc1e83..e4dbc54de8 100644 --- a/src/modules/mod_MAGNONS.F +++ b/src/modules/mod_MAGNONS.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2011 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 DS ! module MAGNONS ! diff --git a/src/modules/mod_MPA.F b/src/modules/mod_MPA.F new file mode 100644 index 0000000000..eda6ba071d --- /dev/null +++ b/src/modules/mod_MPA.F @@ -0,0 +1,739 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2019 The Yambo Team +! +! Authors (see AUTHORS file for details): DALV,AF +! +!------------------------------------------------------------ +! Multipole interpolation: +! - analytical solution for 1-3 poles +! - Linear solver for n poles* +! - Pade-Thiele solver for n poles* +! +! Failure condition for the position of the poles* +! +! *DA. Leon et al, PRB 104, 115157 (2021) +! +! Notes: +! +! 1) X(w) is approximated as a sum of poles +! 2) Form of one pole: -P/(w**2-Q) = 2*E*R/(w**2-E**2) +! 3) The input are two w and X(w) for each pole +! 4) The output are E and R coefficients +! 5) Use real(R), imaginary(I) or complex(C) w +! +! **The module works for scalar polarizabilities, so if +! one wants the solution for matrix element X(G,G',q) +! then RQ_solver should be called for each G, G' and q. +!------------------------------------------------------------ +! +module mpa_m + ! + use pars, ONLY:SP,DP,cZERO,cONE,cI + use functions, ONLY:NAN + ! +#include +#include + + complex(SP), allocatable, target :: MPA_E_mat(:,:,:) + complex(SP), allocatable, target :: MPA_R_mat(:,:,:) + complex(SP), allocatable, target :: MPA_freqs(:) + ! + complex(SP), allocatable DEV_ATTR, target :: MPA_E_mat_d(:,:,:) + complex(SP), allocatable DEV_ATTR, target :: MPA_R_mat_d(:,:,:) + + public :: mpa_RE_solver,err_func_X + public :: MPA_alloc,MPA_free + +contains + ! + subroutine MPA_alloc(d) + implicit none + integer :: d(4) + call MPA_free() + YAMBO_ALLOC(MPA_E_mat,(d(1),d(2),d(3))) + YAMBO_ALLOC(MPA_R_mat,(d(1),d(2),d(3))) + YAMBO_ALLOC(MPA_freqs,(d(4))) +#ifdef _CUDA + YAMBO_ALLOC(MPA_E_mat_d,(d(1),d(2),d(3))) + YAMBO_ALLOC(MPA_R_mat_d,(d(1),d(2),d(3))) +#endif + end subroutine + + subroutine MPA_free() + YAMBO_FREE(MPA_E_mat) + YAMBO_FREE(MPA_R_mat) + YAMBO_FREE(MPA_freqs) +#ifdef _CUDA + YAMBO_FREE(MPA_E_mat_d) + YAMBO_FREE(MPA_R_mat_d) +#endif + end subroutine + ! + subroutine mpa_cond1(z, E, PPcond_rate) + ! + complex(SP), intent(in) :: z(2) + complex(SP), intent(inout) :: E + real(SP), intent(out) :: PPcond_rate + ! + PPcond_rate=0._SP + ! + if(NAN(abs(E)) .or. abs(E)<0.00001_SP) then + E=abs(z(2))-cI*epsilon(1._SP) + PPcond_rate=1._SP + elseif(real(E)>0._SP) then + E = sqrt(E) + else + E = sqrt(-conjg(E)) ! DALV: PPA uses E = 1._SP + PPcond_rate=1._SP + endif + ! + ! DALV: since MPA uses complex poles we need to guarantee the time ordering + ! + if(real(E)<0._SP) E=-E + if(aimag(E)>-epsilon(1._SP)) E=real(E,SP)-cI*epsilon(1._SP) + ! + end subroutine mpa_cond1 + ! + function pole_is_out(i, wmax, thr, E) + implicit none + ! + integer , intent(in) :: i + real(SP), intent(in) :: wmax, thr + complex(SP), intent(inout) :: E(:) + ! + integer :: j + logical :: pole_is_out + ! + pole_is_out=.false. + ! + if(real(E(i),SP)>wmax) pole_is_out=.true. + ! + j=1 + do while(jmax(abs(aimag(E(j))),abs(aimag(E(i))))) then + E(j)=(real(E(j),SP)+real(E(i),SP))/2._SP-cI*max(abs(aimag(E(j))),abs(aimag(E(i)))) + else + E(j)=(real(E(j),SP)+real(E(i),SP))/2._SP-cI*min(abs(aimag(E(j))),abs(aimag(E(i)))) + endif + ! + endif + ! + j=j+1 + ! + enddo + ! + endfunction pole_is_out + ! + subroutine mpa_cond(np, npr, z, E, PPcond) + ! + integer, intent(in) :: np + integer, intent(out) :: npr + logical, intent(out) :: PPcond(np) + complex(SP), intent(in) :: z(2*np) + complex(SP), intent(inout) :: E(np) + ! + integer :: i, j + complex(SP) :: Eaux(np) + real(SP) :: wmax, thr=0.00001_SP + ! + npr=np + wmax=maxval(sqrt(real(z,SP)))*1.5_SP !DALV: we were using the square before, now we use 1.5* the extreme of the interval + ! + i=1 + do while(i<=npr) + ! + Eaux(i)=sqrt(E(i)) + ! + do while(pole_is_out(i,wmax,thr,Eaux).and.i<=npr) + Eaux(i)=sqrt(E(npr)) + PPcond(npr)=.true. + npr=npr-1 + enddo + ! + if(.not.pole_is_out(i,wmax,thr,Eaux).and.abs(real(Eaux(i),SP))anorm) anorm=abs(A(k,i)) + enddo + enddo + ! +#ifdef _DOUBLE + call zgecon('I', np, A, np, anorm, rcond, work, rwork, info) + call zgesv(np, 1, A, np, ind, R, np, info) +#else + call cgecon('I', np, A, np, anorm, rcond, work, rwork, info) + call cgesv(np, 1, A, np, ind, R, np, info) +#endif + ! + end subroutine mpa_R_solver + ! + subroutine mpa_E_solver(np, npr, z, xq, E, PPcond, econd) + implicit none + integer, intent(in) :: np + integer, intent(out) :: npr + complex(SP), intent(in) :: z(2*np) + complex(SP), intent(in) :: xq(2*np) + complex(SP), intent(out) :: E(np) + logical, intent(out) :: PPcond(np) + real(SP), intent(out) :: econd(2) + ! + complex(SP) :: Z1(np,np), Z2(np,np), M1(np,np), M2(np,np), v1(np) + complex(SP) :: M(np,np), b(np), Companion(np,np) + complex(SP) :: rwork(2*np),work(2*np),VR(np),VL(np),S(np),RCE(np,np),RCV(np,np),ABNRM + integer :: i, j, info, ind(np), ILO,IHI + real(SP) :: rcond, anorm, Wm + ! + PPcond(:)=.true. + Wm = maxval(abs(z(1:np))) + ! + do j = 1, np + ind(j) = j + v1(j) = xq(j )*z(j )**np + b (j) = xq(j+np)*z(j+np)**np + Z1(j,1) = 1._SP + Z2(j,1) = 1._SP + M1(j,1) = -xq(j) + M2(j,1) = -xq(j+np) + M (j,1) = 0._SP + M (j,j) = 1._SP + ! + do i = 2, np + Z1(j,i) = (z(j)/Wm)**(i-1) + Z2(j,i) = (z(j+np)/Wm)**(i-1) + M1(j,i) = -xq(j )*Z1(j,i) + M2(j,i) = -xq(j+np)*Z2(j,i) + if(i/=j) M(j,i) = 0._SP + enddo + ! + enddo + ! + anorm=abs(Z1(1,1)) + ! + do j = 1, np + do i = 1, np + if(abs(Z1(j,i))>anorm) anorm=abs(Z1(j,i)) + enddo + enddo + ! +#ifdef _DOUBLE + call zgecon('I', np, Z1, np, anorm, econd(1), work, rwork, info) + call zgesv(np, np, Z1, np, ind, M, np,info) +#else + call cgecon('I', np, Z1, np, anorm, econd(1), work, rwork, info) + call cgesv(np, np, Z1, np, ind, M, np,info) +#endif + ! + M = matmul(Z2,M) + M2 = matmul(M,M1) - M2 + b = matmul(M,v1) - b + ! + M = 0.0_SP + ! + do i =1,np + M(i,i) = 1.0_SP + enddo + ! + anorm=abs(M2(1,1)) + ! + do j = 1, np + do i = 1, np + if(abs(M2(j,i))>anorm) anorm=abs(M2(j,i)) + enddo + enddo + ! +#ifdef _DOUBLE + call zgecon('I', np, M2, np, anorm, econd(2), work, rwork, info) + call zgesv(np, 1, M2, np, ind, b, np, info) +#else + call cgecon('I', np, M2, np, anorm, econd(2), work, rwork, info) + call cgesv(np, 1, M2, np, ind, b, np, info) +#endif + ! + Companion=0._SP + Companion(1,np) = -b(1) + ! + do i = 2, np + Companion(i,np) = -b(i)/Wm**(i-1) + Companion(i,i-1) = 1._SP + enddo + ! +#ifdef _DOUBLE + call zgeev( 'N', 'N', np, Companion, np, E, VL, 1, VR, 1, work, 2*np, rwork, info ) +#else + call cgeev( 'N', 'N', np, Companion, np, E, VL, 1, VR, 1, work, 2*np, rwork, info ) +#endif + ! + ! DALV: here we need to force real(E) to be positive. + ! This is because of the way the residue integral is performed, later. + ! + call mpa_cond(np, npr, z, E, PPcond) + ! + end subroutine mpa_E_solver + ! + subroutine mpa_E_solver_Pade(np, npr, z, X, E, PPcond) + implicit none + integer, intent(in) :: np + integer, intent(out) :: npr + complex(SP), intent(in) :: z(2*np) + complex(SP), intent(in) :: X(2*np) + complex(SP), intent(out) :: E(np) + logical, intent(out) :: PPcond(np) + ! + complex(SP) :: c(2*np), b(np+1), Companion(np,np) + complex(SP) :: c_m1(2*np), b_m1(np+1), b_m2(np+1) + complex(SP) :: rwork(2*np),work(2*np),VR(np),VL(np) + integer :: i, j, info + real(SP) :: rcond, anorm, Wm + ! + PPcond(:)=.true. + b_m1(1)=1._SP + b_m2(1)=1._SP + b_m1(2:)=0._SP + b_m2(2:)=0._SP + b=b_m1 + c=X + c_m1=c + ! + do i=2, 2*np + ! + do j=i, 2*np + c(j)=(c_m1(i-1)-c_m1(j))/((z(j)-z(i-1))*c_m1(j)) + enddo + ! + c_m1=c + ! + do j=1, np+1 + b(j)=b_m1(j)-z(i-1)*c(i)*b_m2(j) + enddo + ! + do j=1, np + b_m2(np+2-j)=c(i)*b_m2(np+1-j) + enddo + ! + do j=1, np + b(j+1)=b(j+1)+b_m2(j+1) + enddo + ! + b_m2=b_m1 + b_m1=b + ! + enddo + ! + Companion=0._SP + Companion(1,np) = -b(1)/b(np+1) + ! + do i = 2, np + Companion(i,np) = -b(i)/b(np+1) + Companion(i,i-1) = 1._SP + enddo + ! +#ifdef _DOUBLE + call zgeev( 'N', 'N', np, Companion, np, E, VL, 1, VR, 1, work, 2*np, rwork, info ) +#else + call cgeev( 'N', 'N', np, Companion, np, E, VL, 1, VR, 1, work, 2*np, rwork, info ) +#endif + ! + ! DALV: here we need to force real(E) to be positive. + ! This is because of the way the residue integral is performed, later. + ! + call mpa_cond(np, npr, z, E, PPcond) + ! + end subroutine mpa_E_solver_Pade + ! + subroutine mpa_RE_solver(np, w, x, R, E,mpa_sol,MPred,PPcond_rate,MP_err,cond_num) + implicit none + ! + integer, intent(in) :: np + complex(SP), intent(in) :: w(2*np), x(2*np) + complex(SP), intent(out) :: R(np), E(np) + character(2), intent(in) :: mpa_sol + logical, intent(out) :: MPred + real(SP), intent(out) :: PPcond_rate,MP_err + ! + integer :: i,npr + logical :: PPcond(np) + real(SP) :: cond_num(2) + ! + PPcond_rate=0._SP + ! + select case(np) + case(1) + ! + call mpa_E_1p_solver(w, x, E(1), PPcond_rate) + call mpa_R_fit(1, 1, w, x, R, E) + ! + ! DALV: we can also use the particular solutions in the cases of 2 and 3 poles + ! + case default + ! + if(mpa_sol=='LA') then + call mpa_E_solver(np, npr, w**2, x, E, PPcond, cond_num) + cond_num=log10(1._SP/cond_num) + else ! DALV: we use Pade-Thiele instead (mpa_sol='PT') + cond_num=0. + call mpa_E_solver_Pade(np, npr, w**2, x, E, PPcond) + endif + ! + if(nprepsilon(1._SP)) then + q(1)=q(1)/a + q(2)=q(2)/a + endif + ! + den = (q(1)-q(2))*(w(2)-w(3))*(w(2)+w(3)) + r(1) = -(q(1) - w(2)**2)*(q(1) - w(3)**2)*( x(3)*w(3)**2 - x(2)*w(2)**2 + q(2)*(x(2) - x(3)) ) + r(2) = (q(2) - w(2)**2)*(q(2) - w(3)**2)*( x(3)*w(3)**2 - x(2)*w(2)**2 + q(1)*(x(2) - x(3)) ) + ! + if(abs(den)>epsilon(1._SP)) then + r(1)=r(1)/den + r(2)=r(2)/den + endif + ! + end subroutine mpa_RQ_2p_solver + ! + ! + function f1(t, w, x) + implicit none + complex(SP), intent(in) :: w(6) + complex(SP), intent(in) :: x(6) + integer, intent(in) :: t + ! + complex(SP) :: f1 + ! + f1 = (x(1)-x(2)) *w(3)**2 *w(t)**2 *(w(3)**2 - w(t)**2) - & + (x(1)-x(3)) *w(2)**2 *w(t)**2 *(w(2)**2 - w(t)**2) + & + (x(1)-x(t)) *w(2)**2 *w(3)**2 *(w(2)**2 - w(3)**2) + & + (x(2)-x(3)) *w(1)**2 *w(t)**2 *(w(1)**2 - w(t)**2) - & + (x(2)-x(t)) *w(1)**2 *w(3)**2 *(w(1)**2 - w(3)**2) + & + (x(3)-x(t)) *w(1)**2 *w(2)**2 *(w(1)**2 - w(2)**2) + ! + end function + ! + ! + function f2(t, w, x) + implicit none + complex(SP), intent(in) :: w(6) + complex(SP), intent(in) :: x(6) + integer, intent(in) :: t + ! + complex(SP) :: f2 + ! + f2 = (x(1)-x(2)) *w(1)**2 *w(2)**2 *(w(3)**4 - w(t)**4) - & + (x(1)-x(3)) *w(1)**2 *w(3)**2 *(w(2)**4 - w(t)**4) + & + (x(1)-x(t)) *w(1)**2 *w(t)**2 *(w(2)**4 - w(3)**4) + & + (x(2)-x(3)) *w(2)**2 *w(3)**2 *(w(1)**4 - w(t)**4) - & + (x(2)-x(t)) *w(2)**2 *w(t)**2 *(w(1)**4 - w(3)**4) + & + (x(3)-x(t)) *w(3)**2 *w(t)**2 *(w(1)**4 - w(2)**4) + ! + end function + ! + ! + function f3(t, w, x) + implicit none + complex(SP), intent(in) :: w(6) + complex(SP), intent(in) :: x(6) + integer, intent(in) :: t + ! + complex(SP) :: f3 + ! + f3 = (x(1)-x(2)) *w(1)**4 *w(2)**4 *(w(3)**2 - w(t)**2) - & + (x(1)-x(3)) *w(1)**4 *w(3)**4 *(w(2)**2 - w(t)**2) + & + (x(1)-x(t)) *w(1)**4 *w(t)**4 *(w(2)**2 - w(3)**2) + & + (x(2)-x(3)) *w(2)**4 *w(3)**4 *(w(1)**2 - w(t)**2) - & + (x(2)-x(t)) *w(2)**4 *w(t)**4 *(w(1)**2 - w(3)**2) + & + (x(3)-x(t)) *w(3)**4 *w(t)**4 *(w(1)**2 - w(2)**2) + ! + end function + ! + ! + function f4(t, w, x) + implicit none + complex(SP), intent(in) :: w(6) + complex(SP), intent(in) :: x(6) + integer, intent(in) :: t + ! + complex(SP) :: f4 + ! + f4 = x(1) *w(1)**6 * (w(2)**2 - w(3)**2) * (w(2)**2 - w(t)**2) * (w(3)**2 - w(t)**2) - & + x(2) *w(2)**6 * (w(1)**2 - w(3)**2) * (w(1)**2 - w(t)**2) * (w(3)**2 - w(t)**2) + & + x(3) *w(3)**6 * (w(1)**2 - w(2)**2) * (w(1)**2 - w(t)**2) * (w(2)**2 - w(t)**2) - & + x(t) *w(t)**6 * (w(1)**2 - w(2)**2) * (w(1)**2 - w(3)**2) * (w(2)**2 - w(3)**2) + ! + end function + ! + ! + subroutine mpa_RQ_3p_solver(w, x, r, q) + implicit none + complex(SP), intent(in) :: w(6) + complex(SP), intent(in) :: x(6) + complex(SP), intent(out) :: r(3), q(3) + ! + integer :: i, j + complex(SP) :: a, b, c, d ! DALV: coefficients of the w^2 polynomial + complex(SP) :: D1, D2, den, deR + real(SP) :: t=0.33333333333333334_SP + complex(SP) :: s=(1._SP, 1.7320508075688772_SP) + ! + ! + a = f1(4, w, x)* ( f2(5, w, x)*f3(6, w, x) - f2(6, w, x)*f3(5, w, x) ) - & + f1(5, w, x)* ( f2(4, w, x)*f3(6, w, x) - f2(6, w, x)*f3(4, w, x) ) + & + f1(6, w, x)* ( f2(4, w, x)*f3(5, w, x) - f2(5, w, x)*f3(4, w, x) ) + ! + b = -f1(4, w, x)* ( f2(5, w, x)*f4(6, w, x) - f2(6, w, x)*f4(5, w, x) ) + & + f1(5, w, x)* ( f2(4, w, x)*f4(6, w, x) - f2(6, w, x)*f4(4, w, x) ) - & + f1(6, w, x)* ( f2(4, w, x)*f4(5, w, x) - f2(5, w, x)*f4(4, w, x) ) + ! + c = -f4(4, w, x)* ( f1(5, w, x)*f3(6, w, x) - f1(6, w, x)*f3(5, w, x) ) + & + f4(5, w, x)* ( f1(4, w, x)*f3(6, w, x) - f1(6, w, x)*f3(4, w, x) ) - & + f4(6, w, x)* ( f1(4, w, x)*f3(5, w, x) - f1(5, w, x)*f3(4, w, x) ) + ! + d = -f4(4, w, x)* ( f2(5, w, x)*f3(6, w, x) - f2(6, w, x)*f3(5, w, x) ) + & + f4(5, w, x)* ( f2(4, w, x)*f3(6, w, x) - f2(6, w, x)*f3(4, w, x) ) - & + f4(6, w, x)* ( f2(4, w, x)*f3(5, w, x) - f2(5, w, x)*f3(4, w, x) ) + ! + D1 = 3._SP*a*c - b**2 + D2 = 2._SP*b*D1 + 3._SP*a*(b*c - 9._SP*a*d) + den = ( D2 + sqrt(4.0_SP*D1**3 + D2**2) )**(t) + ! + q(1) = -( den*(b- den/2._SP**(t)) + 2.0_SP**(t)*D1)/3.0_SP + q(2) = -( den*(b+ conjg(s)* den/2._SP**(4._SP*t)) - s* D1/2._SP**(2._SP*t) )/3._SP + q(3) = -( den*(b+ s*den/2._SP**(4._SP*t)) - conjg(s)* D1/2._SP**(2._SP*t) )/3._SP + ! + if(abs(den*a)>epsilon(1._SP)) then + q(1)=q(1)/(den*a) + q(2)=q(2)/(den*a) + q(3)=q(3)/(den*a) + endif + ! + deR = (w(1)**2-q(1)) * (w(1)**2-q(2)) * (w(2)**2-q(3)) * (w(3)**2-q(3))* & + ((w(2)**2-q(1)) * (w(3)**2-q(2)) - (w(2)**2-q(2)) * (w(3)**2-q(1))) & + +(w(1)**2-q(1)) * (w(1)**2-q(3)) * (w(2)**2-q(2)) * (w(3)**2-q(2))* & + ((w(2)**2-q(3)) * (w(3)**2-q(1)) - (w(2)**2-q(1)) * (w(3)**2-q(3))) & + +(w(1)**2-q(2)) * (w(1)**2-q(3)) * (w(2)**2-q(1)) * (w(3)**2-q(1))* & + ((w(2)**2-q(2)) * (w(3)**2-q(3)) - (w(2)**2-q(3)) * (w(3)**2-q(2))) + ! + r(1) = (w(1)**2-q(1))*(w(2)**2-q(1))*(w(3)**2-q(1))*( & + -(w(1)**2-q(2))*(w(1)**2-q(3))*( (w(2)**2-q(2))*(w(3)**2-q(3)) - (w(2)**2-q(3))*(w(3)**2-q(2)) )*x(1) & + +(w(2)**2-q(2))*(w(2)**2-q(3))*( (w(1)**2-q(2))*(w(3)**2-q(3)) - (w(1)**2-q(3))*(w(3)**2-q(2)) )*x(2) & + -(w(3)**2-q(2))*(w(3)**2-q(3))*( (w(1)**2-q(2))*(w(2)**2-q(3)) - (w(1)**2-q(3))*(w(2)**2-q(2)) )*x(3) ) + ! + r(2) = (w(1)**2-q(2))*(w(2)**2-q(2))*(w(3)**2-q(2))*( & + +(w(1)**2-q(1))*(w(1)**2-q(3))*( (w(2)**2-q(1))*(w(3)**2-q(3)) - (w(2)**2-q(3))*(w(3)**2-q(1)) )*x(1) & + -(w(2)**2-q(1))*(w(2)**2-q(3))*( (w(1)**2-q(1))*(w(3)**2-q(3)) - (w(1)**2-q(3))*(w(3)**2-q(1)) )*x(2) & + +(w(3)**2-q(1))*(w(3)**2-q(3))*( (w(1)**2-q(1))*(w(2)**2-q(3)) - (w(1)**2-q(3))*(w(2)**2-q(1)) )*x(3) ) + ! + r(3) = (w(1)**2-q(3))*(w(2)**2-q(3))*(w(3)**2-q(3))*( & + -(w(1)**2-q(1))*(w(1)**2-q(2))*( (w(2)**2-q(1))*(w(3)**2-q(2)) - (w(2)**2-q(2))*(w(3)**2-q(1)) )*x(1) & + +(w(2)**2-q(1))*(w(2)**2-q(2))*( (w(1)**2-q(1))*(w(3)**2-q(2)) - (w(1)**2-q(2))*(w(3)**2-q(1)) )*x(2) & + -(w(3)**2-q(1))*(w(3)**2-q(2))*( (w(1)**2-q(1))*(w(2)**2-q(2)) - (w(1)**2-q(2))*(w(2)**2-q(1)) )*x(3) ) + ! + if(abs(deR)>epsilon(1._SP)) then + r(1)=r(1)/deR + r(2)=r(2)/deR + r(3)=r(3)/deR + endif + ! + end subroutine mpa_RQ_3p_solver + ! +end module mpa_m + diff --git a/src/modules/mod_NL_interfaces.F b/src/modules/mod_NL_interfaces.F index 8cb53bd59c..d0cb56b957 100644 --- a/src/modules/mod_NL_interfaces.F +++ b/src/modules/mod_NL_interfaces.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2019 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): DS ! module NL_interfaces ! diff --git a/src/modules/mod_OUTPUT.F b/src/modules/mod_OUTPUT.F index 56c807b85e..0123dd76e6 100644 --- a/src/modules/mod_OUTPUT.F +++ b/src/modules/mod_OUTPUT.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module OUTPUT ! diff --git a/src/modules/mod_Overlaps.F b/src/modules/mod_Overlaps.F index 646d54bd32..52457933b2 100644 --- a/src/modules/mod_Overlaps.F +++ b/src/modules/mod_Overlaps.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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. -! -! 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): MG CA ! module Overlaps_m ! diff --git a/src/modules/mod_PHEL.F b/src/modules/mod_PHEL.F index 646dd97055..31dac06077 100644 --- a/src/modules/mod_PHEL.F +++ b/src/modules/mod_PHEL.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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 FP ! module PHEL ! diff --git a/src/modules/mod_PHOTOLUM.F b/src/modules/mod_PHOTOLUM.F index 7cf4845f07..559e3201b9 100644 --- a/src/modules/mod_PHOTOLUM.F +++ b/src/modules/mod_PHOTOLUM.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module PHOTOLUM ! diff --git a/src/modules/mod_POL_FIT.F b/src/modules/mod_POL_FIT.F index a25e199ea9..0f7eec521b 100644 --- a/src/modules/mod_POL_FIT.F +++ b/src/modules/mod_POL_FIT.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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 ! ! POL_Gilbreth_fit based on: ! diff --git a/src/modules/mod_QP.F b/src/modules/mod_QP.F index 61742dc0af..b86bda371c 100644 --- a/src/modules/mod_QP.F +++ b/src/modules/mod_QP.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module QP_m ! @@ -46,13 +30,9 @@ module QP_m integer :: QP_ng_SH integer :: QP_ng_Vxc integer :: QP_n_G_bands(2) - integer :: GWo_iterations - integer :: GW_iterations - logical :: GWo_SC_done logical :: COHSEX_use_empties logical :: l_QP_symmetrize=.FALSE. logical :: l_GW_terminator=.FALSE. - logical :: l_update_W=.FALSE. logical :: l_QP_Expand logical :: use_GreenF_to_eval_QP logical :: use_GreenF_Zoom @@ -63,6 +43,7 @@ module QP_m real(SP) :: QP_time_order_sign=-1 ! T-ordered. Set to +1 (causal) in QP_SET_temperature_pre_factor real(SP) :: QP_G_damp real(SP) :: QP_G_er(2) + real(SP) :: QP_G_ir(2) real(SP) :: QP_G_dr(2) real(SP) :: QP_cg_percent character(schlen) :: GW_terminator_Kind="none" @@ -84,6 +65,7 @@ module QP_m logical, allocatable:: QP_state(:,:) ! ! Solver... + character(2) :: QP_G_solver real(SP) :: QP_dSc_delta logical :: QP_dSc_test logical :: On_Mass_Shell_approx diff --git a/src/modules/mod_QP_CTL.F b/src/modules/mod_QP_CTL.F index f42125dfe7..198821c185 100644 --- a/src/modules/mod_QP_CTL.F +++ b/src/modules/mod_QP_CTL.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module QP_CTL_m ! diff --git a/src/modules/mod_RT_control.F b/src/modules/mod_RT_control.F index 4a5629e45c..83fb516883 100644 --- a/src/modules/mod_RT_control.F +++ b/src/modules/mod_RT_control.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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. -! -! 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): DS ! module RT_control ! diff --git a/src/modules/mod_RT_iterative.F b/src/modules/mod_RT_iterative.F index 0e1f7636c7..bc943e6932 100644 --- a/src/modules/mod_RT_iterative.F +++ b/src/modules/mod_RT_iterative.F @@ -1,27 +1,10 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 ! -#if defined _ELPH_ITERATIVE module RT_iterative ! use pars, ONLY:SP @@ -35,4 +18,3 @@ module RT_iterative integer, allocatable :: THETA_matrix_index(:,:,:) ! end module -#endif diff --git a/src/modules/mod_RT_lifetimes.F b/src/modules/mod_RT_lifetimes.F index decc0d7627..420248affb 100644 --- a/src/modules/mod_RT_lifetimes.F +++ b/src/modules/mod_RT_lifetimes.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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 ! module RT_lifetimes ! diff --git a/src/modules/mod_RT_occupations.F b/src/modules/mod_RT_occupations.F index ec6a294718..3a7f65ea85 100644 --- a/src/modules/mod_RT_occupations.F +++ b/src/modules/mod_RT_occupations.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 ! module RT_occupations ! diff --git a/src/modules/mod_RT_operations.F b/src/modules/mod_RT_operations.F index 5bfc778d7d..76ac6abb13 100644 --- a/src/modules/mod_RT_operations.F +++ b/src/modules/mod_RT_operations.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! module RT_operations ! diff --git a/src/modules/mod_RT_output.F b/src/modules/mod_RT_output.F index fbfcd2f550..379a37bd04 100644 --- a/src/modules/mod_RT_output.F +++ b/src/modules/mod_RT_output.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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. -! -! 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 ! module RT_output_m ! diff --git a/src/modules/mod_R_lattice.F b/src/modules/mod_R_lattice.F index 778a293f7b..4b3d23e89a 100644 --- a/src/modules/mod_R_lattice.F +++ b/src/modules/mod_R_lattice.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module R_lattice ! @@ -40,6 +24,7 @@ module R_lattice logical :: Xk_grid_is_uniform logical :: Xk_grid_new_mapping character(schlen) :: k_GRIDS_string="X S B C" + integer :: k_GRIDS_vector(4)=(/1,1,1,1/) ! ! Q/K-sampling ! @@ -125,6 +110,7 @@ module R_lattice integer, allocatable :: qindx_S(:,:,:) integer, allocatable :: qindx_C(:,:,:) integer :: qindx_B_max + integer :: qindx_S_max_Go ! ! SYMs ! @@ -164,10 +150,11 @@ module R_lattice integer :: RIM_W_ng integer :: RIM_W_n_rand_pts logical :: RIM_W_is_diagonal - logical :: RIM_W_for_graph - real(SP), allocatable :: RIM_W(:,:,:),RIM_W_E(:,:) - real(SP), allocatable DEV_ATTR :: RIM_W_d(:,:,:) - real(DP), allocatable :: f_coeff(:,:,:,:,:) + real(SP), allocatable :: RIM_W_E(:,:) + complex(SP),allocatable :: RIM_W (:,:,:,:) + complex(SP),allocatable DEV_ATTR :: RIM_W_d(:,:,:,:) + complex(DP),allocatable :: f_coeff(:,:,:,:,:) + character(schlen) :: rimw_type ! ! Coulomb (including Cutoff) ! diff --git a/src/modules/mod_SC.F b/src/modules/mod_SC.F index ca67355be3..d0a80daa3e 100644 --- a/src/modules/mod_SC.F +++ b/src/modules/mod_SC.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM MG -! -! 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. +! Copyright (C) 2006 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 MG ! module SC ! diff --git a/src/modules/mod_SLK.F b/src/modules/mod_SLK.F index 1fe41fa30e..33bfe67d66 100644 --- a/src/modules/mod_SLK.F +++ b/src/modules/mod_SLK.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, AF -! -! 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) 2016 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. -! -! 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 AF ! module SLK_m ! diff --git a/src/modules/mod_TDDFT.F b/src/modules/mod_TDDFT.F index 5b094f8710..47846de128 100644 --- a/src/modules/mod_TDDFT.F +++ b/src/modules/mod_TDDFT.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module TDDFT ! @@ -45,6 +29,13 @@ module TDDFT real(SP), allocatable :: FXC_K_diagonal(:) complex(SP), allocatable :: F_xc_gspace(:,:,:) ! + type tddft_wf_t + complex(SP), allocatable :: rhotwr1(:) + complex(SP), allocatable :: rhotwr2(:) + complex(SP), allocatable :: WF_symm1(:,:) + complex(SP), allocatable :: WF_symm2(:,:) + end type tddft_wf_t + ! character(10) :: ALDA_cut_scheme ! interface diff --git a/src/modules/mod_X.F b/src/modules/mod_X.F index 737c384030..c3dab9db79 100644 --- a/src/modules/mod_X.F +++ b/src/modules/mod_X.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module X_m ! @@ -124,6 +108,7 @@ module X_m ! I/O descriptions ! type(IO_desc) :: X_desc + type(IO_desc) :: MPA_desc ! ! PARALLEL distribution ! @@ -136,7 +121,9 @@ module X_m complex(SP), allocatable DEV_ATTR :: X_mat_d(:,:,:) ! type X_t - integer :: whoami ! 1:X 2:em1s 3:em1d 4:pp 5:Xo + ! DS: is 1 Xo (see X_dielectric_matrix:109) or Xx (see io_X.F) ? + ! why is 5 reported as IP in the develop + integer :: whoami ! 1:Xo/Xx 2:em1s 3:em1d 4:ppa 5:mpa ?:IP integer :: ng integer :: ng_db integer :: iq(2) @@ -145,6 +132,7 @@ module X_m integer :: db_ib(2) integer :: db_ib_lim(2) integer :: ngostnts + integer :: mpa_npoles real(SP) :: ehe(2) real(SP) :: q0(3) real(SP) :: cg_percentual @@ -254,6 +242,7 @@ subroutine X_duplicate(Xi,Xo) Xo%db_ib =Xi%db_ib Xo%db_ib_lim =Xi%db_ib_lim Xo%ngostnts =Xi%ngostnts + Xo%mpa_npoles =Xi%mpa_npoles Xo%ordering =Xi%ordering Xo%Vnl_included =Xi%Vnl_included Xo%ehe =Xi%ehe @@ -276,6 +265,7 @@ subroutine X_reset(X,type) !DEBUG< X%iq =(/1,-1/) X%ngostnts =0 + X%mpa_npoles =0 X%whoami =0 X%Vnl_included =.false. if (present(type)) X%whoami=type diff --git a/src/modules/mod_atom_proj.F b/src/modules/mod_atom_proj.F index b55db0bdd2..91d16285a5 100644 --- a/src/modules/mod_atom_proj.F +++ b/src/modules/mod_atom_proj.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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): DS ! module atom_proj ! diff --git a/src/modules/mod_collision_el.F b/src/modules/mod_collision_el.F index b427f93260..c860a93ebe 100644 --- a/src/modules/mod_collision_el.F +++ b/src/modules/mod_collision_el.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module collision_el ! @@ -53,6 +37,10 @@ module collision_el ! complex(SP), allocatable :: gamp(:,:) complex(SP), allocatable :: rhotw(:) + integer :: gamp_nrows + integer :: gamp_ncols + integer :: gamp_rows(2) + integer :: gamp_cols(2) ! ! scatter bamp workspace ! @@ -114,54 +102,82 @@ subroutine elemental_collision_free(ggw) ! end subroutine ! - subroutine elemental_collision_alloc(ggw,NG,NG_GAMP,GRADIENT,TITLE) + subroutine elemental_collision_alloc(ggw,NG,GAMP_NG,GAMP_ROWS,GAMP_COLS,& +& CPU_ONLY,GRADIENT,TITLE) use electrons, ONLY:n_spinor use FFT_m, ONLY:fft_size type(elemental_collision), target ::ggw integer, OPTIONAL :: NG - integer, OPTIONAL :: NG_GAMP(2) + integer, OPTIONAL :: GAMP_NG(2) + integer, OPTIONAL :: GAMP_ROWS(2) + integer, OPTIONAL :: GAMP_COLS(2) + logical, OPTIONAL :: CPU_ONLY logical, OPTIONAL :: GRADIENT character(*), OPTIONAL :: TITLE ! integer :: RHOSIZE + logical :: CPU_ONLY_ ! if (present(TITLE)) then ggw%name=TITLE endif ! - if (fft_size>0) then + CPU_ONLY_=.false. + if (present(CPU_ONLY)) CPU_ONLY_=CPU_ONLY + ! + ! workspace + ! + if (fft_size>0.and..not.allocated(ggw%rho_tw_rs)) then YAMBO_ALLOC(ggw%rho_tw_rs,(fft_size)) YAMBO_ALLOC(ggw%WF_symm_i,(fft_size,n_spinor)) YAMBO_ALLOC(ggw%WF_symm_o,(fft_size,n_spinor)) ! - if (have_cuda) then + if (have_cuda.and..not.CPU_ONLY_) then YAMBO_ALLOC(ggw%rho_tw_rs_d,(fft_size)) YAMBO_ALLOC(ggw%WF_symm_i_d,(fft_size,n_spinor)) YAMBO_ALLOC(ggw%WF_symm_o_d,(fft_size,n_spinor)) endif endif ! + ! rhotw + ! if (present(NG)) then if (NG>0) then ! if ( present(GRADIENT)) RHOSIZE=3*NG if (.not.present(GRADIENT)) RHOSIZE=1*NG YAMBO_ALLOC(ggw%rhotw,(RHOSIZE)) - if (have_cuda) then + ! + if (have_cuda.and..not.CPU_ONLY_) then YAMBO_ALLOC(ggw%rhotw_d,(RHOSIZE)) endif ! endif ggw%ngrho=NG endif - if (present(NG_GAMP)) then - if (all((/NG_GAMP>0/))) then - YAMBO_ALLOC(ggw%gamp,(NG_GAMP(1),NG_GAMP(2))) - if (have_cuda) then - YAMBO_ALLOC(ggw%gamp_d,(NG_GAMP(1),NG_GAMP(2))) - endif + ! + ! GAMP + ! + if (present(GAMP_NG)) then + if (all((/GAMP_NG>0/))) then + YAMBO_ALLOC(ggw%gamp,(GAMP_NG(1),GAMP_NG(2))) endif endif + if (present(GAMP_ROWS).and.present(GAMP_COLS)) then + if (present(GAMP_NG)) call error("[COLL] GAMP_NG should not be present") + YAMBO_ALLOC(ggw%gamp,(GAMP_ROWS(1):GAMP_ROWS(2),GAMP_COLS(1):GAMP_COLS(2))) + endif + if (have_cuda.and.allocated(ggw%gamp).and..not.CPU_ONLY_) then + YAMBO_ALLOC_MOLD(ggw%gamp_d,ggw%gamp) + endif + if (allocated(ggw%gamp)) then + ggw%gamp_rows(1)=lbound(ggw%gamp,1) + ggw%gamp_rows(2)=ubound(ggw%gamp,1) + ggw%gamp_cols(1)=lbound(ggw%gamp,2) + ggw%gamp_cols(2)=ubound(ggw%gamp,2) + ggw%gamp_nrows=ggw%gamp_rows(2)-ggw%gamp_rows(1)+1 + ggw%gamp_ncols=ggw%gamp_cols(2)-ggw%gamp_cols(1)+1 + endif ! end subroutine ! diff --git a/src/modules/mod_collision_ext.F b/src/modules/mod_collision_ext.F index e57b07a6bb..a45e5c497d 100644 --- a/src/modules/mod_collision_ext.F +++ b/src/modules/mod_collision_ext.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module collision_ext ! diff --git a/src/modules/mod_com.F b/src/modules/mod_com.F index 011c097f96..d009005d8f 100644 --- a/src/modules/mod_com.F +++ b/src/modules/mod_com.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 DS ! module com ! @@ -80,6 +64,7 @@ module com logical :: write_to_of logical :: write_to_report logical :: fat_log + logical :: exp_user ! interface ! diff --git a/src/modules/mod_com_interfcs.F b/src/modules/mod_com_interfcs.F index 6b4e066879..2724249bfd 100644 --- a/src/modules/mod_com_interfcs.F +++ b/src/modules/mod_com_interfcs.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2019 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): DS ! module com_interfcs ! diff --git a/src/modules/mod_cuda.F b/src/modules/mod_cuda.F index c0f6b08749..5416f11f51 100644 --- a/src/modules/mod_cuda.F +++ b/src/modules/mod_cuda.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MF, AF -! -! 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) 2018 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. -! -! 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): MF AF ! !================ module cuda_m diff --git a/src/modules/mod_debug.F b/src/modules/mod_debug.F index f057ba9f6b..f819dad401 100644 --- a/src/modules/mod_debug.F +++ b/src/modules/mod_debug.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module debug ! diff --git a/src/modules/mod_descriptors.F b/src/modules/mod_descriptors.F index 597c22b26b..cb3d6c741a 100644 --- a/src/modules/mod_descriptors.F +++ b/src/modules/mod_descriptors.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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 DS ! module descriptors ! diff --git a/src/modules/mod_drivers.F b/src/modules/mod_drivers.F index 4d2a9e3a67..c57a0c32fc 100644 --- a/src/modules/mod_drivers.F +++ b/src/modules/mod_drivers.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 ! module drivers ! @@ -33,7 +17,7 @@ module drivers ! logical :: l_setup =.FALSE. logical :: l_rim =.FALSE. - logical :: l_RIM_W =.FALSE. + logical :: l_rim_w =.FALSE. logical :: l_col_cut =.FALSE. logical :: l_acfdt =.FALSE. ! @@ -73,6 +57,7 @@ module drivers logical :: l_life =.FALSE. logical :: l_gw0 =.FALSE. logical :: l_ppa =.FALSE. + logical :: l_mpa =.FALSE. logical :: l_cohsex =.FALSE. ! ! The optical runlevels ... diff --git a/src/modules/mod_electric.F b/src/modules/mod_electric.F index 97597ed36c..dd606db3b8 100644 --- a/src/modules/mod_electric.F +++ b/src/modules/mod_electric.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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. -! -! 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): MG CA ! module electric ! diff --git a/src/modules/mod_electrons.F b/src/modules/mod_electrons.F index b73e12d2b2..b40fd1bf90 100644 --- a/src/modules/mod_electrons.F +++ b/src/modules/mod_electrons.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module electrons ! diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index 55350569c3..5009b85c80 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module fields ! diff --git a/src/modules/mod_frequency.F b/src/modules/mod_frequency.F index 1d587e55a6..5911c804ff 100644 --- a/src/modules/mod_frequency.F +++ b/src/modules/mod_frequency.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module frequency ! @@ -50,10 +34,15 @@ module frequency type w_samp integer :: n_freqs real(SP) :: er(2) + real(SP) :: ir(2) real(SP) :: damp_reference real(SP) :: dr(2) real(SP) :: per_memstps complex(SP),allocatable :: p(:) + character(2) :: samp_type + character(2) :: samp_grid + character(2) :: mpa_solver + character(16):: grid_type end type w_samp ! contains @@ -63,12 +52,17 @@ subroutine W_duplicate(Wi,Wo) Wo%n_freqs=Wi%n_freqs Wo%per_memstps=Wi%per_memstps Wo%er=Wi%er + Wo%ir=Wi%ir Wo%dr=Wi%dr Wo%damp_reference=Wi%damp_reference if (allocated(Wi%p)) then YAMBO_ALLOC(Wo%p,(Wo%n_freqs)) Wo%p=Wi%p endif + Wo%samp_type=Wi%samp_type + Wo%samp_grid=Wi%samp_grid + Wo%mpa_solver=Wi%mpa_solver + Wo%grid_type=Wi%grid_type end subroutine W_duplicate ! subroutine W_reset(W,damping) @@ -80,9 +74,14 @@ subroutine W_reset(W,damping) W%n_freqs=100 W%per_memstps=100._SP W%er=(/0._SP,10._SP/)/HA2EV + W%ir=(/1._SP,1._SP/)!/HA2EV W%dr=(/local_damping,local_damping/)/HA2EV W%damp_reference=0._SP YAMBO_FREE(W%p) + W%samp_type="2l" + W%samp_grid="lP" + W%mpa_solver="PT" + W%grid_type="ra" end subroutine W_reset ! end module frequency diff --git a/src/modules/mod_functions.F b/src/modules/mod_functions.F index 6697c81c08..bced9cf1bb 100644 --- a/src/modules/mod_functions.F +++ b/src/modules/mod_functions.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module functions ! diff --git a/src/modules/mod_global_XC.F b/src/modules/mod_global_XC.F index c3d72bc627..afde58dd0c 100644 --- a/src/modules/mod_global_XC.F +++ b/src/modules/mod_global_XC.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2008 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. -! -! 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 ! module global_XC ! diff --git a/src/modules/mod_hamiltonian.F b/src/modules/mod_hamiltonian.F index 3f6acd7e44..67b7f088d9 100644 --- a/src/modules/mod_hamiltonian.F +++ b/src/modules/mod_hamiltonian.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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): DS AM ! module hamiltonian ! diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index 709aaa5283..c570a6526e 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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 DS ! ! headers ! @@ -71,8 +55,15 @@ subroutine MATRIX_duplicate( operation, M_in, INDEX_in, M_out ) use matrix, ONLY:PAR_matrix character(*) :: operation type(PAR_matrix), optional :: M_in - type(PAR_matrix) :: M_out integer , optional :: INDEX_in + type(PAR_matrix) :: M_out + end subroutine + ! + subroutine MATRIX_transpose( operation, M_in, M_out ) + use matrix, ONLY:PAR_matrix,MATRIX_reset + character(*) :: operation + type(PAR_matrix), optional :: M_in + type(PAR_matrix) :: M_out end subroutine ! subroutine MATRIX_transfer( M_in, M_bse, M, M_out, INDEX_in, INDEX_out, SND, RCV, COMM, COMM_name) @@ -158,8 +149,8 @@ subroutine el_density_of_states(Xk,Xen,dos_E,DOS_broadening,DOS_bands,dos_value, integer, intent(in) :: DOS_bands(2) real(SP), intent(out) :: dos_value(n_spin) logical, optional, intent(in) :: USE_Eo,USE_W,USE_occupations,USE_the_DbGd - real(SP), optional, intent(in) :: WF_fac(:,:,:) - real(SP), optional, intent(in) :: PDOS_fac(:,:,:) + real(SP), pointer, optional, intent(in) :: WF_fac(:,:,:) + real(SP), pointer, optional, intent(in) :: PDOS_fac(:,:,:) end subroutine el_density_of_states ! #if defined _SLEPC && !defined _NL @@ -274,12 +265,23 @@ subroutine QP_state_print(qp) type(QP_t),optional ::qp end subroutine ! +#if defined _ELPH || defined _PHEL subroutine ELPH_alloc(what,GKKP,Nb,Nm,Nk_mem,Nq_mem) use ELPH, ONLY:GKKP_me character(*) :: what type(GKKP_me), optional:: GKKP integer, optional:: Nb(2),Nk_mem,Nm(2),Nq_mem end subroutine +#endif + ! + function TDDFT_ALDA_R_space(is,os,isp,osp,tddft_wf,mode) + use pars, ONLY:SP + use TDDFT, ONLY:tddft_wf_t + 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 + end function TDDFT_ALDA_R_space ! end interface ! diff --git a/src/modules/mod_interpolate.F b/src/modules/mod_interpolate.F index 978bacb3ea..0be9c79179 100644 --- a/src/modules/mod_interpolate.F +++ b/src/modules/mod_interpolate.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM 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. +! Copyright (C) 2006 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 CA ! module interpolate ! @@ -50,7 +34,7 @@ module interpolate logical :: INTERPOLATE_use_symm=.TRUE. character(schlen) :: INTERPOLATE_msg_fmt="rs" ! - integer, parameter :: max_interpls=20 + integer, parameter :: max_interpls=40 ! ! NN method ! diff --git a/src/modules/mod_interpolate_tools.F b/src/modules/mod_interpolate_tools.F index 85db0631eb..5dcf7b3729 100644 --- a/src/modules/mod_interpolate_tools.F +++ b/src/modules/mod_interpolate_tools.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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 ! module interpolate_tools ! diff --git a/src/modules/mod_lexical_sort.F b/src/modules/mod_lexical_sort.F index c0b73a9834..2b17756f82 100644 --- a/src/modules/mod_lexical_sort.F +++ b/src/modules/mod_lexical_sort.F @@ -1,30 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DS -! -! Imported from Alan Miller website https://jblevins.org/mirror/amiller/ -! sortchar.f90 -! Code for sorting character strings. -! This was made available on the comp.lang.fortran newsgroup. Author unknown. -! -! 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) 2020 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. -! -! 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): DS ! module LexicalSort diff --git a/src/modules/mod_linear_algebra.F b/src/modules/mod_linear_algebra.F index a078d7f3ef..1c29158cd0 100644 --- a/src/modules/mod_linear_algebra.F +++ b/src/modules/mod_linear_algebra.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module linear_algebra ! diff --git a/src/modules/mod_logo.F b/src/modules/mod_logo.F index deea89fb43..f7de928708 100644 --- a/src/modules/mod_logo.F +++ b/src/modules/mod_logo.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2008 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 ! module LOGO ! diff --git a/src/modules/mod_magnetic.F b/src/modules/mod_magnetic.F index 6d401393c5..664d4db096 100644 --- a/src/modules/mod_magnetic.F +++ b/src/modules/mod_magnetic.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module magnetic ! diff --git a/src/modules/mod_matrix.F b/src/modules/mod_matrix.F index bc8aaed529..5ba586ac4f 100644 --- a/src/modules/mod_matrix.F +++ b/src/modules/mod_matrix.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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 ! module matrix ! diff --git a/src/modules/mod_matrix_operate.F b/src/modules/mod_matrix_operate.F index 56a424aa5d..b219a22c2e 100644 --- a/src/modules/mod_matrix_operate.F +++ b/src/modules/mod_matrix_operate.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module matrix_operate ! diff --git a/src/modules/mod_memory.F b/src/modules/mod_memory.F index a169610079..b0b01292db 100644 --- a/src/modules/mod_memory.F +++ b/src/modules/mod_memory.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module memory ! @@ -364,7 +348,9 @@ subroutine MEM_c2(name,c) subroutine MEM_c3(name,c) character(*)::name complex(SP) ::c(:,:,:) - call MEM_manager_alloc(name,size(c,KIND=IPL),2*kind(c(1,1,1)),HOST_) + integer(IPL) ::Sz + Sz = size(c,1,KIND=IPL)*size(c,2,KIND=IPL)*size(c,3,KIND=IPL) + call MEM_manager_alloc(name,Sz,2*kind(c(1,1,1)),HOST_) end subroutine subroutine MEM_c4(name,c) character(*)::name diff --git a/src/modules/mod_nl_optics.F b/src/modules/mod_nl_optics.F index 7e96f9cde4..dc850046be 100644 --- a/src/modules/mod_nl_optics.F +++ b/src/modules/mod_nl_optics.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG 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. +! Copyright (C) 2016 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. -! -! 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): MG AC ! module nl_optics ! @@ -134,7 +118,7 @@ module nl_optics ! ! Dephasing time (in units of NL_damping) ! - integer, parameter :: DephMult=5 + integer, parameter :: DephMult=6 ! ! Wavefunction sampling ! @@ -162,6 +146,7 @@ module nl_optics ! IO variables ! real(SP), allocatable :: NL_P_t(:,:) + real(SP), allocatable :: NL_J_t(:,:) complex(SP), allocatable :: E_tot_t(:,:),E_ext_t(:,:), E_ks_t(:,:),V_bands_t(:,:,:,:,:) complex(SP) :: E_tot(3),E_ext(3),E_ks(3) logical, allocatable :: freqs_done(:) @@ -212,6 +197,7 @@ subroutine NL_alloc(en) endif ! YAMBO_ALLOC(NL_P_t,(NE_steps,3)) + YAMBO_ALLOC(NL_J_t,(NE_steps,6)) YAMBO_ALLOC(E_tot_t,(NE_steps,3)) YAMBO_ALLOC(E_ext_t,(NE_steps,3)) YAMBO_ALLOC(E_ks_t,(NE_steps,3)) @@ -270,6 +256,7 @@ subroutine NL_free endif ! YAMBO_FREE(NL_P_t) + YAMBO_FREE(NL_J_t) YAMBO_FREE(E_tot_t) YAMBO_FREE(E_ext_t) YAMBO_FREE(E_ks_t) diff --git a/src/modules/mod_openmp.F b/src/modules/mod_openmp.F index 6ab27832ea..408ce42556 100644 --- a/src/modules/mod_openmp.F +++ b/src/modules/mod_openmp.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM,AF -! -! 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) 2013 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. -! -! 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): AMAF ! module openmp ! diff --git a/src/modules/mod_parallel.F b/src/modules/mod_parallel.F index 6a06f7eedc..3aa0262abb 100644 --- a/src/modules/mod_parallel.F +++ b/src/modules/mod_parallel.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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 ! module parallel_m ! @@ -456,6 +440,10 @@ module parallel_m type(yMPI_comm),SAVE :: PAR_COM_freqs_A2A type(yMPI_comm),SAVE :: PAR_COM_freqs_INDEX ! + ! ... SE + type(yMPI_comm),SAVE :: PAR_COM_SE_WORLD_RL_resolved + type(yMPI_comm),SAVE :: PAR_COM_SE_WORLD + ! ! ... and dimensions (used for automatic cpu distribution) !========================================================= integer :: PAR_K_range = 0 diff --git a/src/modules/mod_parallel_interface.F b/src/modules/mod_parallel_interface.F index 15ba51b23b..86420ccd9c 100644 --- a/src/modules/mod_parallel_interface.F +++ b/src/modules/mod_parallel_interface.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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 ! module parallel_int ! @@ -43,8 +27,9 @@ module parallel_int interface PP_redux_wait module procedure l1share, & & i0share, i1share, i2share,i3share, & -& r0share, r1share, r2share,r3share, & +& r0share, r1share, r2share,r3share,r4share, & & c0share, c1share, c2share,c3share,c4share,c5share, & +& c2share_x, & #if ! defined _DOUBLE & d0share, d1share, d2share,d3share, & & dc0share,dc1share,dc2share, & @@ -492,6 +477,37 @@ subroutine r3share(array,COMM) array=reshape(larray,dimensions) deallocate(larray) call mpi_barrier(LOCAL_COMM,i_err) +#endif + end subroutine + ! + subroutine r4share(array,COMM) + real(SP):: array(:,:,:,:) + integer, optional :: COMM +#if defined _MPI + integer::dimensions(4),dimension,LOCAL_COMM ! Work Space + real(SP),allocatable::larray(:) ! Work Space + if (ncpu==1) return + ! + if (present(COMM)) then + LOCAL_COMM=COMM + else + LOCAL_COMM=mpi_comm_world + endif + if (LOCAL_COMM==comm_default_value) return + ! + local_type=MPI_REAL + if (SP==DP) local_type=MPI_DOUBLE_PRECISION + ! + call mpi_barrier(LOCAL_COMM,i_err) + dimensions=shape(array) + if( any(dimensions<1) ) return + dimension=product(dimensions) + allocate(larray(dimension)) + larray=0. + call mpi_allreduce(array(1,1,1,1),larray,dimension,local_type,mpi_sum,LOCAL_COMM,i_err) + array=reshape(larray,dimensions) + deallocate(larray) + call mpi_barrier(LOCAL_COMM,i_err) #endif end subroutine ! @@ -709,6 +725,39 @@ subroutine c2share(array,COMM) call mpi_barrier(LOCAL_COMM,i_err) #endif end subroutine + + subroutine c2share_x(array,in_place,COMM) + complex(SP):: array(:,:) + logical, intent(IN) :: in_place + integer, optional :: COMM +#if defined _MPI + integer::dimensions(2),dimension,LOCAL_COMM ! Work Space + if (ncpu==1) return + ! + if (.not.in_place) then + if ( present(COMM)) call c2share(array,COMM) + if (.not. present(COMM)) call c2share(array) + return + endif + ! + if (present(COMM)) then + LOCAL_COMM=COMM + else + LOCAL_COMM=mpi_comm_world + endif + if (LOCAL_COMM==comm_default_value) return + ! + local_type=MPI_COMPLEX + if (SP==DP) local_type=MPI_DOUBLE_COMPLEX + ! + call mpi_barrier(LOCAL_COMM,i_err) + dimensions=shape(array) + if( any(dimensions<1) ) return + dimension=product(dimensions) + call mpi_allreduce(MPI_IN_PLACE,array,dimension,local_type,mpi_sum,LOCAL_COMM,i_err) + call mpi_barrier(LOCAL_COMM,i_err) +#endif + end subroutine ! subroutine c3share(array,COMM) complex(SP):: array(:,:,:) diff --git a/src/modules/mod_pars.F b/src/modules/mod_pars.F index 25b244d372..807818ab7b 100644 --- a/src/modules/mod_pars.F +++ b/src/modules/mod_pars.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module pars ! @@ -39,7 +23,7 @@ module pars ! !...MEMORY integer, parameter :: N_MEM_max = 1000 - integer, parameter :: N_MEM_max_element_components = 200 + integer, parameter :: N_MEM_max_element_components = 600 integer, parameter :: N_MEM_SAVE_max = 500 ! !...MEMORY library @@ -95,6 +79,14 @@ module pars ! Equivalent to OneByteInt in NetCdf (normal integer is 4 byte) integer, parameter :: LP = selected_int_kind(2) ! + ! Kinds used in the Yambo-IO + ! =============================== + integer, parameter :: DP_YIO = DP ! Float double precision + integer, parameter :: SP_YIO = SP ! Float single precision + integer, parameter :: IP_YIO = IP+100 ! Integer + integer, parameter :: LP_YIO = LP+100 ! Logical + integer, parameter :: CR_YIO = 0 ! Character type + ! ! STRINGs !========= integer, parameter :: schlen=100 diff --git a/src/modules/mod_plasma.F b/src/modules/mod_plasma.F index 709b43a794..6da1fc3b48 100644 --- a/src/modules/mod_plasma.F +++ b/src/modules/mod_plasma.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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): DS ! module plasma ! diff --git a/src/modules/mod_pseudo.F b/src/modules/mod_pseudo.F index a3be02c58b..7d8e912c03 100644 --- a/src/modules/mod_pseudo.F +++ b/src/modules/mod_pseudo.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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) 2009 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. -! -! 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 DS AF ! module pseudo ! diff --git a/src/modules/mod_real_time.F b/src/modules/mod_real_time.F index d9b8b6c1f8..9daa73d9a9 100644 --- a/src/modules/mod_real_time.F +++ b/src/modules/mod_real_time.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 MG DS ! module real_time ! diff --git a/src/modules/mod_stderr.F b/src/modules/mod_stderr.F index 382c79c5cd..86b723499c 100644 --- a/src/modules/mod_stderr.F +++ b/src/modules/mod_stderr.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module stderr ! diff --git a/src/modules/mod_timing.F b/src/modules/mod_timing.F index 4684598209..f499fab556 100644 --- a/src/modules/mod_timing.F +++ b/src/modules/mod_timing.F @@ -1,11 +1,10 @@ ! ! Copyright (C) 2004 WanT Group -! Copyright (C) 2000-2022 the YAMBO team -! -! 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, -! or http://www.gnu.org/copyleft/gpl.txt . +! License-Identifier: GPL +! +! Copyright (C) 2013 The Yambo Team +! +! Authors (see AUTHORS file for details): ! ! ! diff --git a/src/modules/mod_units.F b/src/modules/mod_units.F index 299500be90..9f757c7195 100644 --- a/src/modules/mod_units.F +++ b/src/modules/mod_units.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module UNITS ! diff --git a/src/modules/mod_vec_operate.F b/src/modules/mod_vec_operate.F index 4453204da2..70384453ab 100644 --- a/src/modules/mod_vec_operate.F +++ b/src/modules/mod_vec_operate.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module vec_operate ! @@ -35,6 +19,10 @@ module vec_operate module procedure r_cross_product,c_cross_product end interface ! + interface c2a + module procedure c2a_scal,c2a_vec + end interface + ! contains ! integer function min_index(N,v) @@ -183,11 +171,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),rZERO,rONE,rZERO, sin(t),rZERO,cos(t)/),(/3,3/)) + case('zx') + M=reshape((/cos(t),rZERO, sin(t),rZERO,rONE,rZERO,-sin(t),rZERO,cos(t)/),(/3,3/)) case('yz') - M=reshape((/rZERO,cos(t),-sin(t),rZERO,sin(t),cos(t),rONE,rZERO,rZERO/),(/3,3/)) + M=reshape((/rONE,rZERO,rZERO,rZERO,cos(t),-sin(t),rZERO, sin(t),cos(t)/),(/3,3/)) + case('zy') + M=reshape((/rONE,rZERO,rZERO,rZERO,cos(t), sin(t),rZERO,-sin(t),cos(t)/),(/3,3/)) end select ! v_loc=matmul(M,v_in) @@ -196,7 +190,7 @@ subroutine v_rotate(plane,t,v_in,v_out) ! end subroutine v_rotate ! - subroutine c2a(b_in,v_in,v_out,mode) + subroutine c2a_scal(b_in,v_in,v_out,mode) !_scal ! ! rlu = Reduced Lattice Units (crystal coordinated in Quantum-Espresso) ! cc = Cartesian Coordinates (atomic units) @@ -255,7 +249,70 @@ subroutine c2a(b_in,v_in,v_out,mode) v_in=matmul(mat,u) if (index(mode,'2i')/=0) v_in(:)=v_in(:)/n(:) ! * -> iku endif - end subroutine c2a + end subroutine c2a_scal + ! + subroutine c2a_vec(b_in,nvec,v_in,v_out,mode) + ! + ! mode = 'k/r c2a' 'k/r a2c' (cc <-> rlu) + ! mode = 'k/r i2a' 'k/r a2i' (iku <-> rlu) + ! mode = 'k/r i2c' 'k/r c2i' (cc <-> iku) + ! + use D_lattice, ONLY:alat,a + use R_lattice, ONLY:b + use matrix_operate, ONLY:m3inv + integer :: nvec + real(SP) :: v_in(nvec,3) + real(SP), optional:: b_in(3,3),v_out(nvec,3) + character(4)::mode + ! + ! Work Space + ! + integer :: i + real(SP):: a_here(3,3),mat(3,3),n(3,3),n_m1(3,3),u(nvec,3) + ! + ! Define local unit cell vectors + ! + if (index(mode,'r')/=0) then + a_here=a + if (present(b_in)) a_here=b_in + else + a_here=b + if (present(b_in)) a_here=b_in + endif + ! + ! Scale factor if input vector is in iku + ! + n(:,:)=0 + n_m1(:,:)=0 + do i =1, 3 + if (index(mode,'r')/=0) n(i,i)=alat(i) + if (index(mode,'k')/=0) n(i,i)=2._SP*pi/alat(i) + if (index(mode,'2i')/=0) n_m1(i,i)=1._SP/n(i,i) + enddo + ! + ! u is rlu or cc (no iku) + ! + u(:,:)=v_in(:,:) + ! + if (index(mode,'i2')/=0) u(:,:)=matmul(v_in(1:nvec,1:3),n(1:3,1:3)) ! iku -> cc + ! + ! i2c/c2i + mat=reshape((/1._SP,0._SP,0._SP,0._SP,1._SP,0._SP,0._SP,0._SP,1._SP/),(/3,3/)) + ! + ! a2c/a2i + if (index(mode,'a2c')/=0.or.index(mode,'a2i')/=0) mat=transpose(a_here) + ! + ! c2a/i2a + if (index(mode,'c2a')/=0.or.index(mode,'i2a')/=0) call m3inv(transpose(a_here),mat) + ! + if (present(v_out)) then + v_out=transpose(matmul(mat,transpose(u))) + if (index(mode,'2i')/=0) v_out(:,:)=matmul(v_out(1:nvec,1:3),n_m1(:,:)) ! * -> iku + else + v_in=transpose(matmul(mat,transpose(u))) + if (index(mode,'2i')/=0) v_in(:,:)=matmul(v_in(1:nvec,1:3),n_m1(:,:)) ! * -> iku + endif + end subroutine c2a_vec ! subroutine define_b_and_DL_vol() ! diff --git a/src/modules/mod_wave_func.F b/src/modules/mod_wave_func.F index 4cfc83e128..b7a225ca64 100644 --- a/src/modules/mod_wave_func.F +++ b/src/modules/mod_wave_func.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 DS ! module wave_func ! diff --git a/src/modules/mod_wrapper.F b/src/modules/mod_wrapper.F index 10de58bcbe..bf11a16a2d 100644 --- a/src/modules/mod_wrapper.F +++ b/src/modules/mod_wrapper.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CA, AF +! Copyright (C) 2010 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. -! -! 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. +! Authors (see AUTHORS file for details): CA AF ! module wrapper ! @@ -29,7 +13,7 @@ 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,DP,cI #ifdef _CUDA use cublas #endif @@ -45,9 +29,9 @@ module wrapper end interface ! interface M_by_V - module procedure mv_cgemv,mv_sgemv,mv_c,mv_r + module procedure mv_cgemv, mv_sgemv, mv_c, mv_r #ifdef _CUDA - module procedure mv_c_gpu + module procedure mv_cgemv_gpu, mv_sgemv_gpu, mv_c_gpu #endif end interface ! @@ -198,6 +182,21 @@ subroutine mv_sgemv(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) #endif end subroutine mv_sgemv ! +#ifdef _CUDA + subroutine mv_sgemv_gpu(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) + real(SP), intent(in) :: ALPHA,BETA + integer, intent(in) :: INCX,INCY,LDA,M,N + character,intent(in) :: TRANS + real(SP), device, intent(in) :: A(LDA,*),X(*) + real(SP), device, intent(out):: Y(*) +#if defined _DOUBLE + call cublasDgemv(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) +#else + call cublasSgemv(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) +#endif + end subroutine mv_sgemv_gpu +#endif + ! subroutine mv_cgemv(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) complex(SP), intent(in) :: ALPHA,BETA integer, intent(in) :: INCX,INCY,LDA,M,N @@ -211,6 +210,21 @@ subroutine mv_cgemv(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) #endif end subroutine mv_cgemv ! +#ifdef _CUDA + subroutine mv_cgemv_gpu(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) + complex(SP), intent(in) :: ALPHA,BETA + integer, intent(in) :: INCX,INCY,LDA,M,N + character, intent(in) :: TRANS + complex(SP), device, intent(in) :: A(LDA,*),X(*) + complex(SP), device, intent(out):: Y(*) +#if defined _DOUBLE + call cublasZgemv(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) +#else + call cublasCgemv(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY) +#endif + end subroutine mv_cgemv_gpu +#endif + ! subroutine mv_c(TRANS,msize,A,X,Y) integer, intent(in) :: msize complex(SP), intent(in) :: A(msize,*),X(*) @@ -426,29 +440,43 @@ end function Vstar_dot_V_c2_gpu ! DOT PRODUCTS: Vstar_dot_VV !============== ! - complex(SP) function Vstar_dot_VV_c1_cpu(N,CX,CY,CZ) + complex(SP) function Vstar_dot_VV_c1_cpu(N,CX,CY,CZ,bounds) implicit none integer, intent(in) :: N complex(SP),intent(in) :: CX(N),CY(N),CZ(N) + integer, optional, intent(in) :: bounds(2) + ! + integer :: bounds_(2),N_ + complex(DP), external :: zdotc + complex(SP), external :: cdotc + ! + bounds_(:)=(/1,N/) + if (present(bounds)) bounds_=bounds + N_=bounds_(2)-bounds_(1)+1 + ! #if defined _DOUBLE - complex(SP)::zdotc - Vstar_dot_VV_c1_cpu=ZDOTC(N,CX,1,CY*CZ,1) + Vstar_dot_VV_c1_cpu=ZDOTC(N_,CX(bounds_(1):),1,CY(bounds_(1):)*CZ(bounds_(1):),1) #else - complex(SP)::cdotc - Vstar_dot_VV_c1_cpu=CDOTC(N,CX,1,CY*CZ,1) + Vstar_dot_VV_c1_cpu=CDOTC(N_,CX(bounds_(1):),1,CY(bounds_(1):)*CZ(bounds_(1):),1) #endif end function Vstar_dot_VV_c1_cpu ! #ifdef _CUDA - complex(SP) function Vstar_dot_VV_c1_gpu(N,CX,CY,CZ) + complex(SP) function Vstar_dot_VV_c1_gpu(N,CX,CY,CZ,bounds) implicit none integer, intent(in) :: N complex(SP), device, intent(in) :: CX(N),CY(N),CZ(N) + integer, optional, intent(in) :: bounds(2) + ! + integer :: bounds_(2) integer :: i ! + bounds_(:)=(/1,N/) + if (present(bounds)) bounds_=bounds + ! Vstar_dot_VV_c1_gpu=0.0_SP !$cuf kernel do(1) <<<*,*>>> - do i = 1, N + do i = bounds_(1),bounds_(2) Vstar_dot_VV_c1_gpu=Vstar_dot_VV_c1_gpu+conjg(CX(i))*CY(i)*CZ(i) enddo end function Vstar_dot_VV_c1_gpu diff --git a/src/modules/mod_wrapper_omp.F b/src/modules/mod_wrapper_omp.F index 475f30c674..47669d8ee9 100644 --- a/src/modules/mod_wrapper_omp.F +++ b/src/modules/mod_wrapper_omp.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CA, AF, AM +! Copyright (C) 2010 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. -! -! 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. +! Authors (see AUTHORS file for details): CA AF AM ! module wrapper_omp ! diff --git a/src/modules/mod_xc_functionals.F b/src/modules/mod_xc_functionals.F index dcaaca923e..95b0da77c7 100644 --- a/src/modules/mod_xc_functionals.F +++ b/src/modules/mod_xc_functionals.F @@ -1,27 +1,11 @@ ! ! Copyright (C) 2003 M. Marques, A. Castro, A. Rubio, G. Bertsch ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, MG, DV +! Copyright (C) 2006 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. -! -! 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. +! Authors (see AUTHORS file for details): AM MG DV ! module xc_functionals ! diff --git a/src/modules/mod_zeros.F b/src/modules/mod_zeros.F index 6191b862b7..1a98a1755b 100644 --- a/src/modules/mod_zeros.F +++ b/src/modules/mod_zeros.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2007 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 ! module zeros ! diff --git a/src/modules/pgipar164Jk4g b/src/modules/pgipar164Jk4g new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/modules/pgipar1ZyGlEf b/src/modules/pgipar1ZyGlEf new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/modules/pgipar2A2EZGu b/src/modules/pgipar2A2EZGu new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/modules/pgipar2bwSQPS b/src/modules/pgipar2bwSQPS new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/nloptics/.objects b/src/nloptics/.objects index f1a9571a15..1de603485f 100644 --- a/src/nloptics/.objects +++ b/src/nloptics/.objects @@ -1,4 +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_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 +#endif diff --git a/src/nloptics/Berry_polarization.F b/src/nloptics/Berry_polarization.F deleted file mode 100644 index 263fcfddfc..0000000000 --- a/src/nloptics/Berry_polarization.F +++ /dev/null @@ -1,104 +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 Berry_polarization(P_Berry,S_det,en,Xk,k_map) - ! - ! Evaluate polarization using Berry phase formulation - ! from the determinants (S_det) of the valence bands overlaps - ! - use pars, ONLY:SP,rZERO,pi,cONE,DP - use electrons, ONLY:levels,spin_occ - use R_lattice, ONLY:bz_samp,bz_map - use D_lattice, ONLY:a - use vec_operate, ONLY:get_id_perpendicular - ! - implicit none - ! - type(levels), intent(in) :: en - type(bz_samp), intent(in) :: Xk - type(bz_map), intent(in) :: k_map - complex(SP), intent(in) :: S_det(3,Xk%nbz) - real(SP), intent(out) :: P_Berry(3) - ! - ! Work Space - ! - integer :: id_in,id2,id3,Nperpend,i1,i2,i3,idx(3),ik,id,id_red - complex(DP) :: zeta - real(SP) :: P_berry_red(3) ! Berry polarization along the reciprocal vectors - ! - ! Polarization in terms of geomatric phase - ! see eq. 49,50 and 52 of PRB 69, 085104 (2004) - ! - P_Berry_red =rZERO - ! - do id_in=1,3 - ! - call get_id_perpendicular(id_in,id2,id3) - ! - Nperpend=k_map%max_kdir(id2)*k_map%max_kdir(id3) - ! - do i2=1,k_map%max_kdir(id2) - do i3=1,k_map%max_kdir(id3) - ! - zeta=cONE - ! - idx(id2)=i2 - idx(id3)=i3 - ! - ! Loop on the string - ! - do i1=1,k_map%max_kdir(id_in) - ! - idx(id_in)=i1 - ik=k_map%k_map_dir(idx(1),idx(2),idx(3)) - ! - zeta=zeta*dcmplx(S_det(id_in,ik)) - ! - enddo - ! - P_berry_red(id_in)=P_berry_red(id_in)+aimag(log(zeta)) - ! - enddo - enddo - ! - P_berry_red(id_in)=-P_berry_red(id_in)/real(Nperpend,SP) - ! - enddo - ! - P_Berry_red=P_Berry_red/(2._SP*pi)*spin_occ - ! - ! The polarization is periodic (for n_sp_pol/=1 the periodicity is different) - ! - P_Berry_red=P_Berry_red-NINT(P_Berry_red) - ! - ! Transform in cartesian coordinates - ! - P_Berry=rZERO - ! - do id=1,3 - do id_red=1,3 - P_Berry(id)=P_Berry(id)+P_Berry_red(id_red)*a(id_red,id)/DL_Vol - enddo - enddo - ! -end subroutine Berry_polarization diff --git a/src/nloptics/DIP_polarization.F b/src/nloptics/DIP_polarization.F index 713f8eef1e..db6ebf18bd 100644 --- a/src/nloptics/DIP_polarization.F +++ b/src/nloptics/DIP_polarization.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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. -! -! 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): MG CA ! subroutine DIP_polarization(Xen,Xk,V_bands,Polarization) ! diff --git a/src/nloptics/DOUBLE_project.dep b/src/nloptics/DOUBLE_project.dep index 0283229f4b..fbac890c90 100644 --- a/src/nloptics/DOUBLE_project.dep +++ b/src/nloptics/DOUBLE_project.dep @@ -1,4 +1,3 @@ - Berry_polarization.o DIP_polarization.o EXC_macroscopic_JGM.o EXP_op.o diff --git a/src/nloptics/EXC_macroscopic_JGM.F b/src/nloptics/EXC_macroscopic_JGM.F index 0fec323e50..0866c5bb96 100644 --- a/src/nloptics/EXC_macroscopic_JGM.F +++ b/src/nloptics/EXC_macroscopic_JGM.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG -! -! 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) 2016 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. -! -! 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): MG ! subroutine EXC_macroscopic_JGM(en,Pmac,rho,Exc,V_xc) ! diff --git a/src/nloptics/EXP_op.F b/src/nloptics/EXP_op.F index 028ece218f..979e298984 100644 --- a/src/nloptics/EXP_op.F +++ b/src/nloptics/EXP_op.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AC MG -! -! 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. +! Copyright (C) 2019 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): AC MG ! subroutine EXP_op(U,H,dT) use pars, ONLY:SP,cI,cZERO,cONE diff --git a/src/nloptics/EXP_step.F b/src/nloptics/EXP_step.F index 8c804efefe..2bda482b36 100644 --- a/src/nloptics/EXP_step.F +++ b/src/nloptics/EXP_step.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AC MG -! -! 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. +! Copyright (C) 2019 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): AC MG ! subroutine EXP_step(K_out,V_in,H_in,I_in,nbf,dT) use pars, ONLY:SP,cZERO diff --git a/src/nloptics/INVINT_step.F b/src/nloptics/INVINT_step.F index 5af7f3d832..e9a0898438 100644 --- a/src/nloptics/INVINT_step.F +++ b/src/nloptics/INVINT_step.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AC MG -! -! 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. +! Copyright (C) 2019 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): AC MG ! subroutine INVINT_step(V_out,V_in,H_in,I_in,nbf,dT) ! diff --git a/src/nloptics/NL_Berry_current.F b/src/nloptics/NL_Berry_current.F index f23d289bdd..f50d29fd1a 100644 --- a/src/nloptics/NL_Berry_current.F +++ b/src/nloptics/NL_Berry_current.F @@ -1,5 +1,5 @@ ! -! Copyright (C) 2000-2020 the Yambo team +! Copyright (C) 2018-2020 the Yambo team ! http://www.yambo-code.org/ ! ! Authors (see AUTHORS file for details): CA @@ -31,10 +31,11 @@ subroutine NL_Berry_current(en,Xk,k_map,V_bands,NL_J) use R_lattice, ONLY:bz_samp,bz_map,nXkbz use D_lattice, ONLY:a use vec_operate, ONLY:get_id_perpendicular - use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_COM_Xk_ibz_INDEX,PAR_IND_Xk_ibz + use parallel_m, ONLY:PAR_COM_Xk_ibz_INDEX,PAR_IND_Xk_ibz,PAR_IND_Xk_bz use parallel_int, ONLY:PP_redux_wait use QP_m, ONLY:QP_nk use nl_optics, ONLY:NL_bands + use electric, ONLY:l_force_SndOrd ! implicit none ! @@ -79,6 +80,8 @@ subroutine NL_Berry_current(en,Xk,k_map,V_bands,NL_J) ! isp =1 ! + ! Calculate | \der_k v_k> and make the product < v_k | H_k | \der_k v_k > + ! do id_red=1,3 ! if(k_map%max_kdir(id_red)/=1) then @@ -88,11 +91,16 @@ 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 -! 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 +! 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 +! ! do ikbz=1,nXkbz ! -! if(.not.PAR_IND_Xk_bz%element_1D(ikbz)) cycle + if(.not.PAR_IND_Xk_bz%element_1D(ikbz)) cycle ! do istep=1,max_step call Build_tilde_vbands(en,Xk,ikbz,isp,istep,id_red,V_bands(:,:en%nbf(isp),:,isp),V_tilde) @@ -121,6 +129,8 @@ subroutine NL_Berry_current(en,Xk,k_map,V_bands,NL_J) ! enddo ! + call PP_redux_wait(NL_J_red,COMM=PAR_COM_Xk_ibz_INDEX%COMM) + ! ! Transform in cartesian coordinates ! !$omp parallel do default(shared), private(i1) @@ -129,6 +139,4 @@ subroutine NL_Berry_current(en,Xk,k_map,V_bands,NL_J) enddo !$omp end parallel do ! -! call PP_redux_wait(NL_J,COMM=PAR_COM_Xk_bz_INDEX%COMM) - ! end subroutine NL_Berry_current diff --git a/src/nloptics/NL_Hamiltonian.F b/src/nloptics/NL_Hamiltonian.F index 32528e896b..4613a365dd 100644 --- a/src/nloptics/NL_Hamiltonian.F +++ b/src/nloptics/NL_Hamiltonian.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): MG CA ! subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) ! @@ -71,31 +55,27 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) call timing('NL Hamiltonian',OPR='start') #endif ! - if(.not.l_use_Hxc_collisions.or..not.COLLISIONS_have_HARTREE) then + if(eval_HARTREE .or. eval_DFT) then ! - if(eval_HARTREE .or. eval_DFT) then - ! - call NL_build_valence_bands(E,V_bands,VAL_BANDS,NL_bands(1)) - ! - call el_density_vbands(E,k,rho_n,VAL_BANDS) - ! - endif + call NL_build_valence_bands(E,V_bands,VAL_BANDS,NL_bands(1)) ! - if(eval_HARTREE) call V_Hartree(rho_n-rho_reference,V_hartree_sc) + call el_density_vbands(E,k,rho_n,VAL_BANDS) ! - ! I reconstruct the full density if necessary because both TDDFT - ! and JGM are not linear in rho_n and require the full density - ! - if(eval_DFT) then - ! - if(NL_bands(1)>1) rho_n=full_rho+rho_n-rho_reference - ! - ! Reconstruct the full density - ! - call XC_potential_driver(E,k,WF_kind,WF_xc_functional,1) - V_xc_sc=V_xc-V_xc_0 - ! - endif + endif + ! + if(eval_HARTREE) call V_Hartree(rho_n-rho_reference,V_hartree_sc) + ! + ! I reconstruct the full density if necessary because both TDDFT + ! and JGM are not linear in rho_n and require the full density + ! + if(eval_DFT) then + ! + if(NL_bands(1)>1) rho_n=full_rho+rho_n-rho_reference + ! + ! Reconstruct the full density + ! + call XC_potential_driver(E,k,WF_kind,WF_xc_functional,1) + V_xc_sc=V_xc-V_xc_0 ! endif ! @@ -246,7 +226,7 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) !$omp end parallel do ! enddo !---- loop on k-point - enddo + enddo !---- loop in spin polarizations ! #if defined _TIMING call timing('NL Hamiltonian',OPR='stop') diff --git a/src/nloptics/NL_Integrator.F b/src/nloptics/NL_Integrator.F index 305b514f51..e0705d5a6d 100644 --- a/src/nloptics/NL_Integrator.F +++ b/src/nloptics/NL_Integrator.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AC MG -! -! 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. +! Copyright (C) 2016 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): AC MG ! subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) ! diff --git a/src/nloptics/NL_average_operator.F b/src/nloptics/NL_average_operator.F index f7a104def2..dee6b663ad 100644 --- a/src/nloptics/NL_average_operator.F +++ b/src/nloptics/NL_average_operator.F @@ -1,25 +1,15 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL +! +! Copyright (C) 2016 The Yambo Team ! ! 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 -! 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. +!> @brief Calculate the average value of an operator +! +! = 1/N_k \sum_{v,k} < u_{v,k} (t) | A | u_{v,k} (t) > ! -! 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. +! Symmetry operatoration are applied if necessary ! subroutine NL_average_operator(O_VALUE,V_VALUE,O_REAL,O_MATRIX,& & V_MATRIX,PV_MATRIX,V_bands,k,en,TRANS,nK_mem) diff --git a/src/nloptics/NL_build_dG_lesser.F b/src/nloptics/NL_build_dG_lesser.F index 971d5e6757..c8b336719f 100644 --- a/src/nloptics/NL_build_dG_lesser.F +++ b/src/nloptics/NL_build_dG_lesser.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): MG CA ! subroutine NL_build_dG_lesser(en,V_bands,dG) ! diff --git a/src/nloptics/NL_build_valence_bands.F b/src/nloptics/NL_build_valence_bands.F index 18f6e13dfe..e85e84a36e 100644 --- a/src/nloptics/NL_build_valence_bands.F +++ b/src/nloptics/NL_build_valence_bands.F @@ -1,29 +1,13 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): CA ! +!> @brief Construct time-dependent valence bands V(i_G,i_v,i_k,i_spin) +! subroutine NL_build_valence_bands(en,V_input,VAL_BANDS,lowest_band) - ! - ! Construct time-dependent valence bands ! use pars, ONLY:SP,cZERO use electrons, ONLY:levels,n_sp_pol,n_spinor diff --git a/src/nloptics/NL_current.F b/src/nloptics/NL_current.F index e7e3f5eca0..81db37f377 100644 --- a/src/nloptics/NL_current.F +++ b/src/nloptics/NL_current.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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. +! Copyright (C) 2018 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 CA DS ! subroutine NL_current(k,E,V_input,NL_J) ! diff --git a/src/nloptics/NL_damping.F b/src/nloptics/NL_damping.F index d5e6747af6..29bf6576d4 100644 --- a/src/nloptics/NL_damping.F +++ b/src/nloptics/NL_damping.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): MG CA ! subroutine NL_damping(E,ik,i_sp_pol,V_bands) ! diff --git a/src/nloptics/NL_databases_IO.F b/src/nloptics/NL_databases_IO.F index b085fddab6..efbe120c62 100644 --- a/src/nloptics/NL_databases_IO.F +++ b/src/nloptics/NL_databases_IO.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): MG CA ! subroutine NL_databases_IO(i_f,read_or_write) ! diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index 1247dc82fc..e2aa043b40 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): MG CA ! subroutine NL_driver(E,X,k,q,Dip) ! @@ -38,12 +22,11 @@ subroutine NL_driver(E,X,k,q,Dip) use R_lattice, ONLY:bz_samp,qindx_free use fields, ONLY:Efield use QP_CTL_m, ONLY:QP_apply - use R_lattice, ONLY:qindx_S 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 - use real_time, ONLY:RT_step,NE_steps,NE_i_time,RT_nbands,RT_bands,eval_DFT +& HF,SEX,NL_bands,NL_nbands,WF_sample,V_bands_t,NL_alloc_k_distributed,NL_J_t + use real_time, ONLY:RT_step,NE_steps,NE_i_time,RT_nbands,RT_bands,eval_DFT,eval_HARTREE 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 @@ -94,10 +77,6 @@ subroutine NL_driver(E,X,k,q,Dip) !========================= call WF_and_dipole_dimensions(X,k) ! - ! Deallocate qindx_S (used only in previous subroutine) - ! ======================== - YAMBO_FREE(qindx_S) - ! ! QP dimensions !================ call H_QP_table_setup(E) @@ -115,6 +94,10 @@ subroutine NL_driver(E,X,k,q,Dip) call DIPOLE_IO(k,E,Dip,'read ',io_err,'NL') if(io_err/=0) call error("Error in DIPOLES! ") ! + ! Generate bare_qpg if required + !============================= + if(eval_HARTREE.or.CORRELATION==JGM) call col_driver(maxval((/wf_ng,QP_ng_Sx,QP_ng_SH/)),q) + ! ! Free memory: qindx_* and unused DIPOLES ! ===================================================== call qindx_free('ALL') @@ -157,15 +140,17 @@ subroutine NL_driver(E,X,k,q,Dip) elseif(Correlation==TDDFT) then call warning('With Collisions TDDFT is approximated to the linear contribution!') endif + eval_HARTREE=.FALSE. endif ! + 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') ! endif ! - if(Correlation/=IPA.and..not.COLLISIONS_have_HARTREE) then - call WF_load(WF,wf_ng,WF_Go_indx,(/1,NL_bands(2)/),(/1,k%nibz/),space='R',title='-NL') - 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') ! ! Load Collisions if necessary ! ============================ @@ -245,6 +230,7 @@ subroutine NL_driver(E,X,k,q,Dip) ! Store Variables ! NL_P_t (NE_i_time,:)=real(NL_P(1:3),SP) + NL_J_t (NE_i_time,:)=real(NL_J(1:6),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 diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index d3592af484..932ab77c08 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): MG CA ! subroutine NL_initialize(E,k) ! @@ -308,17 +292,6 @@ subroutine NL_initialize(E,k) ! H_potential = RT_potential ! - ! Deallocate bare_qpg if not required - !============================= - ! DS 2019/06/18: - ! bare_qpg is used by DIPOLE_dimensions - ! The dependency maybe likey removed in the future - ! For now I'm commenting the following lines - ! - !if(.not.eval_HARTREE.and.CORRELATION/=JGM) then - ! YAMBOX_FREE(bare_qpg) - !endif - ! ! Frequencies range ! ========================= NL_estep=(NL_er(2)-NL_er(1))/real(n_frequencies,SP) diff --git a/src/nloptics/NL_output.F b/src/nloptics/NL_output.F index 6038d3dc13..8fa0a7ba42 100644 --- a/src/nloptics/NL_output.F +++ b/src/nloptics/NL_output.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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. -! -! 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): MG CA ! subroutine NL_output(i_time,i_freq) ! diff --git a/src/nloptics/NL_project.dep b/src/nloptics/NL_project.dep new file mode 100644 index 0000000000..fbac890c90 --- /dev/null +++ b/src/nloptics/NL_project.dep @@ -0,0 +1,21 @@ + DIP_polarization.o + EXC_macroscopic_JGM.o + EXP_op.o + EXP_step.o + INVINT_step.o + NL_Berry_current.o + NL_Hamiltonian.o + NL_Integrator.o + NL_average_operator.o + NL_build_dG_lesser.o + NL_build_valence_bands.o + NL_current.o + NL_damping.o + NL_databases_IO.o + NL_driver.o + NL_initialize.o + NL_output.o + NL_start_and_restart.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 2a7aef3859..9d6375c6d2 100644 --- a/src/nloptics/NL_start_and_restart.F +++ b/src/nloptics/NL_start_and_restart.F @@ -1,26 +1,10 @@ ! ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM,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. +! Copyright (C) 2016 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. -! -! 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): AMCA ! subroutine NL_start_and_restart(E,k,Dip) ! diff --git a/src/nloptics/RK_basestep.F b/src/nloptics/RK_basestep.F index 35174e7393..33f799bb77 100644 --- a/src/nloptics/RK_basestep.F +++ b/src/nloptics/RK_basestep.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AC MG -! -! 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. +! Copyright (C) 2019 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): AC MG ! subroutine RK_basestep(K_out,V_in,H_in,I_in,nbf) use pars, ONLY:SP,cI,cZERO diff --git a/src/nloptics/el_density_vbands.F b/src/nloptics/el_density_vbands.F index ca2dd6fbd3..990076ccef 100644 --- a/src/nloptics/el_density_vbands.F +++ b/src/nloptics/el_density_vbands.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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. -! -! 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): MG CA ! subroutine el_density_vbands(en,Xk,rho,VAL_BANDS) ! diff --git a/src/output/EPS_2_eels.F b/src/output/EPS_2_eels.F index ff42df5ab2..294d662483 100644 --- a/src/output/EPS_2_eels.F +++ b/src/output/EPS_2_eels.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2009 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 ! logical function EPS_2_eels(wv,nw,be_verbose,ordering,eps,eel) ! diff --git a/src/output/EPS_2_moke.F b/src/output/EPS_2_moke.F index 45af7af4ad..bedfcc2c25 100644 --- a/src/output/EPS_2_moke.F +++ b/src/output/EPS_2_moke.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine EPS_2_moke(wv,nw,eps_ii,eps_ij,moke) ! diff --git a/src/output/EPS_2_trasmission_and_reflection.F b/src/output/EPS_2_trasmission_and_reflection.F index 9c8cc556f1..de1891a957 100644 --- a/src/output/EPS_2_trasmission_and_reflection.F +++ b/src/output/EPS_2_trasmission_and_reflection.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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 ! function EPS_2_trasmission_and_reflection( ) ! diff --git a/src/output/K_OUTPUT.F b/src/output/K_OUTPUT.F index 4620ba37eb..4937865b72 100644 --- a/src/output/K_OUTPUT.F +++ b/src/output/K_OUTPUT.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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. -! -! 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 DS ! subroutine K_OUTPUT(iq,W,WHAT,OBS) ! @@ -49,7 +33,7 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) character(2) :: ordering integer :: id character(10) :: solver - complex(SP) :: spectra(BSS_n_freqs,3),eel(BSS_n_freqs,3) + complex(SP) :: spectra(BSS_n_freqs,3),eel(BSS_n_freqs,3),fac real(SP) :: data_sort(N_BS_E_sorted+1) logical :: l_last_col,eval_eels ! @@ -94,7 +78,9 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) return endif ! - if (.not.STRING_match(WHAT,"dump")) return + if (.not.STRING_match(WHAT,"dump")) return + ! + fac=eps_2_alpha/4._SP/pi*bare_qpg(iq,1)**2/q_norm(iq)**2 ! ! ABSORPTION !------------ @@ -126,8 +112,8 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) ! POLARIZABILITY !---------------- if (X_do_obs("alpha")) then - if ( l_col_cut.or.l_0D ) spectra(:,1:3)=Epsilon_ii(:,2:4)*eps_2_alpha/4._SP/pi*bare_qpg(1,1)**2/q_norm(1)**2 - if (.not.(l_col_cut.or.l_0D)) spectra(:,1:3)=(1._SP+eel(:,1:3))*eps_2_alpha/4._SP/pi*bare_qpg(1,1)**2/q_norm(1)**2 + if ( l_col_cut.or.l_0D ) spectra(:,1:3)=Epsilon_ii(:,2:4)* fac + if (.not.(l_col_cut.or.l_0D)) spectra(:,1:3)=(1._SP+eel(:,1:3))*fac call ELEMENTAL_dump("alpha",spectra) endif ! @@ -197,7 +183,7 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) !------ if (X_do_obs("beta")) then spectra=0._SP - if (l_col_cut) spectra(:,1:3)=Epsilon_ij(:,2:4)*eps_2_alpha/4._SP/pi*bare_qpg(1,1)**2/q_norm(1)**2 + if (l_col_cut) spectra(:,1:3)=Epsilon_ij(:,2:4)*fac call ELEMENTAL_dump("beta",spectra) endif ! diff --git a/src/output/OUTPUT_driver.F b/src/output/OUTPUT_driver.F index 7e63f7bffb..60b821a3fc 100644 --- a/src/output/OUTPUT_driver.F +++ b/src/output/OUTPUT_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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. -! -! 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 ! subroutine OUTPUT_driver(file,action,TITLES,I_VALUES,R_VALUES,ORDER,UNIT,KIND) ! diff --git a/src/output/OUTPUT_unit_conversion.F b/src/output/OUTPUT_unit_conversion.F index d838eae6d8..37dfada2f8 100644 --- a/src/output/OUTPUT_unit_conversion.F +++ b/src/output/OUTPUT_unit_conversion.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine OUTPUT_unit_conversion(Ivar,Rvar,DESC,KIND,PARSER_call) ! diff --git a/src/output/X_OUTPUT_driver.F b/src/output/X_OUTPUT_driver.F index ece5143300..90b25af4ca 100644 --- a/src/output/X_OUTPUT_driver.F +++ b/src/output/X_OUTPUT_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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 ! subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) ! diff --git a/src/output/X_OUTPUT_messages.F b/src/output/X_OUTPUT_messages.F index b0a65a6088..aa9f65758f 100644 --- a/src/output/X_OUTPUT_messages.F +++ b/src/output/X_OUTPUT_messages.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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 ! subroutine X_OUTPUT_messages(iq,ig,Vnl,GF,ordering,Q_plus_G,MORE) ! diff --git a/src/parallel/.objects b/src/parallel/.objects index dfeadffd48..2c47eb7426 100644 --- a/src/parallel/.objects +++ b/src/parallel/.objects @@ -2,7 +2,7 @@ NL_objs = #if defined _NL NL_objs = PARALLEL_global_Non_Linear.o #endif -#if _ELPH +#if defined _PHEL || defined _ELPH ELPH_objs = PARALLEL_global_Phonon_Self_Energy.o #endif #if _RT diff --git a/src/parallel/ELPH_project.dep b/src/parallel/ELPH_project.dep index eebd5db682..8ea8148416 100644 --- a/src/parallel/ELPH_project.dep +++ b/src/parallel/ELPH_project.dep @@ -1,4 +1,4 @@ + PARALLEL_global_Phonon_Self_Energy.o PARALLEL_global_Self_Energy.o PARALLEL_global_dimensions.o - PARALLEL_global_indexes.o diff --git a/src/parallel/NL_project.dep b/src/parallel/NL_project.dep index a62c1284d9..17c81df0be 100644 --- a/src/parallel/NL_project.dep +++ b/src/parallel/NL_project.dep @@ -1,3 +1,4 @@ + PARALLEL_global_Non_Linear.o PARALLEL_global_dimensions.o PARALLEL_global_indexes.o PARALLEL_global_reset.o diff --git a/src/parallel/PARALLEL_FREQS_setup.F b/src/parallel/PARALLEL_FREQS_setup.F index 7def46862e..19368696aa 100644 --- a/src/parallel/PARALLEL_FREQS_setup.F +++ b/src/parallel/PARALLEL_FREQS_setup.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 ! subroutine PARALLEL_FREQS_setup(W,IND,COMM) ! diff --git a/src/parallel/PARALLEL_Haydock_VEC_COMMs.F b/src/parallel/PARALLEL_Haydock_VEC_COMMs.F index e82c69a73d..9cb00df63d 100644 --- a/src/parallel/PARALLEL_Haydock_VEC_COMMs.F +++ b/src/parallel/PARALLEL_Haydock_VEC_COMMs.F @@ -1,24 +1,8 @@ -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): 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. +! Copyright (C) 2014 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. -! -! 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): MG DS ! subroutine PARALLEL_Haydock_VEC_COMMs(what) ! diff --git a/src/parallel/PARALLEL_MATRIX_distribute.F b/src/parallel/PARALLEL_MATRIX_distribute.F index 9334db0ecd..cb4c6ccba0 100644 --- a/src/parallel/PARALLEL_MATRIX_distribute.F +++ b/src/parallel/PARALLEL_MATRIX_distribute.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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 ! subroutine PARALLEL_MATRIX_distribute(COMM,PAR_IND,nb,PAR_index,PAR_ID,PAR_n_elements) ! diff --git a/src/parallel/PARALLEL_PAR_to_PAR_comms_init.F b/src/parallel/PARALLEL_PAR_to_PAR_comms_init.F index 406eb9ce06..819c5b7eab 100644 --- a/src/parallel/PARALLEL_PAR_to_PAR_comms_init.F +++ b/src/parallel/PARALLEL_PAR_to_PAR_comms_init.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine PARALLEL_PAR_to_PAR_comms_init() ! diff --git a/src/parallel/PARALLEL_SETUP_K_scheme.F b/src/parallel/PARALLEL_SETUP_K_scheme.F index 6a225f3bf0..6a5086c823 100644 --- a/src/parallel/PARALLEL_SETUP_K_scheme.F +++ b/src/parallel/PARALLEL_SETUP_K_scheme.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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): DS ! subroutine PARALLEL_SETUP_K_scheme(PAR_K_scheme_kind) ! diff --git a/src/parallel/PARALLEL_SND_RCV_plan.F b/src/parallel/PARALLEL_SND_RCV_plan.F index 1639faad94..60ae60a081 100644 --- a/src/parallel/PARALLEL_SND_RCV_plan.F +++ b/src/parallel/PARALLEL_SND_RCV_plan.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine PARALLEL_SND_RCV_plan( COMM, N ) ! diff --git a/src/parallel/PARALLEL_Transitions_grouping.F b/src/parallel/PARALLEL_Transitions_grouping.F index 1fb1bc423d..439cea3afb 100644 --- a/src/parallel/PARALLEL_Transitions_grouping.F +++ b/src/parallel/PARALLEL_Transitions_grouping.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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. -! -! 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 ! subroutine PARALLEL_Transitions_grouping() ! diff --git a/src/parallel/PARALLEL_WF_distribute.F b/src/parallel/PARALLEL_WF_distribute.F index adb8ff6edb..c467ff5d90 100644 --- a/src/parallel/PARALLEL_WF_distribute.F +++ b/src/parallel/PARALLEL_WF_distribute.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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 ! subroutine PARALLEL_WF_distribute(B_index,Bp_index,K_index,B_and_K_index,& & QP_index,PLASMA_index,Bm_index,CLEAN_UP) diff --git a/src/parallel/PARALLEL_WF_index.F b/src/parallel/PARALLEL_WF_index.F index 7487211c67..5ed43245f7 100644 --- a/src/parallel/PARALLEL_WF_index.F +++ b/src/parallel/PARALLEL_WF_index.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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 ! subroutine PARALLEL_WF_index(COMM) ! diff --git a/src/parallel/PARALLEL_add_Q_to_K_list.F b/src/parallel/PARALLEL_add_Q_to_K_list.F index b1d70eed55..79b4e1fe51 100644 --- a/src/parallel/PARALLEL_add_Q_to_K_list.F +++ b/src/parallel/PARALLEL_add_Q_to_K_list.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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. -! -! 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 ! 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) diff --git a/src/parallel/PARALLEL_assign_LA_COMMs.F b/src/parallel/PARALLEL_assign_LA_COMMs.F index 69cef5faa5..8b9136ed27 100644 --- a/src/parallel/PARALLEL_assign_LA_COMMs.F +++ b/src/parallel/PARALLEL_assign_LA_COMMs.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM,AF -! -! 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) 2013 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. -! -! 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 AF ! subroutine PARALLEL_assign_LA_COMMs(ENVIRONMENT,idriver,Ncpu_in) ! diff --git a/src/parallel/PARALLEL_assign_chains_and_COMMs.F b/src/parallel/PARALLEL_assign_chains_and_COMMs.F index 56a499db2c..f2ecfa6034 100644 --- a/src/parallel/PARALLEL_assign_chains_and_COMMs.F +++ b/src/parallel/PARALLEL_assign_chains_and_COMMs.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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. -! -! 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 DS ! subroutine PARALLEL_assign_chains_and_COMMs(n_elements,COMM_index_1,COMM_index_2,COMM_index_3,& & COMM_index_4,COMM_index_5,COMM_A2A_1,COMM_A2A_2,& diff --git a/src/parallel/PARALLEL_build_up_child_INTER_chains.F b/src/parallel/PARALLEL_build_up_child_INTER_chains.F index 50b8cfe4b7..dbfe75eb14 100644 --- a/src/parallel/PARALLEL_build_up_child_INTER_chains.F +++ b/src/parallel/PARALLEL_build_up_child_INTER_chains.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 DS ! subroutine PARALLEL_build_up_child_INTER_chains(i_child,COMM_child,i_father) ! diff --git a/src/parallel/PARALLEL_check_phase_space.F b/src/parallel/PARALLEL_check_phase_space.F index 93b0987e4f..f590dc11d1 100644 --- a/src/parallel/PARALLEL_check_phase_space.F +++ b/src/parallel/PARALLEL_check_phase_space.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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 ! subroutine PARALLEL_check_phase_space(N_PAR_elements,WORLD,WORLD_size,MSG) ! diff --git a/src/parallel/PARALLEL_collisions.F b/src/parallel/PARALLEL_collisions.F index d0b0d0c21b..259c9359a7 100644 --- a/src/parallel/PARALLEL_collisions.F +++ b/src/parallel/PARALLEL_collisions.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! subroutine PARALLEL_collisions( k, COLL ) ! diff --git a/src/parallel/PARALLEL_distribute_BZk_using_IBZk.F b/src/parallel/PARALLEL_distribute_BZk_using_IBZk.F index 0e2bc388cc..d6a3852f7b 100644 --- a/src/parallel/PARALLEL_distribute_BZk_using_IBZk.F +++ b/src/parallel/PARALLEL_distribute_BZk_using_IBZk.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine PARALLEL_distribute_BZk_using_IBZk(COMM,K,IND_ibz,IBZ_id,IND_out,BZ_id,BZ_index,PAR_n_bz) ! diff --git a/src/parallel/PARALLEL_get_ENVIRONMENT_structure.F b/src/parallel/PARALLEL_get_ENVIRONMENT_structure.F index 24ead2da90..01f64d0574 100644 --- a/src/parallel/PARALLEL_get_ENVIRONMENT_structure.F +++ b/src/parallel/PARALLEL_get_ENVIRONMENT_structure.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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. -! -! 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 ! subroutine PARALLEL_get_ENVIRONMENT_structure(ENVIRONMENT) ! diff --git a/src/parallel/PARALLEL_get_user_structure.F b/src/parallel/PARALLEL_get_user_structure.F index c76e8cf92e..5b02700af4 100644 --- a/src/parallel/PARALLEL_get_user_structure.F +++ b/src/parallel/PARALLEL_get_user_structure.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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. -! -! 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 ! subroutine PARALLEL_get_user_structure(ENVIRONMENT,RUNNING_ENVIRONMENT) ! diff --git a/src/parallel/PARALLEL_global_BZINDX.F b/src/parallel/PARALLEL_global_BZINDX.F index 7733884538..2bb5859565 100644 --- a/src/parallel/PARALLEL_global_BZINDX.F +++ b/src/parallel/PARALLEL_global_BZINDX.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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): DS ! subroutine PARALLEL_global_BZINDX(E,Xk,q,ENVIRONMENT) ! diff --git a/src/parallel/PARALLEL_global_DIPOLES.F b/src/parallel/PARALLEL_global_DIPOLES.F index 3075b01332..129747d89c 100644 --- a/src/parallel/PARALLEL_global_DIPOLES.F +++ b/src/parallel/PARALLEL_global_DIPOLES.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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): DS ! subroutine PARALLEL_global_DIPOLES(E,Xk,q,ENVIRONMENT) ! diff --git a/src/parallel/PARALLEL_global_Non_Linear.F b/src/parallel/PARALLEL_global_Non_Linear.F index de6c5fd421..5054cd4741 100644 --- a/src/parallel/PARALLEL_global_Non_Linear.F +++ b/src/parallel/PARALLEL_global_Non_Linear.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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): CA MG DS ! subroutine PARALLEL_global_Non_Linear(E,Xk,q,ENVIRONMENT) ! diff --git a/src/parallel/PARALLEL_global_Phonon_Self_Energy.F b/src/parallel/PARALLEL_global_Phonon_Self_Energy.F index 48f795acfe..c43f74b0ea 100644 --- a/src/parallel/PARALLEL_global_Phonon_Self_Energy.F +++ b/src/parallel/PARALLEL_global_Phonon_Self_Energy.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine PARALLEL_global_Phonon_Self_Energy( ) ! diff --git a/src/parallel/PARALLEL_global_Real_Time.F b/src/parallel/PARALLEL_global_Real_Time.F index ce41496cac..eaa25c73d4 100644 --- a/src/parallel/PARALLEL_global_Real_Time.F +++ b/src/parallel/PARALLEL_global_Real_Time.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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 ! subroutine PARALLEL_global_Real_Time(E,Xk,q,X_type) ! diff --git a/src/parallel/PARALLEL_global_Response_G.F b/src/parallel/PARALLEL_global_Response_G.F index e630664fd9..babf5967c6 100644 --- a/src/parallel/PARALLEL_global_Response_G.F +++ b/src/parallel/PARALLEL_global_Response_G.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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 ! subroutine PARALLEL_global_Response_G(E,Xk,q,ENVIRONMENT,X_type) ! diff --git a/src/parallel/PARALLEL_global_Response_IO.F b/src/parallel/PARALLEL_global_Response_IO.F index 66dafb0936..78280f124b 100644 --- a/src/parallel/PARALLEL_global_Response_IO.F +++ b/src/parallel/PARALLEL_global_Response_IO.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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. -! -! 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 DS ! subroutine PARALLEL_global_Response_IO( ) ! diff --git a/src/parallel/PARALLEL_global_Response_T.F b/src/parallel/PARALLEL_global_Response_T.F index 84f58fdc52..f0c34aaeff 100644 --- a/src/parallel/PARALLEL_global_Response_T.F +++ b/src/parallel/PARALLEL_global_Response_T.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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. -! -! 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 DS ! subroutine PARALLEL_global_Response_T_base(Xk) ! diff --git a/src/parallel/PARALLEL_global_Response_T_transitions.F b/src/parallel/PARALLEL_global_Response_T_transitions.F index 85d5c9292c..5b44e157f6 100644 --- a/src/parallel/PARALLEL_global_Response_T_transitions.F +++ b/src/parallel/PARALLEL_global_Response_T_transitions.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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. -! -! 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 DS ! subroutine PARALLEL_global_Response_T_transitions(Xk) ! diff --git a/src/parallel/PARALLEL_global_ScaLapacK.F b/src/parallel/PARALLEL_global_ScaLapacK.F index 2c6f994e3b..d5ff30559b 100644 --- a/src/parallel/PARALLEL_global_ScaLapacK.F +++ b/src/parallel/PARALLEL_global_ScaLapacK.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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 ! subroutine PARALLEL_global_ScaLapacK( ) ! diff --git a/src/parallel/PARALLEL_global_Self_Energy.F b/src/parallel/PARALLEL_global_Self_Energy.F index fec65a7093..59f5a56a3b 100644 --- a/src/parallel/PARALLEL_global_Self_Energy.F +++ b/src/parallel/PARALLEL_global_Self_Energy.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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 ! subroutine PARALLEL_global_Self_Energy(E,Xk,q) ! @@ -35,8 +19,9 @@ subroutine PARALLEL_global_Self_Energy(E,Xk,q) use parallel_m, ONLY:HEAD_QP_cpu,HEAD_b_cpu,master_cpu,n_WF_bands_to_load,COMM_copy,& & PAR_Q_bz_range,PAR_Q_ibz_range,PAR_n_bands,PAR_build_index,ncpu,PAR_INDEX_copy ! COMMUNICATORS - use parallel_m, ONLY:PAR_COM_QP_INDEX,PAR_COM_Q_INDEX,PAR_COM_QP_A2A,PAR_COM_G_b_INDEX, & -& PAR_COM_Q_A2A + use parallel_m, ONLY:PAR_COM_QP_INDEX,PAR_COM_Q_INDEX,PAR_COM_RL_INDEX,PAR_COM_G_b_INDEX,& +& PAR_COM_QP_A2A,PAR_COM_Q_A2A,PAR_COM_RL_A2A,PAR_COM_SE_WORLD,& +& PAR_COM_SE_WORLD_RL_resolved ! IND use parallel_m, ONLY:PAR_IND_QP,PAR_IND_Q_ibz,PAR_IND_G_b,PAR_IND_Q_bz,PAR_IND_Xk_ibz,PAR_IND_G_k,& & PAR_IND_DIPk_bz,PAR_IND_DIPk_ibz,PAR_IND_OVLPk_ibz @@ -79,13 +64,24 @@ subroutine PARALLEL_global_Self_Energy(E,Xk,q) integer :: i_k,nb_mat #endif ! - CALL PARALLEL_structure(3,(/"q ","qp","b "/)) + CALL PARALLEL_structure(4,(/"q ","g ","qp","b "/)) ! - call PARALLEL_assign_chains_and_COMMs(3,COMM_index_1=PAR_COM_Q_INDEX,& -& COMM_index_2=PAR_COM_QP_INDEX,& -& COMM_index_3=PAR_COM_G_b_INDEX,& + call PARALLEL_assign_chains_and_COMMs(4,COMM_index_1=PAR_COM_Q_INDEX,& +& COMM_index_2=PAR_COM_RL_INDEX,& +& COMM_index_3=PAR_COM_QP_INDEX,& +& COMM_index_4=PAR_COM_G_b_INDEX,& & COMM_A2A_1=PAR_COM_Q_A2A,& -& COMM_A2A_2=PAR_COM_QP_A2A) +& COMM_A2A_2=PAR_COM_RL_A2A,& +& COMM_A2A_3=PAR_COM_QP_A2A) + ! + ! COMMs setup + ! + call COMM_copy(PAR_COM_Q_A2A,PAR_COM_SE_WORLD) + call COMM_copy(PAR_COM_Q_A2A,PAR_COM_SE_WORLD_RL_resolved) + ! + ! + if (PAR_COM_RL_INDEX%n_CPU>1) call COMM_copy(PAR_COM_RL_A2A,PAR_COM_SE_WORLD_RL_resolved) + ! ! ! The routine PARALLEL_assign_chains_and_COMMs cannot define COMMUNICATORS for internal ! A2A when there is no internal distribution diff --git a/src/parallel/PARALLEL_global_defaults.F b/src/parallel/PARALLEL_global_defaults.F index 29dd415dea..6a147f8b75 100644 --- a/src/parallel/PARALLEL_global_defaults.F +++ b/src/parallel/PARALLEL_global_defaults.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! subroutine PARALLEL_global_defaults(ENVIRONMENT) ! @@ -66,7 +50,7 @@ subroutine PARALLEL_global_defaults(ENVIRONMENT) ! if ((.not.PARALLEL_ENV_uses_default(i_PAR_structure)).and.ncpu_now/=ncpu.and.ENVIRONMENT=="BZ_Indexes") then call warning("MPI for BZ indexes is "//trim(intc(ncpu_now))//& - &" while number of cores is"//trim(intc(ncpu))//". Assuming expert user.") + &" while number of cores is "//trim(intc(ncpu))//". Assuming expert user.") return endif ! @@ -86,14 +70,14 @@ subroutine PARALLEL_global_defaults(ENVIRONMENT) case("Phonon_Self_Energy") call GIMME_a_parallel_proposal(3,(/"q","k","b"/)) case("Non_Linear") - call GIMME_a_parallel_proposal(2,(/" w"," k"/)) + call GIMME_a_parallel_proposal(2,(/" k"," w"/)) case("ScaLapacK") CPU_structure(i_PAR_structure)%ROLE(1)="p" CPU_structure(i_PAR_structure)%CPU(1)=ncpu CPU_structure(i_PAR_structure)%ROLE(2)="d" CPU_structure(i_PAR_structure)%CPU(2)=1 case("Self_Energy") - call GIMME_a_parallel_proposal(3,(/" b","qp"," q"/)) + call GIMME_a_parallel_proposal(4,(/" b","qp"," g"," q"/)) case("Response_T_space") call GIMME_a_parallel_proposal(2,(/"eh"," k"/)) case("BZ_Indexes") diff --git a/src/parallel/PARALLEL_global_dimensions.F b/src/parallel/PARALLEL_global_dimensions.F index 3454abbb49..3c3b95e569 100644 --- a/src/parallel/PARALLEL_global_dimensions.F +++ b/src/parallel/PARALLEL_global_dimensions.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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. -! -! 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 DS ! subroutine PARALLEL_global_dimensions(E,Xk,q,ENVIRONMENT) ! @@ -105,7 +89,9 @@ subroutine PARALLEL_global_dimensions(E,Xk,q,ENVIRONMENT) #if defined _PHEL if (ENVIRONMENT=="Phonon_Self_Energy") PAR_Q_ibz_range=PH_Q #endif + ! if (ENVIRONMENT=="Self_Energy" ) then + PAR_n_G_vectors= X_ng #if defined _SC if (l_sc_run.and.& & any( (/P_collisions%N,COH_collisions%N,HXC_collisions%N/)> 0)) & diff --git a/src/parallel/PARALLEL_global_indexes.F b/src/parallel/PARALLEL_global_indexes.F index be39fde426..bc27f1676e 100644 --- a/src/parallel/PARALLEL_global_indexes.F +++ b/src/parallel/PARALLEL_global_indexes.F @@ -1,34 +1,15 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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. -! -! 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 DS ! subroutine PARALLEL_global_indexes(E,Xk,q,ENVIRONMENT,X,Dip,RESET,Dip_limits_pre_defined) ! ! 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 -#if defined _QED - use parallel_m, ONLY:l_par_SC -#endif +& l_par_DIP,l_par_BZINDX,l_par_NL,l_par_SC ! COMMUNICATORS use parallel_m, ONLY:PAR_COM_CON_INDEX_X,PAR_COM_VAL_INDEX_X ! IND @@ -42,9 +23,6 @@ subroutine PARALLEL_global_indexes(E,Xk,q,ENVIRONMENT,X,Dip,RESET,Dip_limits_pre use parallel_int, ONLY:PARALLEL_index,PARALLEL_live_message use DIPOLES, ONLY:DIPOLE_t use X_m, ONLY:X_t,l_X_terminator -#if defined _QED - use parallel_m, ONLY:l_par_SC -#endif use electrons, ONLY:levels use R_lattice, ONLY:bz_samp use pars, ONLY:SP @@ -102,9 +80,7 @@ subroutine PARALLEL_global_indexes(E,Xk,q,ENVIRONMENT,X,Dip,RESET,Dip_limits_pre l_par_SE =ENVIRONMENT=="Self_Energy" l_par_RT =ENVIRONMENT=="Real_Time" l_par_NL =ENVIRONMENT=="Non_Linear" -#if defined _QED l_par_SC =ENVIRONMENT=="Self_Energy" -#endif ! !================================== ! USER provided PARALLEL structure @@ -178,7 +154,7 @@ subroutine PARALLEL_global_indexes(E,Xk,q,ENVIRONMENT,X,Dip,RESET,Dip_limits_pre #if defined _SCALAPACK if ( ENVIRONMENT=="ScaLapacK") call PARALLEL_global_ScaLapack( ) #endif -#if defined _ELPH +#if defined _PHEL if ( ENVIRONMENT=="Phonon_Self_Energy") call PARALLEL_global_Phonon_Self_Energy( ) #endif ! diff --git a/src/parallel/PARALLEL_global_reset.F b/src/parallel/PARALLEL_global_reset.F index 562f7094f4..ecfe9d32ca 100644 --- a/src/parallel/PARALLEL_global_reset.F +++ b/src/parallel/PARALLEL_global_reset.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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 ! subroutine PARALLEL_global_reset(ENVIRONMENT,X_type) ! diff --git a/src/parallel/PARALLEL_index.F b/src/parallel/PARALLEL_index.F index 31ec01a8d2..74a803fcc8 100644 --- a/src/parallel/PARALLEL_index.F +++ b/src/parallel/PARALLEL_index.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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. -! -! 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 DS ! subroutine PARALLEL_index(px,uplim,low_range,COMM,CONSECUTIVE,ORDERED,NO_EMPTIES,MASK) ! diff --git a/src/parallel/PARALLEL_live_message.F b/src/parallel/PARALLEL_live_message.F index ab6f71084b..e61b11c3f7 100644 --- a/src/parallel/PARALLEL_live_message.F +++ b/src/parallel/PARALLEL_live_message.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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 ! subroutine PARALLEL_live_message(WHAT,ENVIRONMENT,LOADED,TOTAL,LOADED_r,TOTAL_r,NC) ! diff --git a/src/parallel/PARALLEL_minimal_index_from_overlaping.F b/src/parallel/PARALLEL_minimal_index_from_overlaping.F index 3405d28b3a..9a351ab4d8 100644 --- a/src/parallel/PARALLEL_minimal_index_from_overlaping.F +++ b/src/parallel/PARALLEL_minimal_index_from_overlaping.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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. -! -! 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 ! subroutine PARALLEL_minimal_index_from_overlaping(IND_in,IND_out,PAR_COMM) ! diff --git a/src/parallel/PARALLEL_scheme_initialize.F b/src/parallel/PARALLEL_scheme_initialize.F index 25cd2c5c0d..7c28a24e7b 100644 --- a/src/parallel/PARALLEL_scheme_initialize.F +++ b/src/parallel/PARALLEL_scheme_initialize.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine PARALLEL_scheme_initialize(WHAT,ENVIRONMENT,PARALL_PARs,N,TABLE,MATRIX) ! diff --git a/src/parallel/PARALLEL_set_the_active_structures.F b/src/parallel/PARALLEL_set_the_active_structures.F index a4ac11960c..56afa03dae 100644 --- a/src/parallel/PARALLEL_set_the_active_structures.F +++ b/src/parallel/PARALLEL_set_the_active_structures.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! subroutine PARALLEL_set_the_active_structures(n_structures) ! diff --git a/src/parallel/PARALLEL_structure.F b/src/parallel/PARALLEL_structure.F index 6966ea1fe0..5cdc504026 100644 --- a/src/parallel/PARALLEL_structure.F +++ b/src/parallel/PARALLEL_structure.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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. -! -! 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 DS ! subroutine PARALLEL_structure(n_elements,ROLE) ! diff --git a/src/parallel/PHEL_project.dep b/src/parallel/PHEL_project.dep index 5a22ceb339..2fca878a6e 100644 --- a/src/parallel/PHEL_project.dep +++ b/src/parallel/PHEL_project.dep @@ -1,2 +1,4 @@ + PARALLEL_global_Phonon_Self_Energy.o PARALLEL_global_dimensions.o + PARALLEL_global_indexes.o diff --git a/src/parallel/QED_project.dep b/src/parallel/QED_project.dep index 45d4a42c7e..a88a1bb113 100644 --- a/src/parallel/QED_project.dep +++ b/src/parallel/QED_project.dep @@ -1,4 +1,4 @@ + PARALLEL_collisions.o PARALLEL_global_Self_Energy.o - PARALLEL_global_indexes.o PARALLEL_global_reset.o diff --git a/src/parallel/RT_project.dep b/src/parallel/RT_project.dep index 51f548f0e3..494a94ba59 100644 --- a/src/parallel/RT_project.dep +++ b/src/parallel/RT_project.dep @@ -1,4 +1,6 @@ PARALLEL_WF_distribute.o + PARALLEL_collisions.o + PARALLEL_global_Real_Time.o PARALLEL_global_Self_Energy.o PARALLEL_global_dimensions.o PARALLEL_global_indexes.o diff --git a/src/parallel/SC_project.dep b/src/parallel/SC_project.dep index f6e5c9bc5a..1a2070b94e 100644 --- a/src/parallel/SC_project.dep +++ b/src/parallel/SC_project.dep @@ -1,4 +1,5 @@ PARALLEL_WF_distribute.o + PARALLEL_collisions.o PARALLEL_global_Self_Energy.o PARALLEL_global_dimensions.o PARALLEL_global_reset.o diff --git a/src/parallel/SLK_communicators.F b/src/parallel/SLK_communicators.F index eb8f01ada9..2c8c050513 100644 --- a/src/parallel/SLK_communicators.F +++ b/src/parallel/SLK_communicators.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! subroutine SLK_communicators(INTRA_world,INTER_world,N) ! diff --git a/src/parallel/check_for_a_redundant_IO.F b/src/parallel/check_for_a_redundant_IO.F index d715b5567f..5c16c21fef 100644 --- a/src/parallel/check_for_a_redundant_IO.F +++ b/src/parallel/check_for_a_redundant_IO.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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 ! subroutine check_for_a_redundant_IO(path_,cpu_seen_by_me,cpu_seen_by_any) ! diff --git a/src/parser/PARSER_array.F b/src/parser/PARSER_array.F index 291d60b16a..e4080f3865 100644 --- a/src/parser/PARSER_array.F +++ b/src/parser/PARSER_array.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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 ! subroutine PARSER_array(mode,VAR,N,M,DESC,CH_v,R_v,I_v,Kn) ! diff --git a/src/parser/PARSER_close_G.F b/src/parser/PARSER_close_G.F index 85e4bc32f6..fc780cb352 100644 --- a/src/parser/PARSER_close_G.F +++ b/src/parser/PARSER_close_G.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine PARSER_close_G(ng,what) ! diff --git a/src/parser/PARSER_convert_INT.F b/src/parser/PARSER_convert_INT.F index 5a77b86a93..ab77e51ad9 100644 --- a/src/parser/PARSER_convert_INT.F +++ b/src/parser/PARSER_convert_INT.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine PARSER_convert_INT(ivar,v_descr,force_RL) ! diff --git a/src/parser/PARSER_convert_REAL.F b/src/parser/PARSER_convert_REAL.F index 96d303f4f7..dfadac76f4 100644 --- a/src/parser/PARSER_convert_REAL.F +++ b/src/parser/PARSER_convert_REAL.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine PARSER_convert_REAL(rfac,v_descr) ! diff --git a/src/parser/PARSER_dump_the_additional_lines.F b/src/parser/PARSER_dump_the_additional_lines.F index 4e98531d01..3f6d159777 100644 --- a/src/parser/PARSER_dump_the_additional_lines.F +++ b/src/parser/PARSER_dump_the_additional_lines.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine PARSER_dump_the_additional_lines(ou) ! diff --git a/src/parser/PARSER_lib.F b/src/parser/PARSER_lib.F index e8178b21cf..ede350ed01 100644 --- a/src/parser/PARSER_lib.F +++ b/src/parser/PARSER_lib.F @@ -1,25 +1,10 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org -! -! Authors (see AUTHORS file for details): AM +! License-Identifier: GPL ! +! Copyright (C) 2006 The Yambo Team ! Copyright (C) 2002 M. Marques, A. Castro, A. Rubio, G. Bertsch ! -! 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, 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. +! Authors (see AUTHORS file for details): AM ! module PARSER_lib ! diff --git a/src/parser/PARSER_symbols.c b/src/parser/PARSER_symbols.c index 67cb7c963a..6c774a15e2 100644 --- a/src/parser/PARSER_symbols.c +++ b/src/parser/PARSER_symbols.c @@ -17,6 +17,8 @@ 02111-1307, USA. */ +#include +#include #include #include #include diff --git a/src/parser/initactivate.F b/src/parser/initactivate.F index 45509e2a60..27732042ad 100644 --- a/src/parser/initactivate.F +++ b/src/parser/initactivate.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2019 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. -! -! 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 DS ! subroutine initactivate(mode,names) ! diff --git a/src/parser/initinfio.F b/src/parser/initinfio.F index fff40d5a0d..d30169005a 100644 --- a/src/parser/initinfio.F +++ b/src/parser/initinfio.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2019 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. -! -! 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 DS ! subroutine initinfio(defs,ou) ! diff --git a/src/parser/initverbosity.F b/src/parser/initverbosity.F index b92fa57d41..7a23006ec8 100644 --- a/src/parser/initverbosity.F +++ b/src/parser/initverbosity.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2019 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. -! -! 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 DS ! subroutine initverbosity(var_name,var_id,var_type,defs,verbosity_level) ! diff --git a/src/parser/mod_it_tools.F b/src/parser/mod_it_tools.F index 1f1d42eff5..8f43336ad8 100644 --- a/src/parser/mod_it_tools.F +++ b/src/parser/mod_it_tools.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module it_tools ! diff --git a/src/parser/mod_itm.F b/src/parser/mod_itm.F index a9151716ca..a42d011529 100644 --- a/src/parser/mod_itm.F +++ b/src/parser/mod_itm.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module it_m ! diff --git a/src/parser/mod_parser_m.F b/src/parser/mod_parser_m.F index dcffa6e660..ce1816bbd8 100644 --- a/src/parser/mod_parser_m.F +++ b/src/parser/mod_parser_m.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module parser_m ! diff --git a/src/ph-el/PHEL_Lifetimes.F b/src/ph-el/PHEL_Lifetimes.F index af8f52fe2b..2e7d16698a 100644 --- a/src/ph-el/PHEL_Lifetimes.F +++ b/src/ph-el/PHEL_Lifetimes.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): 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. +! Copyright (C) 2020 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. -! -! 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): FP ! subroutine PHEL_Lifetimes(E,k,q,k_FG,E_FG) ! diff --git a/src/ph-el/PHEL_Self_Energy.F b/src/ph-el/PHEL_Self_Energy.F index 7932367743..a6a63a3a2d 100644 --- a/src/ph-el/PHEL_Self_Energy.F +++ b/src/ph-el/PHEL_Self_Energy.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): 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. +! Copyright (C) 2020 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. -! -! 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): FP ! subroutine PHEL_Self_Energy(iq,E,k,q,k_FG,E_FG) ! diff --git a/src/ph-el/PHEL_double_grid_subset.F b/src/ph-el/PHEL_double_grid_subset.F index 68c1090ab7..83181f5077 100644 --- a/src/ph-el/PHEL_double_grid_subset.F +++ b/src/ph-el/PHEL_double_grid_subset.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): 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. +! Copyright (C) 2020 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): FP ! subroutine PHEL_double_grid_subset(k,k_FG,nk_CG) ! diff --git a/src/ph-el/PHEL_driver.F b/src/ph-el/PHEL_driver.F index 55f3aee66d..79fa26455b 100644 --- a/src/ph-el/PHEL_driver.F +++ b/src/ph-el/PHEL_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 FP ! subroutine PHEL_driver(E,k,q) ! diff --git a/src/ph-el/PHEL_from_GF_to_quasiphonons.F b/src/ph-el/PHEL_from_GF_to_quasiphonons.F index da3b991dee..9a4693eb6e 100644 --- a/src/ph-el/PHEL_from_GF_to_quasiphonons.F +++ b/src/ph-el/PHEL_from_GF_to_quasiphonons.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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 ! subroutine PHEL_from_GF_to_quasiphonons(il,iq,ph_freq,QPH) ! diff --git a/src/ph-el/PHEL_k_nearest_table.F b/src/ph-el/PHEL_k_nearest_table.F index 4386dc93a1..f7b7dcb979 100644 --- a/src/ph-el/PHEL_k_nearest_table.F +++ b/src/ph-el/PHEL_k_nearest_table.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): 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. +! Copyright (C) 2021 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): FP ! subroutine PHEL_k_nearest_table(k) ! diff --git a/src/ph-el/PHEL_project.dep b/src/ph-el/PHEL_project.dep new file mode 100644 index 0000000000..4c607cea6f --- /dev/null +++ b/src/ph-el/PHEL_project.dep @@ -0,0 +1,10 @@ + PHEL_Self_Energy.o + PHEL_double_grid_subset.o + PHEL_driver.o + PHEL_from_GF_to_quasiphonons.o + PHEL_k_nearest_table.o + PHEL_screening.o + PH_Grid_Check_Transitions.o + PH_Transitions_Report.o + PH_of.o + diff --git a/src/ph-el/PHEL_screening.F b/src/ph-el/PHEL_screening.F index 7890c5613b..7dd6884438 100644 --- a/src/ph-el/PHEL_screening.F +++ b/src/ph-el/PHEL_screening.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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. -! -! 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 ! subroutine PHEL_screening(E,q,DONE) ! diff --git a/src/ph-el/PH_Grid_Check_Transitions.F b/src/ph-el/PH_Grid_Check_Transitions.F index 33fafb564c..680ae59f82 100644 --- a/src/ph-el/PH_Grid_Check_Transitions.F +++ b/src/ph-el/PH_Grid_Check_Transitions.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): FP 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. +! Copyright (C) 2020 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): FP AM ! subroutine PH_Grid_Check_Transitions(iq,k,q,bands,k_FG,E_FG) ! diff --git a/src/ph-el/PH_Transitions_Report.F b/src/ph-el/PH_Transitions_Report.F index c835971089..372cff8ab8 100644 --- a/src/ph-el/PH_Transitions_Report.F +++ b/src/ph-el/PH_Transitions_Report.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): FP 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. +! Copyright (C) 2021 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): FP AM ! subroutine PH_Transitions_Report( ) ! diff --git a/src/ph-el/PH_of.F b/src/ph-el/PH_of.F index 09a0086103..216f4000f1 100644 --- a/src/ph-el/PH_of.F +++ b/src/ph-el/PH_of.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine PH_of(q) ! diff --git a/src/pol_function/ELPH_project.dep b/src/pol_function/ELPH_project.dep index 4efcf9d581..5cd3d69169 100644 --- a/src/pol_function/ELPH_project.dep +++ b/src/pol_function/ELPH_project.dep @@ -1,2 +1,3 @@ + X_GreenF_remap.o X_irredux.o diff --git a/src/pol_function/OPTICS_driver.F b/src/pol_function/OPTICS_driver.F index 1ee0aea33f..bb0652df7d 100644 --- a/src/pol_function/OPTICS_driver.F +++ b/src/pol_function/OPTICS_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine OPTICS_driver(Xen,Xk,q,wv,X,Dip) ! @@ -186,7 +170,7 @@ subroutine OPTICS_driver(Xen,Xk,q,wv,X,Dip) ! ! I make alpha consistent with the above, IP, definition ! To check if this need to be fixed with i_G_shift/=1 - if (l_col_cut.or.l_0D) Alpha(:,2)=Alpha(:,2)*bare_qpg(1,1)**2/q_norm(1)**2 + if (l_col_cut.or.l_0D) Alpha(:,2)=Alpha(:,2)*bare_qpg(iq,1)**2/q_norm(iq)**2 ! if (l_pf_fxc) then call TDDFT_PF_coefficient(Xen,Xk,a_xc,b_xc) diff --git a/src/pol_function/OPTICS_select_q_and_G.F b/src/pol_function/OPTICS_select_q_and_G.F index 20a53e0cb6..0ed9b416d6 100644 --- a/src/pol_function/OPTICS_select_q_and_G.F +++ b/src/pol_function/OPTICS_select_q_and_G.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2009 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 ! integer function OPTICS_select_q_and_G(iq,q,X,Q_plus_G_pt,Q_plus_G_sq_modulus) ! diff --git a/src/pol_function/X_AVERAGE_do_it.F b/src/pol_function/X_AVERAGE_do_it.F index 31b76bf04c..ef48b5a686 100644 --- a/src/pol_function/X_AVERAGE_do_it.F +++ b/src/pol_function/X_AVERAGE_do_it.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 DS ! subroutine X_AVERAGE_do_it(what,X_par) ! diff --git a/src/pol_function/X_AVERAGE_setup.F b/src/pol_function/X_AVERAGE_setup.F index c57c15fd7c..e7b4144df1 100644 --- a/src/pol_function/X_AVERAGE_setup.F +++ b/src/pol_function/X_AVERAGE_setup.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! 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 ! subroutine X_AVERAGE_setup(what,i_counter,q0) ! diff --git a/src/pol_function/X_Double_Grid_setup.F b/src/pol_function/X_Double_Grid_setup.F index f97b575017..7d920ee036 100644 --- a/src/pol_function/X_Double_Grid_setup.F +++ b/src/pol_function/X_Double_Grid_setup.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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): DS AM ! subroutine X_Double_Grid_setup(iq,k,k_FGbz,nTrans_percent,Radius) ! diff --git a/src/pol_function/X_GreenF_analytical.F b/src/pol_function/X_GreenF_analytical.F index d88d57437e..e3055924ab 100644 --- a/src/pol_function/X_GreenF_analytical.F +++ b/src/pol_function/X_GreenF_analytical.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 DS ! subroutine X_GreenF_analytical(iq,transitions,Xw,Xen,Xk,GreenF,ordering,space,no_occupations,X_terminator) ! diff --git a/src/pol_function/X_GreenF_convoluted.F b/src/pol_function/X_GreenF_convoluted.F index 247325599f..541d45bfcd 100644 --- a/src/pol_function/X_GreenF_convoluted.F +++ b/src/pol_function/X_GreenF_convoluted.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 DS ! subroutine X_GreenF_convoluted(iq,transitions,Xw,Xen,Xk,GreenF,ordering) ! diff --git a/src/pol_function/X_GreenF_remap.F b/src/pol_function/X_GreenF_remap.F index e1da4cb9c7..a39c2e92af 100644 --- a/src/pol_function/X_GreenF_remap.F +++ b/src/pol_function/X_GreenF_remap.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2009 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 ! subroutine X_GreenF_remap(bands,E,W) ! diff --git a/src/pol_function/X_delta_part.F b/src/pol_function/X_delta_part.F index e4df392c00..675aae8ba4 100644 --- a/src/pol_function/X_delta_part.F +++ b/src/pol_function/X_delta_part.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine X_delta_part(NG,NW,X,Gamp) ! diff --git a/src/pol_function/X_dielectric_matrix.F b/src/pol_function/X_dielectric_matrix.F index b496738801..88509943bf 100644 --- a/src/pol_function/X_dielectric_matrix.F +++ b/src/pol_function/X_dielectric_matrix.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 DS ! integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) ! @@ -99,6 +83,7 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) if (depth>0) sec_mode='=' ! X_dielectric_matrix=-1 + Xw%grid_type="ra" ! if (X%whoami==1) then if (.not.SILENT_MODE) call section(sec_mode,'Dynamical IP Response Function Matrix') @@ -107,7 +92,9 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) if (.not.SILENT_MODE) call section(sec_mode,'Static Dielectric Matrix') Xw%n_freqs =1 X_MEM_n_freqs =1 + ! else if (X%whoami==3) then + ! if (.not.SILENT_MODE) call section(sec_mode,'Dynamical Dielectric Matrix') if (l_gw0) self_detect_E_range=.true. ! @@ -118,15 +105,32 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) if (l_life) X_MEM_n_freqs = QP_n_W_freqs_redux ! else if (X%whoami==4) then + ! if (.not.SILENT_MODE) call section(sec_mode,'Dynamic Dielectric Matrix (PPA)') Xw%n_freqs =2 X_MEM_n_freqs =2 Xw%er=(/epsilon(1._SP),0._SP/) Xw%dr=(/0._SP,X%ppaE/) - X%ordering='R' + X%ordering='R' !DALV: we should use 't' + ! + else if (X%whoami==5) then + ! + if (.not.SILENT_MODE) call section(sec_mode,'Dynamic Dielectric Matrix (MPA)') + ! + if (mod(Xw%n_freqs,2)>0) Xw%n_freqs=Xw%n_freqs+1 + X%mpa_npoles = Xw%n_freqs/2 + X_MEM_n_freqs =2*X%mpa_npoles + X%ordering='t' + Xw%grid_type="mp" + ! endif ! - call X_pre_setup(Xen,Xk,X) + call X_pre_setup(Xen,Xk,X) !DALV: in here the time ordering is changed to 'R' for metals + ! this could be problematic for FF real-axis GW calculations + ! AF: the following fix breaks Lifetime calcs + ! and need to be further analyzed + ! + !if(X%whoami==3) X%ordering='T' !DALV: solved here ! if (l_write_disk_Xo) then if (.not.SILENT_MODE) call warning('On-the-fly extraction of IP Response Function Matrix') @@ -200,9 +204,9 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) 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 !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 @@ -320,12 +324,36 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) 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 + ! +! XXX +write(*,*) "upto before io_RESPONSE" +! XXX + ! 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 diff --git a/src/pol_function/X_drude.F b/src/pol_function/X_drude.F index eb6e9f11c4..b4e67fd4aa 100644 --- a/src/pol_function/X_drude.F +++ b/src/pol_function/X_drude.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM,DS,AG +! Copyright (C) 2006 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. -! -! 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. +! Authors (see AUTHORS file for details): AMDSAG ! subroutine X_Drude(iq,Xen,Xk,Xw,Wd,drude_GreenF) ! @@ -28,19 +12,20 @@ subroutine X_Drude(iq,Xen,Xk,Xw,Wd,drude_GreenF) use com, ONLY:msg use frequency, ONLY:w_samp use electrons, ONLY:levels,spin_occ,n_sp_pol,filled_tresh - use R_lattice, ONLY:bz_samp,q_norm,RIM_W_for_graph + use R_lattice, ONLY:bz_samp,q_norm use X_m, ONLY:use_X_DbGd,l_drude,drude_n_states use parser_m, ONLY:parser + use drivers, ONLY:l_ppa,l_mpa !DALV: needed for the complex sampling in MPA ! implicit none ! - type(levels) ,intent(in) :: Xen + type(levels), intent(in) :: Xen type(bz_samp),intent(in) :: Xk - type(w_samp) ,intent(in) :: Xw + type(w_samp), intent(in) :: Xw ! - integer ,intent(in) :: iq - complex(SP) ,intent(inout):: Wd - complex(SP) ,intent(out) :: drude_GreenF(Xw%n_freqs) + integer, intent(in) :: iq + complex(SP), intent(inout):: Wd + complex(SP), intent(out) :: drude_GreenF(Xw%n_freqs) ! real(SP) :: f_eh,f_occ logical :: Drude_term(4),l_Jellium,l_Classical @@ -72,12 +57,12 @@ subroutine X_Drude(iq,Xen,Xk,Xw,Wd,drude_GreenF) ! ! Drude Contrib. if all of following conditions hold !==================================================== - ! . Non zero Drude Freq. or graphene model + ! . Non zero Drude Freq. ! . Metallic system ! . Metallic occupations ! . Optical response @ q = Gamma ! - Drude_term(1) = ((real(Wd)>0._SP .and. aimag(Wd)>0._SP) .or. (RIM_W_for_graph)) + Drude_term(1) = real(Wd)>0._SP .and. aimag(Wd)>0._SP Drude_term(2) = any( (/Xen%nbf(:n_sp_pol)/=Xen%nbm(:n_sp_pol)/) ) Drude_term(3) = (f_eh>0._SP) Drude_term(4) = (iq==1) @@ -103,29 +88,35 @@ subroutine X_Drude(iq,Xen,Xk,Xw,Wd,drude_GreenF) l_drude=all(Drude_term) if(.not.l_drude) return ! - if(RIM_W_for_graph) then - l_Classical = .False. - l_Jellium = .False. - else - call parser('DrClassic',l_Classical) - l_Jellium=.not.l_Classical - end if + call parser('DrClassic',l_Classical) + l_Jellium=.not.l_Classical if(.not.all(Drude_term)) return ! call msg(' rs','[X/K] Drude nstates ',drude_n_states) call msg(' rs','[X/K] Drude average occ ',f_eh) call msg('nrs','[X/K] Drude energies ',(/real(Wd),aimag(Wd)/)*HA2EV,'[eV]') - if(RIM_W_for_graph) call msg('r', 'Graphene analytical model of intraband transitions') ! do iw=1,Xw%n_freqs - if(RIM_W_for_graph.and.iw==1) drude_GreenF(iw) = Graphene_drude(Wd,q_norm(1)) - if(l_Jellium) drude_GreenF(iw)= Jellium_drude(real(Xw%p(iw)),Wd,q_norm(1)) - if(l_Classical) drude_GreenF(iw)=Classical_drude(real(Xw%p(iw)),Wd,q_norm(1)) + ! + !DALV: generalization for the complex sampling in MPA + ! + if(l_ppa.or.l_mpa) then + ! + if(l_Jellium) drude_GreenF(iw)= Jellium_drude(Xw%p(iw),Wd,q_norm(1)) + if(l_Classical) drude_GreenF(iw)=Classical_drude_T(Xw%p(iw),Wd,q_norm(1)) + ! + else + ! + if(l_Jellium) drude_GreenF(iw)= Jellium_drude(real(Xw%p(iw),SP)+cZERO,Wd,q_norm(1)) + if(l_Classical) drude_GreenF(iw)=Classical_drude(real(Xw%p(iw),SP)+cZERO,Wd,q_norm(1)) + ! + endif + ! enddo ! contains - ! - function Jellium_drude(W,Wd,q0_norm) + ! + function Jellium_drude(W,Wd,q0_norm) ! !See R.D. Mattuck "A guide to Feynmann diagrams in the Many-Body problem", pag. 197. !Jellium Xo propagator with a given plasma frequency. @@ -133,13 +124,13 @@ function Jellium_drude(W,Wd,q0_norm) !Davide: If Drude is used at finite temperature / with fractional occupations ! I would need the retarded propagator ... occupations are not used here ! - ! use pars, ONLY:SP,pi,cI - ! implicit none ! - real(SP) :: q0_norm,W - complex(SP) :: Wd + ! DALV: W is in general complex for the sampling in MPA + ! + real(SP) :: q0_norm + complex(SP) :: Wd,W ! ! Work Space ! @@ -149,8 +140,8 @@ function Jellium_drude(W,Wd,q0_norm) Kf =((3._SP*pi*real(Wd)**2)/4._SP)**(1._SP/3._SP) fac=Kf*q0_norm xi1=W/fac+cI*aimag(Wd) - xi2=conjg(xi1) - rxi=real(xi1) + xi2=W/fac-cI*aimag(Wd) + rxi=abs(xi1) ! if (abs(rxi)<=10._SP) then Jellium_drude=-Kf/(2._SP*pi**2)*( 2._SP + xi1*log((xi1-1._SP)/(xi1)) - xi2*log((xi2+1._SP)/(xi2)) ) @@ -162,42 +153,78 @@ end function Jellium_drude ! ! function Classical_drude(W,Wd,q0_norm) - ! ! use pars, ONLY:SP,pi,cI,cZERO - ! implicit none ! - real(SP) :: q0_norm,W,W_ - complex(SP) :: Wd + ! DALV: W,W_ are in general complex for the sampling in MPA + ! + real(SP) :: q0_norm + complex(SP) :: Wd,W ! ! Work Space ! - complex(SP) :: Classical_drude + complex(SP) :: W_,xi1,Classical_drude + real(SP) :: Kf,rxi,fac ! W_=W - if (abs(real(W_))<=1.E-8) W_=1.E-8 + if (abs(real(W_))<=1.E-8) W_=1.E-8 + CI*aimag(W_) ! - ! eps_D(w)= -w_p^2/(W*(i*g_p-W)) with Wd=(w_p,g_p) - Classical_drude = -real(Wd)**2/(W_*(cI*aimag(Wd)-W_) ) + Kf =((3._SP*pi*real(Wd)**2)/4._SP)**(1._SP/3._SP) + fac=Kf*q0_norm + xi1=W/fac+cI*aimag(Wd) + rxi=abs(W/fac) + ! + if (abs(rxi)<=10._SP) then + ! eps_D(w)= -w_p^2/(W*(i*g_p-W)) with Wd=(w_p,g_p) + Classical_drude =-real(Wd)**2/(W_*(cI*aimag(Wd)-W_) ) + else + ! DALV: Taylor expansion at W_=infinity + Classical_drude =-real(Wd)**2*(1._SP+cI*aimag(Wd)/W_)/(W_**2._SP) + endif ! ! X_D(w)=-q^2/(4pi) eps_D(w) Classical_drude = -Classical_drude* ( q0_norm**2/(4._SP*pi) ) ! - end function Classical_drude - ! - ! - function Graphene_drude(Wd,q0_norm) + end function Classical_drude + ! + ! + function Classical_drude_T(W,Wd,q0_norm) + ! + ! + use pars, ONLY:SP,pi,cI,cZERO + ! + implicit none + ! + real(SP) :: q0_norm !DALV: W,W_ are in general complex for the sampling in MPA + complex(SP) :: Wd,W + ! + ! Work Space ! + complex(SP) :: W_,xi1,Classical_drude_T + ! + W_=W + if (abs(real(W_))<=1.E-8) W_=1.E-8 + CI*aimag(W_) + ! + ! eps_D(w)= -w_p^2/(W*(i*g_p-W)) with Wd=(w_p,g_p) + Classical_drude_T =real(Wd)*(real(Wd)-CI*aimag(Wd))/(W_**2) + ! + ! X_D(w)=-q^2/(4pi) eps_D(w) + Classical_drude_T = -Classical_drude_T* ( q0_norm**2/(4._SP*pi) ) + ! + end function Classical_drude_T + ! + ! + function Graphene_drude(Wd,q0_norm) ! use pars, ONLY:SP,pi use R_lattice, ONLY:idir use D_lattice, ONLY:alat - ! implicit none ! - real(SP) :: lcut,q0_norm + real(SP) :: q0_norm complex(SP) :: Graphene_drude,Wd + real(SP) :: lcut ! !Get graph_v in a.u. ! @@ -208,6 +235,6 @@ function Graphene_drude(Wd,q0_norm) !real(Wd) = 1/(4*vf) Graphene_drude = -real(Wd)*q0_norm/lcut ! - end function Graphene_drude - ! + end function Graphene_drude + ! end subroutine diff --git a/src/pol_function/X_eh_setup.F b/src/pol_function/X_eh_setup.F index 2aad8e3f8e..18f189a993 100644 --- a/src/pol_function/X_eh_setup.F +++ b/src/pol_function/X_eh_setup.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2007 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 ! integer function X_eh_setup(iq,X,Xen,Xk,minmax_ehe) ! diff --git a/src/pol_function/X_half_mat_check.F b/src/pol_function/X_half_mat_check.F index 7dd376e6b4..ffdc2ba157 100644 --- a/src/pol_function/X_half_mat_check.F +++ b/src/pol_function/X_half_mat_check.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 ! subroutine X_half_mat_check(Xen,Xk,Xw) ! diff --git a/src/pol_function/X_irredux.F b/src/pol_function/X_irredux.F index c8b00c2ea1..8d593346b3 100644 --- a/src/pol_function/X_irredux.F +++ b/src/pol_function/X_irredux.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM,DS,AF,FA -! -! 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) 2013 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. -! -! 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): AMDSAFFA ! !> @callgraph !> @callergraph @@ -121,9 +105,9 @@ subroutine X_irredux(iq,what,X_par,Xen,Xk,Xw,X,Dip) ! skip_WF_load= (iq==1.and.X%ng==1) ! - ! Drude term + ! Drude term !DALV: this should be move to point ### for avoiding a shift of the frequency grid in FF real-axis GW calculations !============ - if (iq==1) call X_drude(iq,Xen,Xk,Xw,X%Wd,drude_GreenF) + !if (iq==1) call X_Drude(iq,Xen,Xk,Xw,X%Wd,drude_GreenF) ! ! Dipoles !========= @@ -180,6 +164,9 @@ subroutine X_irredux(iq,what,X_par,Xen,Xk,Xw,X,Dip) ! endif ! + !DALV: ### the call to X_drude should be moved here, after redefining the frequency grid + if (iq==1) call X_Drude(iq,Xen,Xk,Xw,X%Wd,drude_GreenF) + ! #if defined _ELPH ! ! Green Functions must be all mapped to the Xw range so to be easily convoluted @@ -226,12 +213,10 @@ subroutine X_irredux(iq,what,X_par,Xen,Xk,Xw,X,Dip) ! OpenMP setup !============== ! -#if !defined _CUDA - !$omp parallel num_threads(n_out_threads) default(shared), & - !$omp & private(i_cg,Drude_pole,GreenF,i_bg,Xo_res,Xo_scatt,ig_col,& - !$omp & ig1,ig_row_transp,iw,mutexid,& - !$omp & X_rows1_l,X_rows2_l,X_nrows_l,X_cols_transp) -#endif + !DEV_OMP parallel num_threads(n_out_threads) default(shared), & + !DEV_OMP & private(i_cg,Drude_pole,GreenF,i_bg,Xo_res,Xo_scatt,ig_col,& + !DEV_OMP & ig1,ig_row_transp,iw,mutexid,& + !DEV_OMP & X_rows1_l,X_rows2_l,X_nrows_l,X_cols_transp) ! call OPENMP_update(master_thread) ! @@ -259,8 +244,12 @@ subroutine X_irredux(iq,what,X_par,Xen,Xk,Xw,X,Dip) if(.not.(X_par%rows(1)==1.and.X_par%cols(1)==1)) cycle ! call X_irredux_residuals(Xen,Xk,X,Dip,i_cg,iq,DEV_VAR(Xo_res),Xo_scatt) + ! ctmp = DEV_VAR(Xo_res)(1,1) ! + ! DALV: we must guarantee that ctmp is always 1 and that we enter the loop just + ! once to avoid an inconsistency with the Drude frequency given by input + ! X_par%blc(1,1,:)=X_par%blc(1,1,:)+ctmp*drude_GreenF(:) ! if (have_cuda) then @@ -276,9 +265,7 @@ subroutine X_irredux(iq,what,X_par,Xen,Xk,Xw,X,Dip) ! MAIN LOOP !=========== ! -#if !defined _CUDA - !$omp do -#endif +!DEV_OMP do do i_cg = 1,coarse_grid_N ! i_bg=sum(bare_grid_N(1:i_cg-1))+1 @@ -435,9 +422,7 @@ subroutine X_irredux(iq,what,X_par,Xen,Xk,Xw,X,Dip) ! enddo ! -#if !defined _CUDA - !$omp end do -#endif +!DEV_OMP end do ! ! CLEAN !======= @@ -446,9 +431,7 @@ subroutine X_irredux(iq,what,X_par,Xen,Xk,Xw,X,Dip) YAMBO_FREE(rhotw_save_d) call elemental_collision_free(Xo_scatt) ! -#if !defined _CUDA -!$omp end parallel -#endif +!DEV_OMP end parallel ! if (iq==1.and.io_DIP) then call DIP_alloc('DIP_iR') diff --git a/src/pol_function/X_irredux_residuals.F b/src/pol_function/X_irredux_residuals.F index 1a75ecde5b..bd8241aaa6 100644 --- a/src/pol_function/X_irredux_residuals.F +++ b/src/pol_function/X_irredux_residuals.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DS,AM,AF,IM -! -! 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) 2015 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. -! -! 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): DS AM AF IM ! !> @callgraph !> @callergraph @@ -154,11 +138,9 @@ subroutine X_irredux_residuals(Xen,Xk,X,Dip,i_cg,iq,Xo_res,Xo_scatt) ! sop_inv_l=sop_inv(is) ! -#ifdef _CUDA - !$cuf kernel do(1) <<<*,*>>> -#else - !$omp parallel do default(shared), private(ig1,ig2) -#endif + !DEV_CUF kernel do(1) <<<*,*>>> + !DEV_OMP parallel do default(shared), private(ig1,ig2) + ! do ig1=2,X_ng ig2=DEV_VAR(g_rot)(ig1,sop_inv_l) Xo_scatt_rhotw_p(ig1)=DEV_VAR(rhotw_save)(ig2) @@ -203,7 +185,7 @@ subroutine X_irredux_residuals(Xen,Xk,X,Dip,i_cg,iq,Xo_res,Xo_scatt) ! Filling the upper triangular part of the residual here ! !-------------^^^^^--------------------------------------- #ifdef _CUDA - !$cuf kernel do(2) <<<*,*>>> + !DEV_CUF kernel do(2) <<<*,*>>> do ig2=X_cols(1),X_cols(2) do ig1=X_rows(1),X_rows(2) if (ig1 <= ig2) then @@ -213,13 +195,13 @@ subroutine X_irredux_residuals(Xen,Xk,X,Dip,i_cg,iq,Xo_res,Xo_scatt) enddo enddo #else - !$omp parallel do default(shared), private(ig2) + !DEV_OMP parallel do default(shared), private(ig2) do ig2=X_cols(1),X_cols(2) ROWS=(/X_rows(1),min(ig2,X_rows(2))/) call V_plus_alpha_V(ROWS(2)-ROWS(1)+1,Z_eh_occ*Xo_scatt%rhotw(ig2),& & conjg(Xo_scatt%rhotw(ROWS(1):ROWS(2))),Xo_res(ROWS(1):ROWS(2),ig2)) enddo - !$omp end parallel do + ! #endif ! ! add terminator specific corrections @@ -245,11 +227,8 @@ subroutine X_irredux_residuals(Xen,Xk,X,Dip,i_cg,iq,Xo_res,Xo_scatt) ! sop_inv_l=sop_inv(is) ! -#ifdef _CUDA - !$cuf kernel do(1) <<<*,*>>> -#else - !$omp parallel do default(shared), private(ig1,ig2) -#endif + !DEV_CUF kernel do(1) <<<*,*>>> + !DEV_OMP parallel do default(shared), private(ig1,ig2) do ig1=1,X_ng ig2=DEV_VAR(g_rot)(ig1,sop_inv_l) Xo_scatt_rhotw_p(ig1)=DEV_VAR(rhotw_save)(ig2) @@ -260,7 +239,7 @@ subroutine X_irredux_residuals(Xen,Xk,X,Dip,i_cg,iq,Xo_res,Xo_scatt) endif ! #ifdef _CUDA - !$cuf kernel do(2) <<<*,*>>> + !DEV_CUF kernel do(2) <<<*,*>>> do ig2=X_cols(1),X_cols(2) do ig1=ig_start,X_rows(2) if (ig1 > ig2) cycle @@ -268,7 +247,7 @@ subroutine X_irredux_residuals(Xen,Xk,X,Dip,i_cg,iq,Xo_res,Xo_scatt) enddo enddo #else - !$omp parallel do default(shared), private(ig1,ig2) + !DEV_OMP parallel do default(shared), private(ig1,ig2) do ig2=X_cols(1),X_cols(2) do ig1=ig_start,min(ig2,X_rows(2)) Xo_res(ig1,ig2)=Xo_res(ig1,ig2)-Z_eh_occ*Xo_scatt%rhotw(G_m_G(ig2,ig1)) diff --git a/src/pol_function/X_mat_filling.F b/src/pol_function/X_mat_filling.F index 3f43997ad6..8b291667d7 100644 --- a/src/pol_function/X_mat_filling.F +++ b/src/pol_function/X_mat_filling.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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 ! subroutine X_mat_filling(iq_mem,X,Xw,X_MEM_n_freqs,X_MEM_n_tot_freqs,X_mat) ! @@ -54,14 +38,21 @@ subroutine X_mat_filling(iq_mem,X,Xw,X_MEM_n_freqs,X_MEM_n_tot_freqs,X_mat) if ( io_RESPONSE) iw_X_mat=iw if (.not.io_RESPONSE) iw_X_mat=(iq_mem-1)*X_MEM_n_freqs+iw ! + ! XXX + write(*,*) "before zeroing X_mat",iw X_mat(:,:,iw_X_mat)=cZERO ! + write(*,*) "before if PAR_COM_X_WORLD",iw if (PAR_COM_X_WORLD_RL_resolved%CPU_id==0) then + write(*,*) "inside if PAR_COM_X_WORLD",iw X_mat(X_par(iq_mem)%rows(1):X_par(iq_mem)%rows(2),& & X_par(iq_mem)%cols(1):X_par(iq_mem)%cols(2),iw_X_mat)=X_par(iq_mem)%blc(:,:,iw) endif ! - call PP_redux_wait(X_mat(:,:,iw_X_mat),COMM=PAR_COM_X_WORLD%COMM) + write(*,*) "before PP_redux_wait", iw + !call PP_redux_wait(X_mat(:,:,iw_X_mat),COMM=PAR_COM_X_WORLD%COMM) + call PP_redux_wait(X_mat(:,:,iw_X_mat),IN_PLACE=.true.,COMM=PAR_COM_X_WORLD%COMM) + write(*,*) "after PP_redux_wait", iw ! enddo ! diff --git a/src/pol_function/X_pre_setup.F b/src/pol_function/X_pre_setup.F index 9763b030e6..9cb0f55be7 100644 --- a/src/pol_function/X_pre_setup.F +++ b/src/pol_function/X_pre_setup.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine X_pre_setup(Xen,Xk,X) ! diff --git a/src/pol_function/X_redux.F b/src/pol_function/X_redux.F index 1c172a96f9..04f1341e23 100644 --- a/src/pol_function/X_redux.F +++ b/src/pol_function/X_redux.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM (AF) -! -! 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) 2006 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. -! -! 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 (AF ! subroutine X_redux(iq,what,X_par,Xw,X) ! @@ -72,7 +56,7 @@ subroutine X_redux(iq,what,X_par,Xw,X) logical :: compute_on_gpu type(PAR_matrix) :: K_FXC type(PAR_matrix), target :: BUFFER,KERNEL,Xo - complex(SP), pointer DEV_ATTR :: BUFFER_blc_d(:,:,:) + complex(SP), pointer DEV_ATTR :: Xo_blc_d(:,:,:) ! ! Setup ! @@ -118,10 +102,10 @@ subroutine X_redux(iq,what,X_par,Xw,X) ! if (compute_on_gpu) then YAMBO_ALLOC(KERNEL%blc_d,(KERNEL%BLCrows(1):KERNEL%BLCrows(2),KERNEL%BLCcols(1):KERNEL%BLCcols(2),1)) - YAMBO_ALLOC(BUFFER%blc_d,(BUFFER%BLCrows(1):BUFFER%BLCrows(2),BUFFER%BLCcols(1):BUFFER%BLCcols(2),max(PAR_n_freqs,1))) + !AMBO_ALLOC(BUFFER%blc_d,(BUFFER%BLCrows(1):BUFFER%BLCrows(2),BUFFER%BLCcols(1):BUFFER%BLCcols(2),max(PAR_n_freqs,1))) YAMBO_ALLOC(Xo%blc_d,(Xo%BLCrows(1):Xo%BLCrows(2),Xo%BLCcols(1):Xo%BLCcols(2),1)) call dev_memset(KERNEL%blc_d,cZERO) - call dev_memset(BUFFER%blc_d,cZERO) + !call dev_memset(BUFFER%blc_d,cZERO) call dev_memset(Xo%blc_d,cZERO) endif ! @@ -230,24 +214,31 @@ subroutine X_redux(iq,what,X_par,Xw,X) ! ! X(g,gp)=Sum_gpp[KERNEL]^-1_(g,gpp)*Xo(gpp,gp) ! + ! on input: Xo irreducible polarizability + ! on output: Xo is overwritten + ! if (X_use_lin_sys) then ! ! Linear System ! - if (compute_on_gpu) then - call dev_memcpy(BUFFER%blc_d(:,:,BUFFER%I), Xo%blc_d(:,:,1)) - else - BUFFER%blc(:,:,BUFFER%I) = Xo%blc(:,:,1) - endif + !if (compute_on_gpu) then + ! call dev_memcpy(BUFFER%blc_d(:,:,BUFFER%I), Xo%blc_d(:,:,1)) + !else + ! BUFFER%blc(:,:,BUFFER%I) = Xo%blc(:,:,1) + !endif ! - call LINEAR_ALGEBRA_driver(LIN_SYS,M_slk=KERNEL,B_slk=BUFFER) + !call LINEAR_ALGEBRA_driver(LIN_SYS,M_slk=KERNEL,B_slk=BUFFER) + call LINEAR_ALGEBRA_driver(LIN_SYS,M_slk=KERNEL,B_slk=Xo) ! else ! ! Matrix Inversion + Matmul ! + if (compute_on_gpu) call error("[LA] inversion+matmul not available on GPUs") + ! call LINEAR_ALGEBRA_driver(INV,M_slk=KERNEL) call LINEAR_ALGEBRA_driver(MAT_MUL,M_slk=KERNEL,B_slk=Xo,C_slk=BUFFER) + Xo%blc(:,:,1)=BUFFER%blc(:,:,BUFFER%I) ! endif ! @@ -257,28 +248,31 @@ subroutine X_redux(iq,what,X_par,Xw,X) ! if (compute_on_gpu) then ! - BUFFER_blc_d => BUFFER%blc_d + Xo_blc_d => Xo%blc_d ! !$cuf kernel do(2) do ig2=Xo_cols(1),Xo_cols(2) do ig1=Xo_rows(1),Xo_rows(2) - BUFFER_blc_d(ig1,ig2,iw_par)=BUFFER_blc_d(ig1,ig2,iw_par)*4._SP*pi/bare_qpg_d(iq,ig1)/bare_qpg_d(iq,ig2) + Xo_blc_d(ig1,ig2,1)=Xo_blc_d(ig1,ig2,1)*4._SP*pi/bare_qpg_d(iq,ig1)/bare_qpg_d(iq,ig2) enddo enddo ! - call dev_stream_sync(stream_default) - call dev_memcpy_async(BUFFER%blc(:,:,BUFFER%I),BUFFER%blc_d(:,:,BUFFER%I), stream_d2h) + !call dev_stream_sync(stream_default) + !call dev_memcpy_async(BUFFER%blc(:,:,iw_par),Xo%blc_d(:,:,1), stream_d2h) + call dev_memcpy(BUFFER%blc(:,:,iw_par),Xo%blc_d(:,:,1)) ! else ! !$omp parallel do default(shared), private(ig1,ig2), collapse(2) do ig2=Xo%cols(1),Xo%cols(2) do ig1=Xo%rows(1),Xo%rows(2) - BUFFER%blc(ig1,ig2,iw_par)=BUFFER%blc(ig1,ig2,iw_par)*4._SP*pi/bare_qpg(iq,ig1)/bare_qpg(iq,ig2) + Xo%blc(ig1,ig2,1)=Xo%blc(ig1,ig2,1)*4._SP*pi/bare_qpg(iq,ig1)/bare_qpg(iq,ig2) enddo enddo !$omp end parallel do ! + BUFFER%blc(:,:,iw_par)=Xo%blc(:,:,1) + ! endif ! endif @@ -287,7 +281,7 @@ subroutine X_redux(iq,what,X_par,Xw,X) ! enddo ! - call dev_stream_sync(stream_d2h) + !call dev_stream_sync(stream_d2h) ! if (PAR_n_freqs>0) call live_timing() ! diff --git a/src/qp/.objects b/src/qp/.objects index 6592096b38..5c82a88aa6 100644 --- a/src/qp/.objects +++ b/src/qp/.objects @@ -6,7 +6,8 @@ QED_objects = #if defined _QED QED_objects = QED_Radiative_Lifetimes.o QED_Sigma_c.o #endif -objs = QP_driver.o QP_newton.o QP_interpolate_W.o QP_ppa_cohsex.o QP_ppa_EET_terminator.o QP_logicals.o \ +objs = QP_driver.o QP_newton.o QP_mpa.o QP_interpolate_W.o QP_ppa_cohsex.o \ + QP_ppa_EET_terminator.o QP_logicals.o \ QP_secant_driver.o QP_real_axis.o QP_W2Sc.o QP_life_transitions.o QP_secant.o QP_bracket.o \ QP_expand.o QP_descriptions.o QP_report_and_write.o \ QP_Green_Function.o QP_of.o QP_states_simmetrize.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 diff --git a/src/qp/ELPH_project.dep b/src/qp/ELPH_project.dep index 744ccc5c4c..704d5d0f41 100644 --- a/src/qp/ELPH_project.dep +++ b/src/qp/ELPH_project.dep @@ -1,5 +1,6 @@ QP_descriptions.o QP_driver.o + QP_logicals.o QP_newton.o QP_report_and_write.o diff --git a/src/qp/QED_Radiative_Lifetimes.F b/src/qp/QED_Radiative_Lifetimes.F index 431cc75999..aa5c44cebb 100644 --- a/src/qp/QED_Radiative_Lifetimes.F +++ b/src/qp/QED_Radiative_Lifetimes.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! subroutine QED_Radiative_Lifetimes(E,k,q,qp,X,Dip) ! diff --git a/src/qp/QED_Sigma_c.F b/src/qp/QED_Sigma_c.F index 07c10b50c8..1fc2d9876d 100644 --- a/src/qp/QED_Sigma_c.F +++ b/src/qp/QED_Sigma_c.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): PM 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. +! Copyright (C) 2014 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): PM AM ! subroutine QED_Sigma_c(E,k,q,qp) ! diff --git a/src/qp/QED_project.dep b/src/qp/QED_project.dep index 02febc3d30..eeb2f33f7f 100644 --- a/src/qp/QED_project.dep +++ b/src/qp/QED_project.dep @@ -1,3 +1,5 @@ + QED_Radiative_Lifetimes.o + QED_Sigma_c.o QP_descriptions.o QP_driver.o QP_newton.o diff --git a/src/qp/QP_Green_Function.F b/src/qp/QP_Green_Function.F index 67a456ceb7..824a46bea5 100644 --- a/src/qp/QP_Green_Function.F +++ b/src/qp/QP_Green_Function.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2009 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 ! subroutine QP_Green_Function(qp,E,GFdb_read_err) ! diff --git a/src/qp/QP_W2Sc.F b/src/qp/QP_W2Sc.F index e46a431da1..ef05a41b47 100644 --- a/src/qp/QP_W2Sc.F +++ b/src/qp/QP_W2Sc.F @@ -1,29 +1,13 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine QP_W2Sc(iqbz,k,E,Xw,Sc_W) ! - ! Performs the complex Hilber transofrmation corresponding to + ! Performs the complex Hilbert transform corresponding to ! ! \int dw' G(w-w')W(w') ! diff --git a/src/qp/QP_bracket.F b/src/qp/QP_bracket.F index ed20a1dfbc..bdb2cc6ac3 100644 --- a/src/qp/QP_bracket.F +++ b/src/qp/QP_bracket.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! integer function DYSON_bracket(x1,f1,x2,f2) ! diff --git a/src/qp/QP_descriptions.F b/src/qp/QP_descriptions.F index 216689349a..fd337695e4 100644 --- a/src/qp/QP_descriptions.F +++ b/src/qp/QP_descriptions.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine QP_descriptions(qp,X,Xw,Update) ! @@ -28,7 +12,7 @@ subroutine QP_descriptions(qp,X,Xw,Update) use units, ONLY:HA2EV use X_m, ONLY:X_t,use_X_DbGd,OPTICAL_averaged_dirs_string use QP_m, ONLY:QP_t,QP_ng_Sx,QP_n_G_bands,QP_cg_percent,& -& QP_dSc_delta,QP_G_damp,QP_dSc_steps,GWo_iterations,& +& QP_dSc_delta,QP_G_damp,QP_dSc_steps,& & COHSEX_use_empties,QP_Sc_steps,QP_G_er,QP_G_dr,QP_solver,& & use_GreenF_to_eval_QP,GF_is_causal,QP_G_Zoom_treshold,& & GW_terminator_E,l_GW_terminator,GW_terminator_Kind @@ -72,8 +56,6 @@ subroutine QP_descriptions(qp,X,Xw,Update) endif ! if (.not.l_life) then - ! - call IO_desc_add(qp%desc,'i','GW SC iterations',I=(/GWo_iterations/)) ! if (.not.l_cohsex.and.trim(QP_solver)/='g'.and..not.use_GreenF_to_eval_QP) then ! @@ -235,7 +217,7 @@ subroutine QP_descriptions(qp,X,Xw,Update) ! Force all desc components to be checked at the I/O time ! do id=1,qp%desc%n - qp%desc%ops(1,id)="==" + qp%desc%ops(1:qp%desc%size(id),id)="==" qp%desc%check(id)=.TRUE. enddo ! diff --git a/src/qp/QP_driver.F b/src/qp/QP_driver.F index e11e375862..dc869cfcb7 100644 --- a/src/qp/QP_driver.F +++ b/src/qp/QP_driver.F @@ -1,33 +1,18 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine QP_driver(X,Xen,Xk,en,k,q,Xw,Dip) ! use pars, ONLY:SP,pi,cONE,cZERO use units, ONLY:HA2EV - use drivers, ONLY:l_life,l_ppa,l_elel_corr,l_elph_corr,l_cohsex,Finite_Tel,l_elphoton_corr,l_RIM_W + use drivers, ONLY:l_life,l_ppa,l_mpa,l_elel_corr,l_elph_corr,l_cohsex,& +& Finite_Tel,l_elphoton_corr,l_rim_w use electrons, ONLY:levels,n_sp_pol,spin - use R_lattice, ONLY:bz_samp,RIM_W_is_diagonal,RIM_ng,RIM_W_ng,RIM_W_for_graph + use R_lattice, ONLY:bz_samp,RIM_W_is_diagonal,RIM_ng,RIM_W_ng use DIPOLES, ONLY:DIPOLE_t use frequency, ONLY:w_samp use com, ONLY:msg @@ -36,8 +21,8 @@ subroutine QP_driver(X,Xen,Xk,en,k,q,Xw,Dip) & QP_Vnl_xc,QP_n_states,QP_nb,QP_G_zoom_er,QP_G_Zoom_treshold,& & QP_nk,QP_state,QP_dSc_test,QP_reset,use_GreenF_Zoom,l_QP_symmetrize,& & QP_Sc_steps,QP_G_er,QP_G_dr,QP_SET_temperature_pre_factor,& -& GF_is_causal,QP_G_amplitude_integral,l_update_W,use_GreenF_to_eval_QP,& -& l_GW_terminator,QP_G_info,GW_iterations,GWo_iterations +& GF_is_causal,QP_G_amplitude_integral,use_GreenF_to_eval_QP,& +& l_GW_terminator,QP_G_info use parser_m, ONLY:parser #if defined _ELPH use ELPH, ONLY:QP_DW,QP_OMS_Fan @@ -76,10 +61,8 @@ subroutine QP_driver(X,Xen,Xk,en,k,q,Xw,Dip) ! if (l_QP_symmetrize) call warning("Symmetrize states with the same energy: in rare case this symmetrization can introduce errors") ! - call parser('RIM_W',l_RIM_W) call parser('RIM_W_diag',RIM_W_is_diagonal) - call parser('RIM_W_graph',RIM_W_for_graph) - if(l_RIM_W .and. RIM_W_ng == 0) RIM_W_ng = RIM_ng + if(l_rim_w .and. RIM_W_ng == 0) RIM_W_ng = RIM_ng ! ! The non-local (Vnl) and local (Vxc) part of the xc potentials are not always needed ! @@ -99,13 +82,6 @@ subroutine QP_driver(X,Xen,Xk,en,k,q,Xw,Dip) !============== call QP_reset(qp) ! - ! Some checks for the self-consistent GW - ! ======================================= - if (GW_iterations/=0.and.GWo_iterations/=0) then - call error("Only one type of Self-Consistency at a time is possible, evGW or evGWo not both") - endif - if (GW_iterations/=0) l_update_W=.TRUE. - ! ! Setup Temperature pre-factor !============================== call QP_SET_temperature_pre_factor( ) @@ -119,14 +95,6 @@ subroutine QP_driver(X,Xen,Xk,en,k,q,Xw,Dip) call IO_desc_add(qp%desc,kind="s",str='GW solver',S="Newton",check=.TRUE.,ops=(/"=="/)) ! else if (trim(QP_solver)=='s') then - ! - ! When using secant no SC available - ! - if(GW_iterations/=0.or.GWo_iterations/=0) then - GWo_iterations=0 - GW_iterations =0 - call warning("Self-consistent GW not compatible with 'secant solver' turned off") - endif ! call section('*','Dyson equation: non perturbative QP_secant method') ! @@ -153,23 +121,18 @@ subroutine QP_driver(X,Xen,Xk,en,k,q,Xw,Dip) if (l_ppa) then ! call IO_desc_add(qp%desc,kind="s",str='GW approximation',S="PPA",check=.TRUE.,ops=(/"=="/)) - ! call IO_desc_add(qp%desc,kind="r",str='PPA imaginary Energy',R=(/X%ppaE*HA2EV/),check=.TRUE.,ops=(/"=="/),term="ev") ! QP_DB_kind=QP_SE_GoWo_PPA ! - if ( GWo_iterations > 0 ) QP_DB_kind=QP_SE_GWo_PPA - if ( GW_iterations > 0 ) QP_DB_kind=QP_SE_GW_PPA + else if (l_mpa) then ! - else if (l_cohsex) then + call IO_desc_add(qp%desc,kind="s",str='GW approximation',S="MPA",check=.TRUE.,ops=(/"=="/)) + call IO_desc_add(qp%desc,kind="r",str='MPA number of poles',I=(/X%mpa_npoles/),check=.TRUE.,ops=(/"=="/)) ! - ! in COHSEX no SC possible + QP_DB_kind=QP_SE_GoWo_PPA ! - if(GWo_iterations/=0) then - call warning("Self-consistent GWo not compatible with 'secant solver' turned off") - GWo_iterations=0 - endif - if(GW_iterations/=0) call error('Self-consistent COHSEX not implemented yet') + else if (l_cohsex) then ! call IO_desc_add(qp%desc,kind="s",str='GW approximation',S="COHSEX",check=.TRUE.,ops=(/"=="/)) ! @@ -194,9 +157,6 @@ subroutine QP_driver(X,Xen,Xk,en,k,q,Xw,Dip) ! if (l_elphoton_corr) QP_DB_kind=QP_SE_GW_QED ! - if ( GWo_iterations > 0 ) QP_DB_kind=QP_SE_GWo - if ( GW_iterations > 0 ) call error("GW self-consistent not implemented with real-axis ") - ! endif ! ! Basic defs @@ -212,17 +172,6 @@ subroutine QP_driver(X,Xen,Xk,en,k,q,Xw,Dip) qp%nb=QP_nb qp%n_states=QP_n_states ! - ! Check qp-indexes for SC-GW and allocate en%Eo - ! ============================================= - ! - if (GW_iterations+GWo_iterations/=0) then - ! - ! As possible reference for GWo and GW calculations - ! one can consider the manuscript PRB 75, 235102(2007) - ! - call check_qp_states(QP_table,QP_state,qp,en,Xen) - endif - ! ! In lifetimes calculations the X db may be not ! present. So I need to define some variables that ! must be correctly written in the QP%desc(s) @@ -351,11 +300,20 @@ subroutine QP_driver(X,Xen,Xk,en,k,q,Xw,Dip) ! if (trim(QP_solver)=='g') then ! - if (l_elel_corr.and.(.not.l_ppa.and..not.l_cohsex)) call QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,0) + if (l_elel_corr) then + ! + if (.not.l_ppa.and..not.l_mpa.and..not.l_cohsex) call QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,0) + ! + ! GF for ppa and mpa + ! + if ( l_ppa ) call QP_ppa_cohsex(X,Xk,en,k,q,qp,Xw,0) + if ( l_mpa ) call QP_mpa(X,Xk,en,k,q,qp,Xw,0) + ! + endif ! -# if defined _ELPH +#if defined _ELPH ! - if (l_elph_corr) call ELPH_Sigma_c(en,k,q,qp) + if (l_elph_corr) call ELPH_Sigma_c(en,k,q,qp) ! #endif ! @@ -475,7 +433,7 @@ subroutine check_qp_states(QP_table,QP_state,qp,en,Xen) ! ! Check if qp-indexes are continous for SC-GW ! - use QP_m, ONLY:QP_t,l_update_W + use QP_m, ONLY:QP_t use electrons, ONLY:n_sp_pol,levels #include ! @@ -494,17 +452,9 @@ subroutine check_qp_states(QP_table,QP_state,qp,en,Xen) if(any(QP_state(lw_bnd:qp%nb,:).eqv..FALSE.).or.qp%nk/=en%nk) & & call error("Not continous QP-indexes not suppoerted in self-consistent GW") ! - if(l_update_W.and.(Xen%nb/=en%nb.or.Xen%nk/=en%nk)) then - call error("Different number of k-points/bands in G and X not supported in SC-GW") - endif - ! if(.not.allocated(en%Eo)) then YAMBO_ALLOC(en%Eo,(en%nb,en%nk,n_sp_pol)) en%Eo=en%E endif - if(.not.allocated(Xen%Eo).and.l_update_W) then - YAMBO_ALLOC(Xen%Eo,(Xen%nb,Xen%nk,n_sp_pol)) - Xen%Eo=Xen%E - endif ! end subroutine check_qp_states diff --git a/src/qp/QP_expand.F b/src/qp/QP_expand.F index 625886ac5b..27ff9f07c4 100644 --- a/src/qp/QP_expand.F +++ b/src/qp/QP_expand.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine QP_expand(k,qp,qp_expanded) ! diff --git a/src/qp/QP_interpolate_W.F b/src/qp/QP_interpolate_W.F index cfbb415ccf..807854871b 100644 --- a/src/qp/QP_interpolate_W.F +++ b/src/qp/QP_interpolate_W.F @@ -1,38 +1,22 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AG -! -! 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. +! Copyright (C) 2006 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): AG ! -subroutine interpolate_W(X,Xw,q,mode) +subroutine QP_interpolate_W(X,Xw,q,mode) ! use pars, ONLY:SP,pi,zero_dfl,schlen,DP,rZERO 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_W_for_graph,RIM_qpg +& RIM_id_epsm1_reference,RIM_epsm1,RIM_qpg use vec_operate, ONLY:c2a,v_norm use X_m, ONLY:X_ALLOC_elemental,X_mat,X_t use frequency, ONLY:w_samp - use IO_m, ONLY:OP_RD_CL,NONE,RD_CL,OP_RD,RD_CL_IF_END,& -& deliver_IO_error_message,OP_WR_CL,REP,VERIFY + use IO_m, ONLY:OP_RD_CL,NONE,RD_CL,OP_RD,RD_CL_IF_END,OP_WR_CL,& +& deliver_IO_error_message,manage_action,REP,VERIFY use IO_int, ONLY:io_control use stderr, ONLY:intc,STRING_pack,gen_fmt use D_lattice, ONLY:alat,a @@ -53,11 +37,11 @@ subroutine interpolate_W(X,Xw,q,mode) integer :: nn,idm,igr,igc,ig2max,iomega integer :: idx_q(RIM_W_ng,q%nibz,5),idx_G(RIM_W_ng,q%nibz,5),idx_is(RIM_W_ng,q%nibz,5) real(SP) :: dummy(2),anis_factor,em1_anis(3) - real(DP) :: f_func(5),dp_dummy(5) - complex(SP) :: vX_nn(5,q%nibz,RIM_W_ng,RIM_W_ng,2) + complex(DP) :: f_func(5),dp_dummy(5) + complex(DP) :: vX_nn(5,q%nibz,RIM_W_ng,RIM_W_ng,Xw%n_freqs) real(SP) :: v1(3),r_dum(2) real(SP) :: q_grid_b_rlu(3,2),q_grid_b_iku(3,2),q_grid_b_cc(3,2) - integer :: ID, io_err, ng_save,G_max_ibz(q%nibz), G_max + integer :: ID, IO_ACT, io_err, ng_save,G_max_ibz(q%nibz), G_max integer, external :: io_X, io_RIM_W character(schlen) :: ch_dum,fmt_dum,msg_dum(2) ! @@ -101,7 +85,7 @@ subroutine interpolate_W(X,Xw,q,mode) ! !Check if RIM-W has been alreay calculated call io_control(ACTION=OP_RD_CL,COM=REP,MODE=VERIFY,SEC=(/1,2/),ID=ID) - io_err=io_RIM_W(ID,mode) + io_err=io_RIM_W(ID,mode,Xw) ! if (io_err==0) then call timing('RIM-W-coeff',OPR='stop') @@ -138,10 +122,17 @@ subroutine interpolate_W(X,Xw,q,mode) ! G_max=maxval(G_max_ibz) ! - if (G_max > X%ng) call error(' G_max '//trim(intc(G_max))//' for RIM-W is higher than G_max '//trim(intc(X%ng))//' of vX') + if (G_max > X%ng) call error(' G_max '//trim(intc(G_max))//& +& ' for RIM-W is higher than G_max '//trim(intc(X%ng))//' of vX') ! call msg('r', 'G-vectors loaded', maxval(G_max_ibz)) + call msg('r', 'Number of interpolated frequencies', Xw%n_freqs) call msg('r','') + ! + X%ng = G_max_ibz(1) + call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),ID=ID) + io_err=io_X(X,Xw,ID) + ! do iq=1,q%nibz ! ! I/O of X @@ -149,13 +140,8 @@ subroutine interpolate_W(X,Xw,q,mode) !Load only the G needed X%ng = G_max_ibz(iq) ! - if (iq==1) then - call io_control(ACTION=OP_RD,COM=REP, SEC=(/1,2,2*iq+1/),ID=ID) - else if (q%nibz==1) then - call io_control(ACTION=OP_RD_CL,COM=NONE, SEC=(/1,2,3/),ID=ID) - else if (iq > 1) then - call io_control(ACTION=RD_CL_IF_END,COM=NONE,SEC=(/2*iq,2*iq+1/),ID=ID) - endif + IO_ACT=manage_action(RD_CL_IF_END,iq,1,q%nibz) + call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/2*iq,2*iq+1/),ID=ID) ! io_err=io_X(X,Xw,ID) ! @@ -208,7 +194,8 @@ subroutine interpolate_W(X,Xw,q,mode) ! do iq1=1,q%nibz ! - !Evaluate f_func + ! Evaluate f_func nearest neighbour + ! do nn=1,5 ! !Select the index of the reference/n.n. @@ -217,17 +204,21 @@ subroutine interpolate_W(X,Xw,q,mode) ig2 = idx_G(igc,iq1,nn) ! f_func(nn) = real(bare_qpg(iq2,ig1)*bare_qpg(iq2,ig2),kind=DP)/(4._DP*pi)*& -& real(vX_nn(nn,iq1,igr,igc,iomega),kind=DP)/(real(vX_nn(nn,iq1,igr,igc,iomega),kind=DP)+1._DP) +& vX_nn(nn,iq1,igr,igc,iomega)/(vX_nn(nn,iq1,igr,igc,iomega)+1._DP) ! enddo ! ! q == 0 terms must be tratened separately - if (iq1 == 1 .and. igr == 1 .and. igc == 1 .and. (.not. RIM_W_for_graph)) then + if (iq1 == 1 .and. igr == 1 .and. igc == 1) then + ! + call msg("r","Evaluating coefficients q = 0") ! - if(RIM_id_epsm1_reference/=0 .and. iomega==1) then + if (RIM_id_epsm1_reference/=0 .and. iomega==1) then + ! !vX is included in the anis_factor call msg('r','This is the anysotropy case') f_coeff(1,igr,igc,iq1,iomega)=(4._DP*pi)/(bare_qpg(iq1,igr)*bare_qpg(iq1,igc)*(2._DP*pi*alat(idir(1)))**2) + ! else f_coeff(1,igr,igc,iq1,iomega) = vX_nn(1,iq1,igr,igc,iomega)*(4._DP*pi) / & & (bare_qpg(iq1,igr)*bare_qpg(iq1,igc)*(2._DP*pi*alat(idir(1)))**2) @@ -236,7 +227,8 @@ subroutine interpolate_W(X,Xw,q,mode) do nn=2,3 idm = MOD(nn+1,2)+1 ! - if(RIM_id_epsm1_reference/=0 .and. iomega==1) then + if (RIM_id_epsm1_reference/=0 .and. iomega==1) then + ! anis_factor=dot_product(em1_anis,q_grid_b_cc(:,idm)**2) f_coeff(nn,igr,igc,iq1,iomega)=-1._DP/q_grid_b_rlu(idm,idm)*log(f_func(nn)/ & & (f_coeff(1,iq1,igc,iq1,iomega)*anis_factor)) @@ -244,10 +236,12 @@ subroutine interpolate_W(X,Xw,q,mode) f_coeff(nn,igr,igc,iq1,iomega)=-1._DP/q_grid_b_rlu(idm,idm)*log(f_func(nn)/ & & (v_norm(q_grid_b_cc(:,idm))**2*f_coeff(1,iq1,igc,iq1,iomega))) end if - + ! enddo ! - else + else + ! + !call msg("r","Evaluating coefficients q/= 0") ! !Coefficients in rlu dp_dummy(1) = f_func(1) !f0 @@ -256,6 +250,7 @@ subroutine interpolate_W(X,Xw,q,mode) dp_dummy(4) = (f_func(3)-2._DP*f_func(1)+f_func(5))/(2._DP*q_grid_b_rlu(1,1)**2) !f11 dp_dummy(5) = (f_func(2)-2._DP*f_func(1)+f_func(4))/(2._DP*q_grid_b_rlu(2,2)**2) !f22 ! + ! !Coefficients in iku ! f_coeff(1,igr,igc,iq1,iomega) = dp_dummy(1) !f (iku) @@ -264,6 +259,7 @@ subroutine interpolate_W(X,Xw,q,mode) f_coeff(4,igr,igc,iq1,iomega) = dp_dummy(4)+dp_dummy(5)*(a(2,1)/alat(1))**2 !fxx (iku) f_coeff(5,igr,igc,iq1,iomega) = dp_dummy(4)*a(1,2)/alat(2)+dp_dummy(5)*a(2,1)/alat(1) !fxy (iku) f_coeff(6,igr,igc,iq1,iomega) = dp_dummy(5)+dp_dummy(4)*(a(1,2)/alat(2))**2 !fyy (iku) + ! endif ! f_coeff(:,igc,igr,iq1,iomega) = f_coeff(:,igr,igc,iq1,iomega) @@ -272,13 +268,14 @@ subroutine interpolate_W(X,Xw,q,mode) enddo enddo enddo + ! call timing('RIM-W-coeff',OPR='stop') ! !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !Calculation of RIM-W integrals !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ! - call rim('c') + call rim('c',Xw) ! !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !Debugging output @@ -292,11 +289,10 @@ subroutine interpolate_W(X,Xw,q,mode) ! do iq2=iq1,min(iq1+1,q%nibz) ! - !iq=q_norm_i(i2) ch_dum=' < -Wc [Q = '//trim(intc(iq2))//'] >' if (iq1/=iq2) ch_dum=' * < -Wc [Q = '//trim(intc(iq2))//'] >' ! - r_dum(1)= -RIM_W(iq2,1,1)*2._SP*pi + r_dum(1)= -RIM_W(1,iq2,1,1)*2._SP*pi r_dum(2)= -vX_nn(1,iq2,1,1,1)*RIM_qpg(iq2,1,1)*2_SP*pi ! fmt_dum='(a,2('//trim(gen_fmt(r_v=r_dum))//'))' @@ -307,6 +303,27 @@ subroutine interpolate_W(X,Xw,q,mode) if (iq1/=1) call msg(' r',trim(STRING_pack(msg_dum(1),msg_dum(2)))) enddo call msg('r','') + call msg('nr','Comparison between head Wc = W - v averages: < Wc > [au] RIM-W/RIM') + do ig1=1,RIM_W_ng,2 + ! + msg_dum=' ' + ! + do ig2=ig1,min(ig1+1,RIM_W_ng) + ! + ch_dum=' < -Wc [G = '//trim(intc(ig2))//',G`=0] >' + if (ig1/=ig2) ch_dum=' * < -Wc [G = '//trim(intc(ig2))//',G`=0] >' + ! + r_dum(1)= -RIM_W(1,1,ig2,1)*2._SP*pi + r_dum(2)= -vX_nn(1,1,ig2,1,1)*RIM_qpg(1,ig2,1)*2_SP*pi + ! + fmt_dum='(a,2('//trim(gen_fmt(r_v=r_dum))//'))' + write (msg_dum(ig2-ig1+1),trim(fmt_dum)) trim(ch_dum),r_dum + ! + enddo + if (ig1==1) call msg('nr',trim(STRING_pack(msg_dum(1),msg_dum(2)))) + if (ig1/=1) call msg(' r',trim(STRING_pack(msg_dum(1),msg_dum(2)))) + enddo + end if ! !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -314,24 +331,32 @@ subroutine interpolate_W(X,Xw,q,mode) !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ! if (mode == 'PPA') then + ! YAMBO_ALLOC(RIM_W_E,(RIM_W_ng,RIM_W_ng)) RIM_W_E = rZERO ! do ig2=1,RIM_W_ng do ig1=1,RIM_W_ng ! - if(ig1==1.and.ig2==1.and.(.not. RIM_W_for_graph)) then + if(ig1==1.and.ig2==1) then + ! dummy(:) = f_coeff(1,1,1,1,:) if (RIM_id_epsm1_reference/=0) then - dummy(1) = dummy(1)*0.5*(em1_anis(idir(2))+em1_anis(idir(3))) + dummy(1) = dummy(1)*0.5_SP*(em1_anis(idir(2))+em1_anis(idir(3))) end if ! else - dummy(:) = f_coeff(1,ig1,ig2,1,:)+1.E-4*(f_coeff(2,ig1,ig2,1,:)+f_coeff(3,ig1,ig2,1,:)& -& +1.E-4*(f_coeff(4,ig1,ig2,1,:)+f_coeff(6,ig1,ig2,1,:)& - +2._SP*f_coeff(5,ig1,ig2,1,:))) + ! + ! AF: a tentative implementation with a mixing constant of 1.E-5 + ! instead of 1.E-4 as below has been proposed, but led to + ! numerical differencies in the results. To be investigated + ! + dummy(:) = f_coeff(1,ig1,ig2,1,:)+1.E-4*(f_coeff(2,ig1,ig2,1,:)+f_coeff(3,ig1,ig2,1,:)& +& +1.E-4*(f_coeff(4,ig1,ig2,1,:)+f_coeff(6,ig1,ig2,1,:)& + +2._SP*f_coeff(5,ig1,ig2,1,:))) dummy(:) = dummy(:)*4._SP*pi/(bare_qpg(1,ig1)*bare_qpg(1,ig2)) - dummy(:) = dummy/(1-dummy) + dummy(:) = dummy/(1._SP-dummy) + ! endif ! if (dummy(1)/dummy(2)<=1._SP) then @@ -349,7 +374,7 @@ subroutine interpolate_W(X,Xw,q,mode) ! if (master_cpu) then call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1,2/),ID=ID) - io_err=io_RIM_W(ID,mode) + io_err=io_RIM_W(ID,mode,Xw) endif ! if (have_cuda) then diff --git a/src/qp/QP_life_transitions.F b/src/qp/QP_life_transitions.F index 7e0c58a4ca..4d2e40b759 100644 --- a/src/qp/QP_life_transitions.F +++ b/src/qp/QP_life_transitions.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! integer function QP_life_transitions(iqibz_in,E,k,q,X_life_W) ! diff --git a/src/qp/QP_load_SC_xc.F b/src/qp/QP_load_SC_xc.F index f5f61feaf9..88a321bc75 100644 --- a/src/qp/QP_load_SC_xc.F +++ b/src/qp/QP_load_SC_xc.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM DV -! -! 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. +! Copyright (C) 2009 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 DV ! subroutine QP_load_SC_xc() ! diff --git a/src/qp/QP_logicals.F b/src/qp/QP_logicals.F index b13859b8ed..aa26d991a8 100644 --- a/src/qp/QP_logicals.F +++ b/src/qp/QP_logicals.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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 ! subroutine QP_logicals( ) ! @@ -30,10 +14,10 @@ subroutine QP_logicals( ) & use_GreenF_to_eval_QP,l_extended_output,use_GreenF_Zoom,QP_G_Zoom_treshold,& & GW_terminator_Kind,l_GW_terminator,l_QP_eval_GF,l_QP_eval_Z,QP_solver use stderr, ONLY:STRING_same -#if defined _PHEL +#if defined _ELPH || defined _PHEL use PHEL, ONLY:PH_Self_Energy_mode -#endif use ELPH, ONLY:l_GKKP_hosts_bare_dV +#endif ! implicit none ! @@ -63,11 +47,10 @@ subroutine QP_logicals( ) if (l_life) QP_solver="none" ! ! Ph-El... -#if defined _PHEL ! +#if defined _ELPH || defined _PHEL ! ... Kind if ( index(PH_Self_Energy_mode,"bare")>0 ) l_GKKP_hosts_bare_dV = .true. - ! #endif ! end subroutine diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F new file mode 100644 index 0000000000..aed2cc6fa0 --- /dev/null +++ b/src/qp/QP_mpa.F @@ -0,0 +1,548 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2006 The Yambo Team +! +! Authors (see AUTHORS file for details): DALV AF AM +! +subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) + ! + ! Multipole approximation to the Correlation Self-Energy + ! + use pars, ONLY:SP,DP,pi,schlen,cZERO,cI + use units, ONLY:HA2EV + use stderr, ONLY:intc + use frequency, ONLY:w_samp,W_reset + use electrons, ONLY:levels,spin_occ,spin,n_met_bands,n_sp_pol + use LIVE_t, ONLY:live_timing + use com, ONLY:msg + use drivers, ONLY:l_sc_run,l_RIM_W + use parallel_int, ONLY:PP_wait,PP_redux_wait,PARALLEL_global_indexes,PARALLEL_WF_index,& +& PARALLEL_WF_distribute + use parser_m, ONLY:parser + use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_IND_G_b,PAR_IND_QP,PAR_COM_Q_A2A,& +& PAR_IND_Q_ibz,PAR_IND_Q_ibz_ID,PAR_IND_QP_ID,PAR_COM_RL_INDEX,& +& PAR_Q_ibz_index,n_WF_bands_to_load,HEAD_QP_cpu,master_cpu,myid + use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc + use functions, ONLY:bose_f + use IO_int, ONLY:io_control,IO_and_Messaging_switch + use IO_m, ONLY:manage_action,OP_RD_CL,OP_WR_CL,OP_APP_CL,REP,VERIFY,NONE,RD_CL,OP_RD,RD_CL_IF_END,& + & io_RESPONSE,io_MULTIPOLE,deliver_IO_error_message + use QP_m, ONLY:QP_t,QP_n_G_bands,QP_Sc_steps,QP_dSc_steps,QP_solver,& +& QP_Sc,QP_n_states,QP_G_damp,QP_table,QP_dSc_delta + use X_m, ONLY:X_ALLOC_elemental,X_mat,X_t + use wave_func, ONLY:WF + use R_lattice, ONLY:qindx_S,bz_samp,G_m_G,RIM_W_ng,RIM_W + use D_lattice, ONLY:nsym,i_time_rev,i_space_inv,mag_syms + use wrapper, ONLY:M_by_V + use interfaces, ONLY:QP_state_print,WF_load,WF_free + use matrix_operate,ONLY:mat_transpose + use timing_m, ONLY:timing + use mpa_m, ONLY:mpa_RE_solver,err_func_X,MPA_E_mat,MPA_R_mat,MPA_freqs,& +& MPA_alloc,MPA_free,MPA_E_mat_d,MPA_R_mat_d + use drivers, ONLY:Finite_Tel + use D_lattice, ONLY:Bose_Temp + use functions, ONLY:bose_E_cut + use deviceXlib_m, ONLY:dev_memcpy + use cuda_m, ONLY:have_cuda + ! +#include +#include + ! + 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,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,& +& cond_g, cond_b + ! + 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 :: X_mpa_npoles,X_ng + logical :: X_is_TR_rotated,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), pointer DEV_ATTR :: isc_rhotw_p(:) + complex(SP), pointer DEV_ATTR :: iscp_rhotw_p(:) + complex(SP), pointer DEV_ATTR :: isc_gamp_p(:,:) + complex(SP), pointer DEV_ATTR :: MPA_R_mat_p(:,:,:) + complex(SP), pointer DEV_ATTR :: MPA_E_mat_p(:,:,:) + + ! + ! MPA variables + ! + integer :: i_np,ID2 + logical :: MPred + real(SP) :: bose_PPA_E,MPred_rate,PPcond_rate,PPcond_Qrate,MP_err,MP_Qerr,cond_num(2),cond_numQ(2) + complex(SP), allocatable :: MPA_Xo(:) + character(len=99):: str + ! + integer, external::io_X,io_MPA,QP_state_extract + + ! + ! Reset & checks + ! + call timing('GW(mpa)',OPR='start') + call timing('GW(mpa)_init',OPR='start') + ! + call elemental_collision_free(isc) + call elemental_collision_free(iscp) + i_qp_to_start=1 + 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 + 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 + enddo + ! + else if (trim(QP_solver)=='g') then + ! + 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 + call FREQUENCIES_Green_Function(i_qp,Sc_W(i_qp),E%E,.FALSE.) + ! + if(Sc_W(i_qp)%grid_type=="ra") then + Sc_W(i_qp)%p=real(Sc_W(i_qp)%p,SP) + else + QP_G_damp=0._SP + endif + enddo + ! + endif + ! + ! Section + ! + SECTION_name='' + if (.not.l_sc_run) then + SECTION_name='G'//trim(intc(GW_iter)) + SECTION_name=trim(SECTION_name)//'W0 (W MPA)' + endif + ! + if (GW_iter==0) call section('+',trim(SECTION_name)) + if (GW_iter> 0) call section('=',trim(SECTION_name)) + ! + if (GW_iter==0) then + call msg('r', '[ GW ] Bands range :',QP_n_G_bands) + call msg('r', '[GW/MPA] G damping [ev]:',QP_G_damp*HA2EV) + call msg('r','') + ch=trim(SECTION_name) + ! + call QP_state_print( ) + ! + endif + ! + call k_expand(k) + ! + ! WF distributed & load + !======================= + ! + if ( .not.l_sc_run ) call PARALLEL_global_indexes(E,k,q,"Self_Energy") + ! + ! 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 + 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 + ! + call WF_load(WF,isc%ngrho,maxval(qindx_S(:,:,2)),(/1,n_WF_bands_to_load/),(/1,k%nibz/),title=trim(ch)) + ! + ! Elemental Collisions + !====================== + isc%iqref=0 + call elemental_collision_alloc(isc,NG=isc%ngrho,GAMP_NG=(/X%ng,X%ng/),TITLE="GW") + call elemental_collision_alloc(iscp,NG=isc%ngrho,TITLE="GW") + ! + isc_gamp_p => DEV_VAR(isc%gamp) + isc_rhotw_p => DEV_VAR(isc%rhotw) + iscp_rhotw_p => DEV_VAR(iscp%rhotw) + ! + X_mpa_npoles=X%mpa_npoles + X_ng=X%ng + ! + ! + ! MPA dynamic X DB I/O + ! + 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.and.io_RESPONSE) call error('Incomplete and/or broken MPA/Static diel. fun. database') + ! + ! Test the spatial Inversion + ! + call WF_spatial_inversion(E,Xk) + ! + ! ALLOCATION + !------------ + ! + if (io_RESPONSE) call X_ALLOC_elemental('X',(/X%ng,X%ng,2*X%mpa_npoles/)) + YAMBO_ALLOC(W_,(QP_dSc_steps)) + YAMBO_ALLOC(dc,(QP_dSc_steps)) + ! + ! MPA workspace + ! + call MPA_alloc((/X%ng,X%ng,X%mpa_npoles,2*X%mpa_npoles/)) + ! + ! AF: the following line needs to be moved elsewhere + call parser('mpERdb',io_MULTIPOLE) + ! + call PP_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) + call live_timing(trim(ch),timing_steps) + ! + call msg('r',' MPA interpolation solver: ',Xw%mpa_solver) + ! + if (io_RESPONSE) then + call io_control(ACTION=OP_RD,COM=NONE,SEC=(/1/),ID=ID) + io_err=io_X(X,Xw,ID) + endif + ! + if(io_MULTIPOLE) then + call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1/),ID=ID2) + io_err=io_MPA(X,Xw,ID2) + call IO_and_Messaging_switch("SAVE") + call IO_and_Messaging_switch("+io_out",CONDITION=PAR_COM_Q_A2A%CPU_id==0) + endif + ! + call PP_wait() + ! + call timing('GW(mpa)_init',OPR='stop') + ! + Q_loop: do iqbz=iq_to_start,q%nbz + ! + if (.not.PAR_IND_Q_ibz%element_1D(q%sstar(iqbz,1))) cycle + ! + isc%qs(2:)=(/q%sstar(iqbz,1),q%sstar(iqbz,2)/) + iqibz=isc%qs(2) + iqs =isc%qs(3) + ! + if (iqibz/=isc%iqref) then + ! + iq_mem=PAR_Q_ibz_index(iqibz) + X_range=(/1,Xw%n_freqs/) + if (.not.io_RESPONSE) X_range=(/Xw%n_freqs*(iq_mem-1)+1,iq_mem*Xw%n_freqs/) + ! + call DEV_SUB(scatter_Gamp)(isc,'c') + if (have_cuda) call dev_memcpy(isc%gamp,isc%gamp_d) + ! + ! I/O + ! + if (io_RESPONSE) then + ! + IO_ACT=manage_action(RD_CL_IF_END,iqibz,iq_to_start,q%nibz,PAR_INDEX=PAR_IND_Q_ibz) + 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,'MPA/Xm',STOP_it=.TRUE.) + ! + ! Sampling the frequency domain + ! + MPA_freqs=Xw%p + ! + endif + ! + ! Poles and Residues + ! + call timing('GW(mpa)_poles',OPR='start') + ! + MPred_rate=0._SP + PPcond_Qrate=0._SP + MP_Qerr=0._SP + cond_numQ(:)=0._SP + ! + !$omp parallel default(shared),private(ig1,ig2,MPred,PPcond_rate,MP_err,cond_num,i_np,MPA_Xo), & + !$omp & reduction(+:MPred_rate,PPcond_Qrate,MP_Qerr,cond_numQ) + ! + YAMBO_ALLOC(MPA_Xo,(Xw%n_freqs)) + ! + !$omp do collapse(2) + do ig2=1,X%ng + do ig1=1,X%ng + ! + l_RIM_W_g=(l_RIM_W.and.ig1<=RIM_W_ng.and.ig2<=RIM_W_ng) + if(l_RIM_W_g) then + MPA_Xo(1:Xw%n_freqs)=RIM_W(1:Xw%n_freqs,iqibz,ig1,ig2)/2._SP + else + !DALV: the multiplication by isc%gamp(ig1,ig2) is performed later + MPA_Xo(1:Xw%n_freqs)=X_mat(ig1,ig2,1:Xw%n_freqs) + endif + MPred=.false. + PPcond_rate=0._SP + MP_err=0._SP + cond_num(:)=0._SP + ! + call mpa_RE_solver(X%mpa_npoles,MPA_freqs,MPA_Xo,MPA_R_mat(ig1,ig2,:),MPA_E_mat(ig1,ig2,:),& +& Xw%mpa_solver,MPred,PPcond_rate,MP_err,cond_num) + if(MPred) MPred_rate=MPred_rate+1._SP + PPcond_Qrate=PPcond_Qrate+PPcond_rate + MP_Qerr=MP_Qerr+MP_err + cond_numQ(:)=cond_numQ(:)+cond_num(:) + ! + enddo + enddo + !$omp end do + ! + YAMBO_FREE(MPA_Xo) + ! + !$omp end parallel + ! + X_is_TR_rotated=.false. + ! + MPred_rate=X%mpa_npoles-MPred_rate/X%ng**2 + PPcond_Qrate=PPcond_Qrate/X%ng**2 + MP_Qerr=MP_Qerr/X%ng**2 + cond_numQ(:)=cond_numQ(:)/X%ng**2 + ! + call timing('GW(mpa)_poles',OPR='stop') + call timing('GW(mpa)_poles_io',OPR='start') + ! + ! I/O MPA + ! + if (io_MULTIPOLE) then + ! +! #if defined _PAR_IO +! call io_control(ACTION=OP_APP_CL,COM=REP,SEC=(/2*iqibz,2*iqibz+1/),ID=ID2, & +! & COMM=PAR_COM_RL_INDEX,DO_IT=PAR_COM_RL_A2A%CPU_id==0 ) +! #else +! call io_control(ACTION=OP_APP_CL,COM=REP,SEC=(/2*iqibz,2*iqibz+1/),ID=ID2, & +! & COMM=PAR_COM_NULL,DO_IT=PAR_COM_X_WORLD%CPU_id==0 ) +! #endif + call io_control(ACTION=OP_APP_CL,COM=REP,SEC=(/2*iqibz,2*iqibz+1/),ID=ID2) + io_err=io_MPA(X,Xw,ID2) + call msg('r',' :: PP cond fix/tot ',PPcond_Qrate) + call msg('r',' :: Mean np reduction ',MPred_rate) + call msg('r',' :: Mean Xm rel dev ',MP_Qerr) + if(Xw%mpa_solver=='LA') call msg('r',' :: Condition numbers ',cond_numQ) + ! + endif + ! + call timing('GW(mpa)_poles_io',OPR='stop') + ! + endif + ! + ! This additional rotation of the PP residuals arised from the particular + ! case when TR is present but not the spatial inversion. + ! In this case, indeed, + ! + ! X(-q,G,G') = X(q,-G',-G) + ! + ! While the -1 is introduced in the collisions the reflection of the + ! matrix must be done here. + ! + if (iqs>nsym/(i_time_rev+1) .and. (i_space_inv==0.or.mag_syms) .and..not.X_is_TR_rotated) then + ! + ! Note (AF) that $omp directives are inside mat_transpose + ! + do i_np=1,X%mpa_npoles + call mat_transpose(MPA_E_mat(:,:,i_np)) + call mat_transpose(MPA_R_mat(:,:,i_np)) + enddo + ! + X_is_TR_rotated=.true. + endif + ! + if (have_cuda) then + call dev_memcpy(MPA_E_mat_d,MPA_E_mat) + call dev_memcpy(MPA_R_mat_d,MPA_R_mat) + endif + ! + MPA_E_mat_p=>DEV_VAR(MPA_E_mat) + MPA_R_mat_p=>DEV_VAR(MPA_R_mat) + ! + call timing('GW(mpa)_qp_loop',OPR='start') + ! + QP_loop: do i_qp=i_qp_to_start,QP_n_states + ! + if (.not.PAR_IND_QP%element_1D(i_qp)) cycle + ! + ! i_qp must start from i_qp_to_start only during the first loop + ! of the restart. Then it must be set to 1. + ! + if (i_qp==QP_n_states) i_qp_to_start=1 + ! + ! + 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) + ! + iscp%is=(/QP_table(i_qp,2),QP_table(i_qp,3),1,spin(QP_table(i_qp,:))/) + 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 ib=QP_n_G_bands(1),QP_n_G_bands(2) + ! + if (.not.PAR_IND_G_b%element_1D(ib)) cycle + ! + if (q%sstar(iqbz,2)==1) call live_timing(steps=1) + ! + isc%os(1)=ib + ! + call DEV_SUB(scatter_Bamp)(isc) + iscp%os=isc%os + ! + if (any(isc%is/=iscp%is)) then + call scatter_Bamp(iscp) + else + call dev_memcpy(iscp_rhotw_p, isc_rhotw_p) + endif + ! + dc=cZERO + ! + 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)) + ! + do i_w=1,QP_dSc_steps + ! + dp_dummy_r = 0.0_DP + dp_dummy_i = 0.0_DP + dp_dummy = 0.0_DP + ! + W_1=W_(1) + W_i=W_(i_w) + ! + !DEV_OMP parallel do default(shared), private(i_np,ig1,ig2,bose_PPA_E,ctmp), & + !DEV_OMP & reduction(+:dp_dummy), collapse(3) + ! + !DEV_CUF kernel do(3) + ! + do i_np=1,X_mpa_npoles + do ig2=1,X_ng + do ig1=1,X_ng + ! + ! DALV: inline bose_f function + bose_PPA_E=0._SP + ! + if (real(MPA_E_mat_p(ig1,ig2,i_np),SP)<0._SP) bose_PPA_E=-spin_occ + if (Finite_Tel) then + if (real(MPA_E_mat_p(ig1,ig2,i_np),SP)>epsilon(1._SP)) then + if (real(MPA_E_mat_p(ig1,ig2,i_np),SP)<=bose_E_cut*Bose_Temp) then + bose_PPA_E=spin_occ*Bose_Temp/real(MPA_E_mat_p(ig1,ig2,i_np),SP) + endif + if (real(MPA_E_mat_p(ig1,ig2,i_np),SP)> bose_E_cut*Bose_Temp) then + bose_PPA_E=spin_occ/(exp(real(MPA_E_mat_p(ig1,ig2,i_np),SP)/Bose_Temp)-1._SP) + endif + else + bose_PPA_E=spin_occ*Bose_Temp/epsilon(1._SP) + endif + endif + ! + l_RIM_W_g=(l_RIM_W.and.ig1<=RIM_W_ng.and.ig2<=RIM_W_ng) + ! + if (l_RIM_W_g) then + ! + ctmp = -4._DP/spin_occ*pi*isc_rhotw_p(ig1)*conjg(iscp_rhotw_p(ig2)) *& +& (sign(1._SP,aimag(MPA_E_mat_p(ig1,ig2,i_np))) *MPA_R_mat_p(ig1,ig2,i_np))*& +& ( (spin_occ-f_kmq+bose_PPA_E)/(W_1-E_kmq & +& +sign(1._SP,aimag(MPA_E_mat_p(ig1,ig2,i_np)))*MPA_E_mat_p(ig1,ig2,i_np))+& +& (f_kmq+bose_PPA_E)/(conjg(W_1)-E_kmq & +& -sign(1._SP,aimag(MPA_E_mat_p(ig1,ig2,i_np)))*MPA_E_mat_p(ig1,ig2,i_np)) ) + ! + else + ! + ! DALV: the factor isc%gamp(ig1,ig2) is included here + ctmp = -4._DP/spin_occ*pi*isc_rhotw_p(ig1)*conjg(iscp_rhotw_p(ig2)) *isc_gamp_p(ig1,ig2) *& +& (sign(1._SP,aimag(MPA_E_mat_p(ig1,ig2,i_np))) *MPA_R_mat_p(ig1,ig2,i_np))*& +& ( (spin_occ-f_kmq+bose_PPA_E)/(W_i-E_kmq & +& +sign(1._SP,aimag(MPA_E_mat_p(ig1,ig2,i_np)))*MPA_E_mat_p(ig1,ig2,i_np))+& +& (f_kmq+bose_PPA_E)/(conjg(W_i)-E_kmq & +& -sign(1._SP,aimag(MPA_E_mat_p(ig1,ig2,i_np)))*MPA_E_mat_p(ig1,ig2,i_np)) ) + ! + endif + ! +#ifdef _CUDA + dp_dummy_r=dp_dummy_r+real(ctmp,DP) + dp_dummy_i=dp_dummy_i+imag(ctmp) +#else + dp_dummy=dp_dummy+ctmp +#endif + ! + enddo + enddo + enddo + ! + !DEV_OMP end parallel do + ! + if (have_cuda) dp_dummy=cmplx(dp_dummy_r,dp_dummy_i,kind=DP) + ! + dc(i_w) = cmplx(dp_dummy,KIND=SP) + ! + enddo + ! + QP_Sc(i_qp,:QP_dSc_steps)=QP_Sc(i_qp,:QP_dSc_steps)+dc(:QP_dSc_steps) + ! + ! + enddo ! loop on scattering states + ! + enddo QP_loop + ! + call timing('GW(mpa)_qp_loop',OPR='stop') + ! + enddo Q_loop + ! + if(io_MULTIPOLE) call IO_and_Messaging_switch("RESTORE") + ! + call live_timing() + ! + ! CLEAN + ! + YAMBO_FREE(dc) + YAMBO_FREE(W_) + call X_ALLOC_elemental('X') + call MPA_free() + ! + call timing('GW(mpa)',OPR='stop') + ! + if (.not.l_sc_run) call WF_free(WF) + ! + call elemental_collision_free(isc) + call elemental_collision_free(iscp) + ! + ! ALL 2 ALL of QP_Sc + ! + call timing('GW(REDUX)',OPR='start') + call PP_redux_wait(QP_Sc) + call timing('GW(REDUX)',OPR='stop') + ! +end subroutine QP_mpa diff --git a/src/qp/QP_newton.F b/src/qp/QP_newton.F index 5071a8ccbc..cb80c49db9 100644 --- a/src/qp/QP_newton.F +++ b/src/qp/QP_newton.F @@ -1,37 +1,23 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. +!@brief Newton solver for the quasi-particle equation ! subroutine QP_newton(X,Xen,Xk,en,k,q,qp,Xw,Dip) ! use pars, ONLY:SP,cZERO,schlen use units, ONLY:HA2EV - use drivers, ONLY:l_ppa,l_elel_corr,l_cohsex,l_RIM_W + use drivers, ONLY:l_ppa,l_mpa,l_elel_corr,l_cohsex,l_rim_w use com, ONLY:msg use DIPOLES, ONLY:DIPOLE_t use X_m, ONLY:X_t,current_iq,l_recalculate_X - use QP_m, ONLY:QP_t,QP_dSc_steps,QP_Vnl_xc,QP_Vxc,QP_Sc,l_update_W,QP_table,& -& QP_n_states,QP_dSc,QP_dSc_delta,GW_iterations,report_Sc,& -& GWo_SC_done,GWo_iterations,SC_E_threshold,On_Mass_Shell_approx + use QP_m, ONLY:QP_t,QP_dSc_steps,QP_Vnl_xc,QP_Vxc,QP_Sc,QP_table,& +& QP_n_states,QP_dSc,QP_dSc_delta,report_Sc,& +& On_Mass_Shell_approx use frequency, ONLY:w_samp use electrons, ONLY:levels,n_bands,spin use R_lattice, ONLY:bz_samp @@ -54,12 +40,9 @@ subroutine QP_newton(X,Xen,Xk,en,k,q,qp,Xw,Dip) ! ! Work Space ! - integer :: i1,i2,iter,SC_iter,SC_iterations,io_X_err - integer :: ik,lowest_bnd,highest_bnd,is,ib - real(SP) :: SC_corr_prev,SC_corr_now + integer :: i1,i2,iter + integer :: ik,is,ib complex(SP) :: Z(QP_dSc_steps-1),Eqp(QP_dSc_steps-1) - integer, external :: X_dielectric_matrix - character(schlen) :: FILE_name ! ! Dyson equation: Newton solver ! @@ -70,184 +53,107 @@ subroutine QP_newton(X,Xen,Xk,en,k,q,qp,Xw,Dip) ! endif ! - call msg('rn','[Newton] SC iterations ',GWo_iterations) + ! Self-consisnte GW or GWo can be performed using external scripts + ! see the wiki + ! https://www.yambo-code.eu/wiki/index.php/Self-consistent_GW_on_eigenvalues_only + ! in this subroutine iter is always 0 ! iter=0 - SC_corr_prev=1._SP - ! - SC_iterations=0 - if(GWo_iterations/=0) SC_iterations=GWo_iterations - if(GW_iterations /=0) SC_iterations=GW_iterations ! - do while((iter<=SC_iterations.or.SC_iterations<0).and..not.GWo_SC_done) - ! - if (l_elel_corr) then - if (l_ppa.or.l_cohsex) then - ! - if (l_RIM_W) call interpolate_W(X,Xw,q,'PPA') - call QP_ppa_cohsex(X,Xk,en,k,q,qp,Xw,iter) - ! - else - ! - call QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,iter) - ! - endif - else - QP_Sc=cZERO - endif + if (l_elel_corr) then ! -# if defined _ELPH + ! AF,DALV: use of RIM_W implemented for PPA and MPA ! - if (l_elph_corr) call ELPH_Sigma_c(en,k,q,qp) - ! -#endif - ! -# if defined _QED - ! - if (l_elphoton_corr) then + if (l_ppa) then + ! + if (l_rim_w) call QP_interpolate_W(X,Xw,q,'PPA') + call QP_ppa_cohsex(X,Xk,en,k,q,qp,Xw,iter) ! - QP_dSc=cZERO + else if (l_mpa) then ! - call QED_Sigma_c(en,k,q,qp) + if (l_RIM_W) call QP_interpolate_W(X,Xw,q,'MPA') + call QP_mpa(X,Xk,en,k,q,qp,Xw,iter) + ! + else if (l_cohsex) then + ! + call QP_ppa_cohsex(X,Xk,en,k,q,qp,Xw,iter) + ! + else + ! + call QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,iter) ! endif + else + QP_Sc=cZERO + endif + ! +# if defined _ELPH + ! + if (l_elph_corr) call ELPH_Sigma_c(en,k,q,qp) + ! +#endif + ! +# if defined _QED + ! + if (l_elphoton_corr) then + ! + QP_dSc=cZERO ! + call QED_Sigma_c(en,k,q,qp) + ! + endif + ! #endif + ! + do i1=1,QP_n_states ! - do i1=1,QP_n_states - ! - if(.not.l_cohsex) then - ! + if(.not.l_cohsex) then + ! # if defined _QED + ! + ! In the e-gamma case the derivative is calculated analitically + ! + if (.not.l_elphoton_corr) then +#endif ! - ! In the e-gamma case the derivative is calculated analitically + QP_dSc(i1,1)=cZERO ! - if (.not.l_elphoton_corr) then -#endif - ! - QP_dSc(i1,1)=cZERO - ! - if (.not.On_Mass_Shell_approx) then - do i2=1,QP_dSc_steps-1 - QP_dSc(i1,i2)=(QP_Sc(i1,i2+1)-QP_Sc(i1,i2))/QP_dSc_delta - enddo - endif - ! -# if defined _QED + if (.not.On_Mass_Shell_approx) then + do i2=1,QP_dSc_steps-1 + QP_dSc(i1,i2)=(QP_Sc(i1,i2+1)-QP_Sc(i1,i2))/QP_dSc_delta + enddo endif -#endif ! - do i2=1,QP_dSc_steps-1 - ! - Z(i2)=1._SP/(1._SP-QP_dSc(i1,i2)) - ! - Eqp(i2)=qp%E(i1)+Z(i2)*QP_Sc(i1,1) - ! - if (l_elel_corr.and.allocated(QP_Vnl_xc)) Eqp(i2)=Eqp(i2)+Z(i2)*QP_Vnl_xc(i1) - if (l_elel_corr.and.allocated(QP_Vxc) ) Eqp(i2)=Eqp(i2)-Z(i2)*QP_Vxc(i1) - ! - enddo - ! - qp%E(i1)=Eqp(1)+Z(1)*(qp%E_bare(i1)-qp%E(i1)) ! See Eq.3 of PRB 75, 235102(2007) - qp%Z(i1)=Z(1) +# if defined _QED + endif +#endif + ! + do i2=1,QP_dSc_steps-1 ! - else + Z(i2)=1._SP/(1._SP-QP_dSc(i1,i2)) ! - ! COHSEX: no energy dependence + Eqp(i2)=qp%E(i1)+Z(i2)*QP_Sc(i1,1) ! - qp%E(i1)=qp%E_bare(i1)+QP_Sc(i1,1) - if (allocated(QP_Vnl_xc)) qp%E(i1)=qp%E(i1)+QP_Vnl_xc(i1) - if (allocated(QP_Vxc) ) qp%E(i1)=qp%E(i1)-QP_Vxc(i1) - qp%Z(i1)=1._SP + if (l_elel_corr.and.allocated(QP_Vnl_xc)) Eqp(i2)=Eqp(i2)+Z(i2)*QP_Vnl_xc(i1) + if (l_elel_corr.and.allocated(QP_Vxc) ) Eqp(i2)=Eqp(i2)-Z(i2)*QP_Vxc(i1) ! - endif - ! - enddo - ! - SC_corr_now= maxval(real(qp%E(:)-qp%E_bare(:))) - GWo_SC_done=abs( SC_corr_prev-SC_corr_now )0) call msg('rs','[SC] Max corrections at prev/current cycle',& -& (/SC_corr_prev,SC_corr_now/)*HA2EV,"[eV]") - SC_corr_prev=SC_corr_now - ! - if (.not.GWo_SC_done.and.SC_iterations/=0) then - ! - ! Now I need to transfer the calculated QP corrections to the "en" type - ! - do i1=1,QP_n_states - ib =QP_table(i1,1) - ik =QP_table(i1,3) - is=spin(QP_table(i1,:)) - en%E(ib,ik,is)=qp%E(i1) - enddo - ! - ! Shift the missing bands - ! Notice that there is a control in QP_driver to avoid strange QP ranges - ! - lowest_bnd =minval(QP_table(:,1)) - highest_bnd=maxval(QP_table(:,1)) - ! - do ib=1,lowest_bnd-1 - en%E(ib,:,:)=en%Eo(ib,:,:)+en%E(lowest_bnd,:,:)-en%Eo(lowest_bnd,:,:) enddo ! - do ib=highest_bnd+1,n_bands - en%E(ib,:,:)=en%Eo(ib,:,:)+en%E(highest_bnd,:,:)-en%Eo(highest_bnd,:,:) - enddo - ! - ! Find new Fermi Energy - ! - call OCCUPATIONS_Fermi(en,k,"E",mode="OCCUPATIONS") - ! - ! Write QP on file + qp%E(i1)=Eqp(1)+Z(1)*(qp%E_bare(i1)-qp%E(i1)) ! See Eq.3 of PRB 75, 235102(2007) + qp%Z(i1)=Z(1) ! - if(l_update_W) then - FILE_name='qp_G'//trim(intc(iter))//'W'//trim(intc(iter)) - else - FILE_name='qp_G'//trim(intc(iter))//'W0' - endif - report_Sc=.true. - call QP_of(qp,en,-1,FILE_name) + else ! - ! Restore k-points that are set to zero in QP_of + ! COHSEX: no energy dependence ! - do i1=1,QP_n_states - qp%k(QP_table(i1,3),:)=k%pt(QP_table(i1,3),:) - enddo - ! - if(l_update_W) then - ! - ! Copy quasi-particle in Xen - ! - Xen%E=en%E - Xen%f=en%f - ! - call msg('s','Updating W...') - ! - ! Recalculate W - ! - current_iq=0 - call IO_and_Messaging_switch("-report") - l_recalculate_X=.true. - io_X_err=X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,.true.) - l_recalculate_X=.false. - call IO_and_Messaging_switch("+report") - ! - endif + qp%E(i1)=qp%E_bare(i1)+QP_Sc(i1,1) + if (allocated(QP_Vnl_xc)) qp%E(i1)=qp%E(i1)+QP_Vnl_xc(i1) + if (allocated(QP_Vxc) ) qp%E(i1)=qp%E(i1)-QP_Vxc(i1) + qp%Z(i1)=1._SP ! endif ! - ! Increase the counter - ! - iter=iter+1 - ! enddo ! - ! Update GWo_iterations - ! - if (GWo_iterations<0) GWo_iterations=iter - if (GW_iterations<0) GW_iterations =iter - ! end subroutine diff --git a/src/qp/QP_of.F b/src/qp/QP_of.F index d35a468a68..af59a2aad4 100644 --- a/src/qp/QP_of.F +++ b/src/qp/QP_of.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine QP_of(qp,en,QPdb_read_err,what) ! @@ -214,7 +198,8 @@ subroutine QP_of(qp,en,QPdb_read_err,what) endif ! do i_w=1,qp%GreenF_n_steps - call OUTPUT_driver(trim(G_sc_name),TITLES=(/"Energy"/),R_VALUES=(/real(qp%GreenF_W(i_qp,i_w))/),UNIT="eV") + call OUTPUT_driver(trim(G_sc_name),TITLES=(/"Energy","IM(En)"/),& + R_VALUES=(/real(qp%GreenF_W(i_qp,i_w)),aimag(qp%GreenF_W(i_qp,i_w))/),UNIT="eV") call OUTPUT_driver(trim(G_sc_name),TITLES=(/"Re(G)","Im(G)"/),& & R_VALUES=(/real(qp%GreenF(i_qp,i_w)),aimag(qp%GreenF(i_qp,i_w))/),UNIT="eVm1") if (allocated(QP_Vxc).and.allocated(QP_Vnl_xc)) then @@ -224,7 +209,8 @@ subroutine QP_of(qp,en,QPdb_read_err,what) call OUTPUT_driver(trim(G_sc_name),TITLES=(/"Re(S_tot)","Im(S_c) "/),& & R_VALUES=(/real(qp%S_total(i_qp,i_w)),aimag(qp%S_total(i_qp,i_w))/),UNIT="eV") ! - call OUTPUT_driver(trim(G_sc_name),ORDER=(/"Energ","Re(G)","Im(G)"/)) + call OUTPUT_driver(trim(G_sc_name),ORDER=(/"Energy","Im(En)"/)) + call OUTPUT_driver(trim(G_sc_name),ORDER=(/"Re(G)","Im(G)"/)) call OUTPUT_driver(trim(G_sc_name),ORDER=(/"Re(S_tot)","Im(S_c) "/)) if (report_Vnlxc) call OUTPUT_driver(trim(G_sc_name),ORDER=(/"Re(S_c)"/)) ! diff --git a/src/qp/QP_ppa_EET_terminator.F b/src/qp/QP_ppa_EET_terminator.F index 465e650b83..d69f8105f6 100644 --- a/src/qp/QP_ppa_EET_terminator.F +++ b/src/qp/QP_ppa_EET_terminator.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CA, AF -! -! 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) 2012 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. -! -! 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): CA AF ! function QP_ppa_EET_terminator(W,E,vs,Ep,ig1,ig2,iq,cutoff0,cutoff1) ! diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 4edcceae66..e1ad19b126 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -1,8 +1,7 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM +! Authors (see AUTHORS file for details): AM [AF,IM,MB] ! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or @@ -16,93 +15,101 @@ ! 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. +! Authors (see AUTHORS file for details): AM ! subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! ! Plasmon Pole & COHSEX Correlation Self-Energy ! - use pars, ONLY:DP,SP,pi,schlen,cZERO,cI + use pars, ONLY:DP,SP,pi,schlen,cZERO,cI,cONE use units, ONLY:HA2EV use stderr, ONLY:intc - use frequency, ONLY:w_samp + use frequency, ONLY:w_samp,W_reset use electrons, ONLY:levels,spin_occ,spin,n_met_bands,n_sp_pol use LIVE_t, ONLY:live_timing use com, ONLY:msg use drivers, ONLY:l_ppa,l_cohsex,l_sc_srpa,l_sc_sex,l_sc_coh,l_sc_run,& -& l_rt_carriers_in_use,l_RIM_W +& 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,& & 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 +& PAR_Q_ibz_index,n_WF_bands_to_load,HEAD_QP_cpu,& +& PAR_COM_SE_WORLD,PAR_COM_SE_WORLD_RL_resolved use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc use functions, ONLY:bose_f use IO_int, ONLY:io_control use IO_m, ONLY:manage_action,OP_RD_CL,REP,VERIFY,NONE,OP_RD,RD_CL_IF_END,& & io_RESPONSE,deliver_IO_error_message use QP_m, ONLY:QP_t,QP_n_G_bands,QP_dSc_steps,QP_table,l_update_W,l_QP_symmetrize,& -& QP_Sc,QP_n_states,QP_G_damp,QP_table,QP_dSc_delta,& +& QP_Sc,QP_n_states,QP_G_damp,QP_table,QP_dSc_delta,GW_terminator_E,& & COHSEX_use_empties,l_GW_terminator,GW_terminator_Kind,QP_states_simmetrize - use X_m, ONLY:X_ALLOC_elemental,X_mat,X_mat_d,X_t + use X_m, ONLY:X_ALLOC_elemental,X_par,X_t use wave_func, ONLY:WF - use R_lattice, ONLY:qindx_S,bz_samp,G_m_G,nqibz,RIM_W_E,& + use R_lattice, ONLY:qindx_S,bz_samp,G_m_G,G_m_G_d,nqibz,RIM_W_E,& & RIM_W_is_diagonal,RIM_W_ng,RIM_W,RIM_W_d use D_lattice, ONLY:nsym,i_time_rev,i_space_inv,mag_syms - use wrapper, ONLY:M_by_V - use interfaces, ONLY:QP_state_print,WF_load,WF_free - use matrix_operate,ONLY:mat_transpose + use wrapper, ONLY:M_by_V,V_dot_V + use interfaces, ONLY:QP_state_print,WF_load,WF_free,MATRIX_transpose,MATRIX_duplicate + use matrix, ONLY:PAR_matrix,MATRIX_reset use timing_m, ONLY:timing + use parallel_m, ONLY:PAR_COM_RL_A2A,PAR_COM_G_b_INDEX #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 + use deviceXlib_m, ONLY:dev_memcpy,dev_memset,dev_conjg use cuda_m, ONLY:have_cuda -#ifdef _CUDA + ! use drivers, ONLY:Finite_Tel use D_lattice, ONLY:Bose_Temp use functions, ONLY:bose_E_cut -#endif ! #include #include ! type(levels) ::E type(bz_samp)::Xk,k,q - type(X_t) ::X + 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,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 - 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 - 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 - ! -#ifdef _CUDA - integer :: Xng, Xr1, Xr2 - real(SP) :: XppaE, bose_PPA_E - real(DP) :: dp_dummy_r, dp_dummy_i - complex(SP) :: W_i_w - complex(SP), pointer, device :: isc_rhotw_d(:) - complex(SP), pointer, device :: iscp_rhotw_d(:) - complex(SP), pointer, device :: isc_gamp_d(:,:) -#endif + 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 :: 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 + 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 + complex(SP) :: PPA_R,pre_factor + complex(SP) :: W_i,lW,QP_ppa_EET + real(DP) :: dp_dummy_r,dp_dummy_i + complex(DP) :: dp_dummy,ctmp + ! + complex(SP), allocatable :: W_(:),dc(:) + complex(SP), allocatable DEV_ATTR :: eet_factor(:,:) + complex(SP), allocatable DEV_ATTR :: local_rhotw(:), conjg_iscp_rhotw(:) + 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(:,:) + complex(SP), pointer DEV_ATTR :: X_blc_p(:,:,:) + real(SP), pointer DEV_ATTR :: RIM_W_p(:,:,:) ! 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 :: PPcond_rate,TO_rate + real(SP) :: PP_err + ! ! Reset & checks ! call elemental_collision_free(isc) @@ -111,6 +118,33 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) iq_to_start =1 QP_Sc =cZERO ! + ! Sc Energy points (1 type each QP state !) + !------------------------------------------- + if (trim(QP_solver)=='n') then + ! + 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 + enddo + ! + else if (trim(QP_solver)=='g') then + ! + 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 + call FREQUENCIES_Green_Function(i_qp,Sc_W(i_qp),E%E,.FALSE.) + ! + if(Sc_W(i_qp)%grid_type=="ra") then + Sc_W(i_qp)%p=real(Sc_W(i_qp)%p,SP) + else + QP_G_damp=0._SP + endif + enddo + ! + endif + ! if (l_GW_terminator.and.trim(GW_terminator_Kind)/='BG'.and.& & trim(GW_terminator_Kind)/='BRS') & & call error(' [GW/PPA] unknown GW_terminator_Kind = '//trim(GW_terminator_Kind)) @@ -131,14 +165,13 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) if (.not.l_sc_run) then SECTION_name='G'//trim(intc(GW_iter)) W_name ='W0' - if(l_update_W) W_name='W'//trim(intc(GW_iter)) if ( l_cohsex) SECTION_name=trim(SECTION_name)//trim(W_name)//' (COHSEX)' if ( l_ppa ) SECTION_name=trim(SECTION_name)//trim(W_name)//' (W PPA)' if (.not.l_ppa.and..not.l_cohsex) SECTION_name=trim(SECTION_name)//trim(W_name)//' (W real-axis)' endif ! if (GW_iter==0) then - if(l_RIM_W) then + if(l_rim_w) then call section('-',trim(SECTION_name)) else call section('+',trim(SECTION_name)) @@ -192,17 +225,11 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! call WF_load(WF,isc%ngrho,maxval(qindx_S(:,:,2)),(/1,n_WF_bands_to_load/),(/1,k%nibz/),title=trim(ch)) ! - ! 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") - ! call timing('GW(ppa)',OPR='start') ! ! Plasmon-Pole/Static interaction DB I/O ! - call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1,2/),MODE=VERIFY,ID=ID) + 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.and.io_RESPONSE) call error('Incomplete and/or broken PPA/Static diel. fun. database') ! @@ -213,20 +240,36 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! ALLOCATION !------------ ! + ! deallocate X_mat + call X_ALLOC_elemental("X") + ! + if (.not.allocated(X_par).and.io_RESPONSE) then + allocate(X_par(1)) + endif + ! if (l_sc_coh.or.l_sc_sex.or.l_cohsex.or.l_sc_srpa) then - if (io_RESPONSE) call X_ALLOC_elemental('X',(/X%ng,X%ng,1/)) - allocate(dc(2)) + if (io_RESPONSE) call X_ALLOC_parallel(X_par(1),X%ng,1,"X") + YAMBO_ALLOC(dc,(2)) else - if (io_RESPONSE) call X_ALLOC_elemental('X',(/X%ng,X%ng,2/)) - allocate(W_(QP_dSc_steps)) - allocate(dc(QP_dSc_steps),stat=alloc_err) - if(l_GW_terminator) then - YAMBO_ALLOC(eet_factor,(X%ng,X%ng)) - endif + if (io_RESPONSE) call X_ALLOC_parallel(X_par(1),X%ng,2,"X") + YAMBO_ALLOC(W_,(QP_dSc_steps)) + YAMBO_ALLOC(dc,(QP_dSc_steps)) endif + YAMBO_ALLOC(local_rhotw,(X%ng)) + YAMBO_ALLOC(conjg_iscp_rhotw,(X%ng)) + ! + ! 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") + ! + isc_rhotw_p => DEV_VAR(isc%rhotw) + iscp_rhotw_p => DEV_VAR(iscp%rhotw) ! call PP_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)) ) @@ -242,6 +285,13 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) io_err=io_X(X,Xw,ID) endif ! + ! indexes to be used with X_par (i.e. also when using X_blc_p) + ! X_mat_range(1:2) were used with X_mat, instead + ! + X_range1=1 + X_range2=Xw%n_freqs + X_ppaE =X%ppaE + ! Q_loop: do iqbz=iq_to_start,q%nbz ! if (.not.PAR_IND_Q_ibz%element_1D(q%sstar(iqbz,1))) cycle @@ -253,11 +303,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) if (iqibz/=isc%iqref) then ! iq_mem=PAR_Q_ibz_index(iqibz) - X_range=(/1,Xw%n_freqs/) - if (.not.io_RESPONSE) X_range=(/Xw%n_freqs*(iq_mem-1)+1,iq_mem*Xw%n_freqs/) - ! - call DEV_SUB(scatter_Gamp)(isc,'c') - if (have_cuda) call dev_memcpy(isc%gamp,isc%gamp_d) + if (io_RESPONSE) iq_mem=1 ! ! I/O ! @@ -282,32 +328,71 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) if (l_sc_run .and. it_now==it_to_start.or.io_RESPONSE) then #endif ! - !$omp parallel do default(shared), private(ig1,ig2,l_RIM_W_g) - do ig2=1,X%ng - do ig1=1,X%ng - if (l_ppa) then - ! - ! RIM W support - ! - l_RIM_W_g=(l_RIM_W.and.ig1<=RIM_W_ng.and.ig2<=RIM_W_ng.and.iqibz==1) - if (RIM_W_is_diagonal.and.l_RIM_W_g) l_RIM_W_g=(ig1==ig2) + PPcond_rate=0 + TO_rate=0 + PP_err=0.0_SP + ! + if (l_ppa) then + ! + !$omp parallel do default(shared), private(ig1,ig2,l_RIM_W_g), & + !$omp & reduction(+:PPcond_rate,TO_rate,PP_err), collapse(2) + do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) + do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) + ! + ! RIM W support + ! + l_RIM_W_g=(l_RIM_W.and.ig1<=RIM_W_ng.and.ig2<=RIM_W_ng.and.iqibz==1) + if (RIM_W_is_diagonal.and.l_RIM_W_g) l_RIM_W_g=(ig1==ig2) + ! + if (l_RIM_W_g) then + X_par(iq_mem)%blc(ig1,ig2,X_range2)=RIM_W_E(ig1,ig2) ! - if (l_RIM_W_g) then - X_mat(ig1,ig2,X_range(2))=RIM_W_E(ig1,ig2) + else + if (real(X_par(iq_mem)%blc(ig1,ig2,X_range1)/X_par(iq_mem)%blc(ig1,ig2,X_range2))<=1._SP) then + X_par(iq_mem)%blc(ig1,ig2,X_range2)=X_ppaE ! + PP_err=PP_err+abs( X_par(iq_mem)%blc(ig1,ig2,X_range1)/(X_ppaE**2+1._SP)-X_par(iq_mem)%blc(ig1,ig2,X_range2) )/& +& maxval( abs( X_par(iq_mem)%blc(ig1,ig2,X_range1:X_range2) ) ) + PPcond_rate=PPcond_rate+1 else - if (real(X_mat(ig1,ig2,X_range(1))/X_mat(ig1,ig2,X_range(2)))<=1._SP) then - X_mat(ig1,ig2,X_range(2))=X%ppaE - else - X_mat(ig1,ig2,X_range(2))=sqrt(X_mat(ig1,ig2,X_range(1))/X_mat(ig1,ig2,X_range(2))-1) - endif + X_par(iq_mem)%blc(ig1,ig2,X_range2)=sqrt(X_par(iq_mem)%blc(ig1,ig2,X_range1)/X_par(iq_mem)%blc(ig1,ig2,X_range2)-1) + ! + if(real(1._SP/X_par(iq_mem)%blc(ig1,ig2,X_range2),SP)*aimag( 1._SP/X_par(iq_mem)%blc(ig1,ig2,X_range1) )>0._SP) then + TO_rate=TO_rate+1 + endif endif - else - X_mat(ig1,ig2,X_range(1))=X_mat(ig1,ig2,X_range(1))*isc%gamp(ig1,ig2) + ! endif + ! enddo - enddo - !$omp end parallel do + enddo + ! + else ! COHSEX + ! + ! GAMP + ! + ! update alloc + call elemental_collision_alloc(isc,GAMP_ROWS=X_par(1)%rows,GAMP_COLS=X_par(1)%cols) + ! + call DEV_SUB(scatter_Gamp)(isc,'c') + if (have_cuda) call dev_memcpy(isc%gamp,isc%gamp_d) + ! + !$omp parallel do default(shared), private(ig1,ig2), collapse(2) + do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) + do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) + X_par(iq_mem)%blc(ig1,ig2,X_range1)=X_par(iq_mem)%blc(ig1,ig2,X_range1)*isc%gamp(ig1,ig2) + enddo + enddo + ! + YAMBO_FREE(isc%gamp) + YAMBO_FREE(isc%gamp_d) + ! + endif + ! + call msg('r',' Current Q-pt index ',iqibz) + call msg('r',' :: PP condition fails/total ',real(PPcond_rate,SP)/X%ng**2) + call msg('r',' :: Time ordering fails/rest ',real(TO_rate,SP)/(X%ng**2-PPcond_rate)) + call msg('r',' :: Mean rel dev of PP cond ',PP_err/X%ng**2) ! #if defined _SC endif @@ -328,14 +413,44 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! if (iqs>nsym/(i_time_rev+1) .and. (i_space_inv==0.or.mag_syms) .and..not.X_is_TR_rotated) then ! - ! Note (AF) that $omp directives are inside mat_transpose - ! - call mat_transpose(X_mat(:,:,X_range(1))) - if (l_ppa) call mat_transpose(X_mat(:,:,X_range(2))) + call MATRIX_transpose("T",M_out=X_par(iq_mem)) X_is_TR_rotated=.true. + ! endif ! - if (have_cuda) call dev_memcpy(X_mat_d, X_mat) + ! PAR_matrix definitions + ! + X_rows1=X_par(iq_mem)%rows(1) + X_rows2=X_par(iq_mem)%rows(2) + X_cols1=X_par(iq_mem)%cols(1) + X_cols2=X_par(iq_mem)%cols(2) + X_nrows=X_rows2-X_rows1+1 + X_ncols=X_cols2-X_cols1+1 + ! + if (have_cuda) then + YAMBO_ALLOC_SOURCE(X_par(iq_mem)%blc_d,X_par(iq_mem)%blc) + endif + X_blc_p=> DEV_VAR(X_par(iq_mem)%blc) + ! + ! GAMP + ! + if(l_ppa) then + ! update alloc + call elemental_collision_alloc(isc,GAMP_ROWS=X_par(1)%rows,GAMP_COLS=X_par(1)%cols) + call DEV_SUB(scatter_Gamp)(isc,'c') + isc_gamp_p => DEV_VAR(isc%gamp) + endif + ! + if(l_ppa.and.l_RIM_W) then + RIM_W_p=>DEV_VAR(RIM_W) + endif + ! + if(l_ppa.and.l_GW_terminator) then + YAMBO_ALLOC(eet_factor,(X_rows1:X_rows2,X_cols1:X_cols2)) + endif + + ! + ! main QP loop ! QP_loop: do i_qp=i_qp_to_start,QP_n_states ! @@ -371,77 +486,118 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) 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%qs=(/1,1,1/) - + ! call DEV_SUB(scatter_Bamp)(isc) - if (have_cuda) call dev_memcpy(isc%rhotw,isc%rhotw_d) ! if (l_GW_terminator) then + ! do is=1,n_sp_pol - eet_cutoff0(is)=minval(E%E(E%nbf(is)+1,:,is)) - eet_cutoff1(is)=minval(E%E(QP_n_G_bands(2),:,is)) + eet_cutoff0_sp(is)=minval(E%E(E%nbf(is)+1,:,is)) + eet_cutoff1_sp(is)=minval(E%E(QP_n_G_bands(2),:,is)) enddo - eet_cutoff0(1)=minval(eet_cutoff0(:)) - eet_cutoff1(1)=minval(eet_cutoff1(:)) - eet_factor=cZERO + eet_cutoff0=minval(eet_cutoff0_sp(:)) + eet_cutoff1=minval(eet_cutoff1_sp(:)) + ! + ! eet_factor=cZERO + call dev_memset(eet_factor,cZERO) + ! + ! MB: After the inclusion of G-parallelism, PAR_COM_G_b_INDEX can be different + ! from HEAD_QP_cpu --> the right one to be used is PAR_COM_G_b_INDEX ! - if ( HEAD_QP_cpu ) then + if (PAR_COM_G_b_INDEX%CPU_id==0) then if (X_is_TR_rotated) then - !$omp parallel do default(shared), private(ig1,ig2) - do ig2=1,X%ng - do ig1=1,X%ng - eet_factor(ig1,ig2)=isc%rhotw(G_m_G(ig2,ig1)) - enddo - enddo - !$omp end parallel do + ! + !DEV_CUF kernel do(2) + !DEV_OMP parallel do default(shared), private(ig1,ig2), collapse(2) + do ig2=X_cols1,X_cols2 + do ig1=X_rows1,X_rows2 + eet_factor(ig1,ig2)=isc_rhotw_p(DEV_VAR(G_m_G)(ig2,ig1)) + enddo + enddo + ! else - !$omp parallel do default(shared), private(ig1,ig2) - do ig2=1,X%ng - do ig1=1,X%ng - eet_factor(ig1,ig2)=isc%rhotw(G_m_G(ig1,ig2)) - enddo - enddo - !$omp end parallel do + ! + !DEV_CUF kernel do(2) + !DEV_OMP parallel do default(shared), private(ig1,ig2), collapse(2) + do ig2=X_cols1,X_cols2 + do ig1=X_rows1,X_rows2 + eet_factor(ig1,ig2)=isc_rhotw_p(DEV_VAR(G_m_G)(ig1,ig2)) + enddo + enddo + ! endif endif ! else ! dp_dummy = 0.0_DP + dp_dummy_r = 0.0_DP + dp_dummy_i = 0.0_DP ! if (X_is_TR_rotated) then - !$omp parallel do default(shared), private(ig1,ig2), reduction(+:dp_dummy) - do ig2=1,X%ng - do ig1=1,X%ng - dp_dummy=dp_dummy+cmplx(2._SP*pi*isc%rhotw(G_m_G(ig2,ig1))*X_mat(ig1,ig2,X_range(1)),kind=DP) - enddo + ! + !DEV_CUF kernel do(2) + !DEV_OMP parallel do default(shared), private(ig1,ig2,ctmp), & + !DEV_OMP & reduction(+:dp_dummy), collapse(2) + ! + do ig2=X_cols1,X_cols2 + do ig1=X_rows1,X_rows2 + ctmp=cmplx(2._SP*pi*isc_rhotw_p(DEV_VAR(G_m_G)(ig2,ig1))* & +& X_blc_p(ig1,ig2,X_range1),kind=DP) +#ifdef _CUDA + dp_dummy_r=dp_dummy_r+real(ctmp,DP) + dp_dummy_i=dp_dummy_i+imag(ctmp) +#else + dp_dummy=dp_dummy+ctmp +#endif + enddo enddo - !$omp end parallel do + ! else - !$omp parallel do default(shared), private(ig1,ig2), reduction(+:dp_dummy) - do ig2=1,X%ng - do ig1=1,X%ng - dp_dummy=dp_dummy+cmplx(2._SP*pi*isc%rhotw(G_m_G(ig1,ig2))*X_mat(ig1,ig2,X_range(1)),kind=DP) - enddo + ! + !DEV_CUF kernel do(2) + !DEV_OMP parallel do default(shared), private(ig1,ig2,ctmp), & + !DEV_OMP & reduction(+:dp_dummy), collapse(2) + ! + do ig2=X_cols1,X_cols2 + do ig1=X_rows1,X_rows2 + ctmp=cmplx(2._SP*pi*isc_rhotw_p(DEV_VAR(G_m_G)(ig1,ig2))*& +& X_blc_p(ig1,ig2,X_range1),kind=DP) +#ifdef _CUDA + dp_dummy_r=dp_dummy_r+real(ctmp,DP) + dp_dummy_i=dp_dummy_i+imag(ctmp) +#else + dp_dummy=dp_dummy+ctmp +#endif + enddo enddo - !$omp end parallel do + ! endif ! + if (have_cuda) dp_dummy=cmplx(dp_dummy_r,dp_dummy_i,kind=DP) + ! dc(1) = cmplx(dp_dummy,kind=SP) ! - ! Bug spotted by D.V. (April 2014). HEAD_QP_cpu is defined differently when + ! + ! DV: Bug spotted in April 2014. HEAD_QP_cpu is defined differently when ! the _SC flag is used. The point is that in SE calculations HEAD_QP_cpu is used ! 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 + ! AF,MB: After the inclusion of G-parallelism, the communicator to use + ! here (both SC and ordinary runs) has become PAR_COM_G_b_INDEX + ! +!#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 (PAR_COM_G_b_INDEX%CPU_id==0) QP_Sc(i_qp,:)=QP_Sc(i_qp,:)+dc(1) ! dc=cZERO ! @@ -461,150 +617,114 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) isc%os(1)=ib ! call DEV_SUB(scatter_Bamp)(isc) - if (have_cuda) call dev_memcpy(isc%rhotw, isc%rhotw_d) iscp%os=isc%os ! if (any(isc%is/=iscp%is)) then call DEV_SUB(scatter_Bamp)(iscp) - if (have_cuda) call dev_memcpy(iscp%rhotw, iscp%rhotw_d) else - iscp%rhotw=isc%rhotw - if (have_cuda) call dev_memcpy(iscp%rhotw_d, iscp%rhotw) + !iscp%rhotw=isc%rhotw + call dev_memcpy(iscp_rhotw_p, isc_rhotw_p) endif + !conjg_iscp_rhotw=conjg(iscp%rhotw) + call dev_memcpy(conjg_iscp_rhotw,iscp_rhotw_p) + call dev_conjg(conjg_iscp_rhotw) ! dc=cZERO ! if (l_ppa) then ! if(l_GW_terminator) then - !$omp parallel do default(shared), private(ig1,ig2) - do ig2=1,X%ng - do ig1=1,X%ng - eet_factor(ig1,ig2)=eet_factor(ig1,ig2)-isc%rhotw(ig1)*conjg(iscp%rhotw(ig2)) - enddo + ! + !DEV_CUF kernel do(2) + !DEV_OMP parallel do default(shared), private(ig1,ig2), collapse(2) + ! + do ig2=X_cols1,X_cols2 + do ig1=X_rows1,X_rows2 + eet_factor(ig1,ig2)=eet_factor(ig1,ig2)-isc_rhotw_p(ig1)*conjg_iscp_rhotw(ig2) + enddo enddo - !$omp end parallel do + ! endif ! - 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 + ! 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)) ! -#ifdef _CUDA - Xng = X%ng - XppaE = X%ppaE - Xr1 = X_range(1) - Xr2 = X_range(2) - - isc_gamp_d => isc%gamp_d - isc_rhotw_d => isc%rhotw_d - iscp_rhotw_d => iscp%rhotw_d - + ! do i_w=1,QP_dSc_steps - W_i_w = W_(i_w) + ! + W_i = W_(i_w) ! ! NOTE: Split reduction done here to work around PGI bug with complex - ! CUF reductions. + ! CUF reductions. dp_dummy_r = 0.0_DP dp_dummy_i = 0.0_DP + dp_dummy = 0.0_DP ! - !$cuf kernel do(2) - do ig2=1,Xng - do ig1=1,Xng - ! - PPA_E= real(XppaE/X_mat_d(ig1,ig2,Xr2),kind=SP) - ! - ! RIM W support - ! - l_RIM_W_g=(l_RIM_W.and.ig1<=RIM_W_ng.and.ig2<=RIM_W_ng) - if (RIM_W_is_diagonal.and.l_RIM_W_g) l_RIM_W_g=(ig1==ig2) - ! - if (l_RIM_W_g) then - PPA_R=-cmplx(RIM_W_d(iqibz,ig1,ig2)/2._SP, & -& aimag(X_mat_d(ig1,ig2,Xr1))*real(isc_gamp_d(ig1,ig2)),kind=SP)/2._SP*PPA_E + !DEV_CUF kernel do(2) + !DEV_OMP parallel do default(shared), private(ig1,ig2,PPA_E,PPA_R,ctmp,l_RIM_W_g), & + !DEV_OMP & reduction(+:dp_dummy), collapse(2) + ! + do ig2=X_cols1,X_cols2 + do ig1=X_rows1,X_rows2 + ! + PPA_E= real(X_ppaE/X_blc_p(ig1,ig2,X_range2),kind=SP) + ! + ! RIM W support + ! + l_RIM_W_g=(l_RIM_W.and.ig1<=RIM_W_ng.and.ig2<=RIM_W_ng) + if (RIM_W_is_diagonal.and.l_RIM_W_g) l_RIM_W_g=(ig1==ig2) + ! + if (l_RIM_W_g) then + PPA_R=-cmplx(RIM_W_p(iqibz,ig1,ig2)/2._SP, & +& aimag(X_blc_p(ig1,ig2,X_range1))*real(isc_gamp_p(ig1,ig2)),kind=SP)/2._SP*PPA_E + else + PPA_R=-X_blc_p(ig1,ig2,X_range1)/2._SP*PPA_E*isc_gamp_p(ig1,ig2) + endif + ! + ! inline bose_f function + bose_PPA_E=0. + if (PPA_E<0.) bose_PPA_E=-spin_occ + if (Finite_Tel) then + if (abs(PPA_E)>epsilon(1.)) then + if (abs(PPA_E)<=bose_E_cut*Bose_Temp) bose_PPA_E=spin_occ*Bose_Temp/PPA_E + if (abs(PPA_E)> bose_E_cut*Bose_Temp) bose_PPA_E=spin_occ/(exp(PPA_E/Bose_Temp)-1.) else - PPA_R=-X_mat_d(ig1,ig2,Xr1)/2._SP*PPA_E*isc_gamp_d(ig1,ig2) + bose_PPA_E=spin_occ*Bose_Temp/epsilon(1.) endif - ! - ! inline bose_f function - bose_PPA_E=0. - if (PPA_E<0.) bose_PPA_E=-spin_occ - if (Finite_Tel) then - if (abs(PPA_E)>epsilon(1.)) then - if (abs(PPA_E)<=bose_E_cut*Bose_Temp) bose_PPA_E=spin_occ*Bose_Temp/PPA_E - if (abs(PPA_E)> bose_E_cut*Bose_Temp) bose_PPA_E=spin_occ/(exp(PPA_E/Bose_Temp)-1.) - else - bose_PPA_E=spin_occ*Bose_Temp/epsilon(1.) - endif - endif - ! - ctmp = -4._SP/spin_occ*pi*isc_rhotw_d(ig1)*conjg(iscp_rhotw_d(ig2))*(-PPA_R)*& -& ( (spin_occ-f_kmq+bose_PPA_E)/(W_i_w-E_kmq-PPA_E)+& -& (f_kmq+bose_PPA_E)/(conjg(W_i_w)-E_kmq+PPA_E)) - ! - dp_dummy_r=dp_dummy_r+real(ctmp) ! real(ctmp,DP) - dp_dummy_i=dp_dummy_i+imag(ctmp) - ! - enddo - enddo - ! - dp_dummy%re = dp_dummy_r - dp_dummy%im = dp_dummy_i - dc(i_w) = cmplx(dp_dummy,kind=SP) - ! - enddo + endif + ! + ctmp = -4._SP/spin_occ*pi*isc_rhotw_p(ig1)*conjg_iscp_rhotw(ig2)*(-PPA_R)*& +& ( (spin_occ-f_kmq+bose_PPA_E)/(W_i-E_kmq-PPA_E)+& +& (f_kmq+bose_PPA_E)/(conjg(W_i)-E_kmq+PPA_E)) + ! +#ifdef _CUDA + dp_dummy_r=dp_dummy_r+real(ctmp,DP) + dp_dummy_i=dp_dummy_i+imag(ctmp) #else - do i_w=1,QP_dSc_steps - ! - dp_dummy = 0.0_DP - ! - !$omp parallel do default(shared), private(ig1,ig2,PPA_E,PPA_R,ctmp, & - !$omp & l_RIM_W_g), reduction(+:dp_dummy) - do ig2=1,X%ng - do ig1=1,X%ng - ! - PPA_E= real(X%ppaE/X_mat(ig1,ig2,X_range(2)),kind=SP) - ! - ! RIM W support - ! - l_RIM_W_g=(l_RIM_W.and.ig1<=RIM_W_ng.and.ig2<=RIM_W_ng) - if (RIM_W_is_diagonal.and.l_RIM_W_g) l_RIM_W_g=(ig1==ig2) - ! - if (l_RIM_W_g) then - PPA_R=-cmplx(RIM_W(iqibz,ig1,ig2)/2._SP, & -& aimag(X_mat(ig1,ig2,X_range(1)))*real(isc%gamp(ig1,ig2),kind=SP),kind=SP)/2._SP*PPA_E - else - PPA_R=-X_mat(ig1,ig2,X_range(1))/2._SP*PPA_E*isc%gamp(ig1,ig2) - end if - ! - ctmp = -4._SP/spin_occ*pi*isc%rhotw(ig1)*conjg(iscp%rhotw(ig2))*(-PPA_R)*& -& ( (spin_occ-f_kmq+bose_f(PPA_E))/(W_(i_w)-E_kmq-PPA_E)+& -& (f_kmq+bose_f(PPA_E))/(conjg(W_(i_w))-E_kmq+PPA_E)) - ! - dp_dummy=dp_dummy+ctmp - ! - enddo + dp_dummy=dp_dummy+ctmp +#endif + ! enddo - !$omp end parallel do + enddo + ! + if (have_cuda) dp_dummy=cmplx(dp_dummy_r,dp_dummy_i,kind=DP) ! dc(i_w) = cmplx(dp_dummy,kind=SP) ! enddo -#endif ! QP_Sc(i_qp,:QP_dSc_steps)=QP_Sc(i_qp,:QP_dSc_steps)+dc(:QP_dSc_steps) ! + ! else if (l_sc_sex.or.l_cohsex.or.(l_sc_coh.and.COHSEX_use_empties)) then ! - call M_by_V('N', X%ng, X_mat(:,:,X_range(1)), conjg(iscp%rhotw), local_rhotw) + call M_by_V('N',X_nrows,X_ncols, cONE, X_blc_p(:,:,X_range1),X_nrows,& +& conjg_iscp_rhotw(X_cols1:X_cols2),1,cZERO,local_rhotw(X_rows1:X_rows2),1) ! - pre_factor=0.0_SP - !$omp parallel do default(shared), private(ig1), reduction(+:pre_factor) - do ig1=1,X%ng - pre_factor=pre_factor+isc%rhotw(ig1)*local_rhotw(ig1) - enddo - !$omp end parallel do + pre_factor=V_dot_V(X_nrows,isc_rhotw_p(X_rows1:X_rows2),local_rhotw(X_rows1:X_rows2)) ! ! SEX @@ -623,28 +743,51 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! enddo ! loop on scattering states ! - if(l_GW_terminator) then + if(l_ppa.and.l_GW_terminator) then ! - 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 + ! 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 i_w=1,QP_dSc_steps ! + dp_dummy_r=0.0_DP + dp_dummy_i=0.0_DP dp_dummy=0.0_DP ! - !$omp parallel do default(shared), private(ig1,ig2,PPA_E,PPA_R), reduction(+:dp_dummy) - do ig2=1,X%ng - do ig1=1,X%ng - ! - PPA_E=X%ppaE/real(X_mat(ig1,ig2,X_range(2))) - 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),& -& eet_cutoff0(1),eet_cutoff1(1)),kind=DP) - ! - enddo + !DEV_CUF kernel do(2) + !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 + ! + PPA_E=X_ppaE/real(X_blc_p(ig1,ig2,X_range2)) + PPA_R=-X_blc_p(ig1,ig2,X_range1)/2._SP*PPA_E*isc_gamp_p(ig1,ig2) + ! +#ifdef _CUDA + eet_energy=eet_cutoff1+GW_terminator_E + lW=W_i + 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),& +& eet_cutoff0,eet_cutoff1) +#endif + ! + ctmp = cmplx(4._SP/spin_occ*pi*PPA_R*eet_factor(ig1,ig2)*QP_ppa_EET, kind=DP) + ! +#ifdef _CUDA + dp_dummy_r=dp_dummy_r+real(ctmp,DP) + dp_dummy_i=dp_dummy_i+imag(ctmp) +#else + dp_dummy=dp_dummy+ctmp +#endif + ! + enddo enddo - !$omp end parallel do + !DEV_OMP end parallel do + ! + if (have_cuda) dp_dummy=cmplx(dp_dummy_r,dp_dummy_i,kind=DP) ! QP_Sc(i_qp,i_w)=QP_Sc(i_qp,i_w)+cmplx(dp_dummy,kind=SP) ! @@ -654,24 +797,33 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! enddo QP_loop ! + YAMBO_FREE(eet_factor) + YAMBO_FREE(isc%gamp) + YAMBO_FREE(isc%gamp_d) + YAMBO_FREE(X_par(iq_mem)%blc_d) + ! enddo Q_loop ! call live_timing() ! ! CLEAN ! - deallocate(dc) - if(l_ppa) then - deallocate(W_) - if (l_GW_terminator) then - YAMBO_FREE(eet_factor) - endif - endif + YAMBO_FREE(dc) + YAMBO_FREE(W_) + YAMBO_FREE(local_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(l_X_ALLOC_elemental) call X_ALLOC_elemental('X') + if(l_X_ALLOC_elemental) then + do iq_mem = 1,size(X_par) + call MATRIX_reset(X_par(iq_mem)) + enddo + if (allocated(X_par)) deallocate(X_par) + endif + call X_ALLOC_elemental('X') ! call timing('GW(ppa)',OPR='stop') ! diff --git a/src/qp/QP_real_axis.F b/src/qp/QP_real_axis.F index 4467c65d1a..2895d62a15 100644 --- a/src/qp/QP_real_axis.F +++ b/src/qp/QP_real_axis.F @@ -1,25 +1,11 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. +!@brief GW self-energy on the real axis ! subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) ! @@ -42,6 +28,8 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) use parallel_int, ONLY:PP_wait,PP_redux_wait,PARALLEL_global_indexes,PARALLEL_WF_index,& & PARALLEL_WF_distribute use interfaces, ONLY:QP_state_print,WF_load,WF_free + use matrix, ONLY:MATRIX_reset + use matrix_operate,ONLY:mat_transpose use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc use wave_func, ONLY:WF use DIPOLES, ONLY:DIPOLE_t @@ -51,7 +39,7 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) use QP_m, ONLY:QP_t,QP_n_G_bands,QP_dSc_steps,QP_Sc,QP_n_states,QP_G_damp,QP_table,QP_dSc_delta,& & QP_W,QP_solver,QP_W_er,QP_W_dr,QP_n_W_freqs,QP_Sc_steps,& & QP_n_W_freqs_redux,e2et,h2ht - use X_m, ONLY:X_ALLOC_elemental,X_mat,X_t + use X_m, ONLY:X_ALLOC_elemental,X_mat,X_t,X_par use functions, ONLY:bose_decay use R_lattice, ONLY:qindx_S,bz_samp use D_lattice, ONLY:nsym,i_space_inv,i_time_rev,mag_syms @@ -61,21 +49,23 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) use timing_m, ONLY:timing ! #include - type(levels) ::en,Xen - type(bz_samp)::Xk,k,q - type(X_t) ::X - type(QP_t) ::qp - type(w_samp) ::Xw - type(DIPOLE_t) :: Dip - integer ::GW_iter + ! + type(levels) :: en,Xen + type(bz_samp) :: Xk,k,q + type(X_t) :: X + type(QP_t) :: qp + type(w_samp) :: Xw + type(DIPOLE_t) :: Dip + integer :: GW_iter ! ! WorkSpace ! 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,& -& 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 - complex(SP) :: lrhotw(X%ng),X_mat_ws(X%ng,X%ng),W_dummy + 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,& +& 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 real(SP) ::life_Fe,life_Fh integer, allocatable::life_W_table(:,:) integer, external ::io_X,io_QP_and_GF,X_dielectric_matrix,QP_life_transitions @@ -279,7 +269,7 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) ! call X_ALLOC_elemental('X',(/X%ng,X%ng,QP_n_W_freqs_redux/)) ! - call elemental_collision_alloc(scattering_main,NG=X%ng,NG_GAMP=(/X%ng,X%ng/),TITLE="GW") + 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") ! QP_Sc=cZERO @@ -366,13 +356,28 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) endif ! if (iqs>nsym/(i_time_rev+1) .and. (i_space_inv==0.or.mag_syms) .and..not.X_is_TR_rotated) then - X_is_TR_rotated=.true. + ! do i3=X_range(1),X_range(2) - forall(i1=1:X%ng,i2=1:X%ng) X_mat_ws(i2,i1)=X_mat(i1,i2,i3) - X_mat(:,:,i3)=X_mat_ws(:,:) + call mat_transpose(X_mat(:,:,i3)) enddo + 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") + ! + ! Useful when GPU porting will be introduced + ! X_blc_p=> DEV_VAR(X_par%blc) + ! + X_rows1=X_par(1)%rows(1) + X_rows2=X_par(1)%rows(2) + X_cols1=X_par(1)%cols(1) + X_cols2=X_par(1)%cols(2) + ! + ! qp_loop: do i_qp=1,QP_n_states ! i_qp_mem=PAR_QP_index(i_qp) @@ -436,8 +441,9 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) ! i2=life_W_table(iqibz,QP_n_W_freqs) ! - do i3=1,X%ng - lrhotw(i3)=V_dot_V_omp(X%ng,scattering_main%rhotw,X_mat(:,i3,i2+X_range(1)-1)) + do i3=X_cols1,X_cols2 + lrhotw(i3)=V_dot_V_omp(X_rows2-X_rows1+1,scattering_main%rhotw(X_rows1:X_rows2),& +& X_mat(X_rows1:X_rows2,i3,i2+X_range(1)-1)) enddo ! ! To compensate the Tel/w divergence of the Bose function at finite @@ -448,7 +454,8 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) ! qp%E(i_qp)=qp%E(i_qp)-2._SP*cI*pi*& & (life_Fe+life_Fh)*bose_decay( real(X_life_W(iqibz)%p(i2)) )*& -& Vstar_dot_V_omp(X%ng,scattering_prime%rhotw,lrhotw) +& Vstar_dot_V_omp(X_cols2-X_cols1+1,scattering_prime%rhotw(X_cols1:X_cols2),& +& lrhotw(X_cols1:X_cols2)) ! else ! .not.l_life ! @@ -456,23 +463,27 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) ! do i2=1,QP_n_W_freqs W_dummy=cZERO -!$omp parallel do default(shared), private(i3,i4), reduction(+:W_dummy), collapse(2) - do i3=1,X%ng - do i4=1,X%ng - W_dummy=W_dummy+scattering_main%rhotw(i3)*X_mat(i3,i4,i2+X_range(1)-1)*conjg(scattering_prime%rhotw(i4)) + ! + !$omp parallel do default(shared), private(i3,i4), reduction(+:W_dummy), collapse(2) + do i4=X_cols1,X_cols2 + do i3=X_rows1,X_rows2 + W_dummy=W_dummy+scattering_main%rhotw(i3)*X_mat(i3,i4,i2+X_range(1)-1)*& +& conjg(scattering_prime%rhotw(i4)) enddo enddo -!$omp end parallel do + ! QP_W(i_qp_mem,i_q_W_mem,i_b_mem,i2)=-4._SP/spin_occ*W_dummy enddo #else do i2=1,QP_n_W_freqs ! - do i3=1,X%ng - lrhotw(i3)=V_dot_V(X%ng,scattering_main%rhotw,X_mat(:,i3,i2+X_range(1)-1)) + do i3=X_cols1,X_cols2 + lrhotw(i3)=V_dot_V(X_rows2-X_rows1+1,scattering_main%rhotw(X_rows1:X_rows2),& +& X_mat(X_rows1:X_rows2,i3,i2+X_range(1)-1)) enddo ! - W_dummy=Vstar_dot_V_omp(X%ng,scattering_prime%rhotw,lrhotw) + W_dummy=Vstar_dot_V_omp(X_cols2-X_cols1+1,scattering_prime%rhotw(X_cols1:X_cols2),& +& lrhotw(X_cols1:X_cols2)) ! QP_W(i_qp_mem,i_q_W_mem,i_b_mem,i2)=-4._SP/spin_occ*W_dummy ! @@ -484,6 +495,8 @@ 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)) + ! if (.not.l_life) then ! QP_W_er(iqbz,:)=Xw%er @@ -545,6 +558,8 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) enddo endif ! + if (allocated(X_par)) deallocate(X_par) + ! call X_ALLOC_elemental('X') call WF_free(WF) call elemental_collision_free(scattering_main) diff --git a/src/qp/QP_report_and_write.F b/src/qp/QP_report_and_write.F index 86e8434fe6..7d0416c4d9 100644 --- a/src/qp/QP_report_and_write.F +++ b/src/qp/QP_report_and_write.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2009 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 ! subroutine QP_report_and_write(k,qp,en,QPdb_read_err) ! diff --git a/src/qp/QP_secant.F b/src/qp/QP_secant.F index 772b6c9c11..6054e73cfe 100644 --- a/src/qp/QP_secant.F +++ b/src/qp/QP_secant.F @@ -1,25 +1,11 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. +!@brief Secant solver for the quasi-particle equation ! integer function QP_secant(x1,f1,x2,f2,acc,nstep) ! diff --git a/src/qp/QP_secant_driver.F b/src/qp/QP_secant_driver.F index 550a4140ca..aa4498cda5 100644 --- a/src/qp/QP_secant_driver.F +++ b/src/qp/QP_secant_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine QP_secant_driver(X,Xen,Xk,en,k,q,qp,Xw,Dip) ! diff --git a/src/qp/QP_states_simmetrize.F b/src/qp/QP_states_simmetrize.F index aca3667be5..f7bc4cbe5f 100644 --- a/src/qp/QP_states_simmetrize.F +++ b/src/qp/QP_states_simmetrize.F @@ -1,25 +1,12 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2007 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. +!@brief Enforce symmetry between degenerate states +! it may induce errors in case of accidental degeneracies ! subroutine QP_states_simmetrize(en,what,V_real,V_complex,state_is_2do,warn_me) ! diff --git a/src/qp/SC_project.dep b/src/qp/SC_project.dep index 07d8def6c0..21daf8ff57 100644 --- a/src/qp/SC_project.dep +++ b/src/qp/SC_project.dep @@ -1,4 +1,5 @@ QP_driver.o + QP_load_SC_xc.o QP_ppa_cohsex.o XCo_Hartree_Fock.o XCo_driver.o diff --git a/src/qp/XCo_Hartree_Fock.F b/src/qp/XCo_Hartree_Fock.F index f1259a593b..c1c7cde5ea 100644 --- a/src/qp/XCo_Hartree_Fock.F +++ b/src/qp/XCo_Hartree_Fock.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2007 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 ! subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) ! @@ -31,8 +15,9 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) use LIVE_t, ONLY:live_timing use stderr, ONLY:intc use electrons, ONLY:levels,spin_occ,spin - use parallel_int, ONLY:PP_redux_wait,PARALLEL_global_indexes,PARALLEL_WF_distribute,PARALLEL_WF_index - use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_IND_QP,& + use parallel_int, ONLY:PP_redux_wait,PARALLEL_global_indexes,PARALLEL_WF_distribute,PARALLEL_WF_index,& +& PARALLEL_index + use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_IND_QP,PP_indexes,PP_indexes_reset,PAR_COM_RL_INDEX,& & PAR_IND_QP_ID,PAR_IND_Q_ibz,PAR_IND_G_b,& & PAR_IND_Q_ibz_ID,n_WF_bands_to_load use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc @@ -61,15 +46,17 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) ! !Work Space ! - type(elemental_collision), target::isc,iscp - integer ::iq,iq_ibz,is_ibz,ib,ibp,jb,i_qp,Sx_lower_band,Sx_upper_band(2),n_lt_bands,n_lt_steps - complex(DP) ::DP_Sx, DP_Sx_l - complex(SP),allocatable ::local_rhotw(:) - character(schlen) ::ch,mode_ + type(elemental_collision), target :: isc,iscp + integer :: iq,iq_ibz,is_ibz,ib,ibp,jb,i_qp,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 + complex(SP), allocatable :: local_rhotw(:) + character(schlen) :: ch,mode_ + type(PP_indexes) :: px ! !QP list ! - integer :: ik,ikp,iGp,i_sp_pol + integer :: ik,ikp,iGp,i_sp_pol ! ! Resets & basis setup @@ -113,6 +100,13 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) ! endif ! + ! G-parallelism + ! + call PP_indexes_reset(px) + call PARALLEL_index(px,(/QP_ng_Sx/),COMM=PAR_COM_RL_INDEX,CONSECUTIVE=.true.) + ig_first=px%first_of_1D(PAR_COM_RL_INDEX%cpu_id+1) + ig_last=px%last_of_1D(PAR_COM_RL_INDEX%cpu_id+1) + ! call timing('HF',OPR='start') ! ch='EXS' @@ -155,7 +149,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,iGp,jb,DP_Sx_l), reduction(+:DP_sx) #endif ! call OPENMP_update(master_thread) @@ -165,7 +159,7 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) ! call elemental_collision_free(isc) call elemental_collision_free(iscp) - call elemental_collision_alloc(isc,NG=QP_ng_Sx,NG_GAMP=(/QP_ng_Sx,1/),TITLE="HF") + call elemental_collision_alloc(isc,NG=QP_ng_Sx,GAMP_NG=(/QP_ng_Sx,1/),TITLE="HF") call elemental_collision_alloc(iscp,NG=QP_ng_Sx,TITLE="HF") ! YAMBO_ALLOC(local_rhotw,(QP_ng_Sx)) @@ -248,8 +242,11 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) call dev_memcpy(DEV_VAR(iscp%rhotw),DEV_VAR(isc%rhotw)) endif ! + ! here isc%ngrho == QP_ng_Sx + ! DP_Sx_l=Vstar_dot_VV(isc%ngrho,DEV_VAR(iscp%rhotw),& -& DEV_VAR(isc%rhotw),DEV_VAR(isc%gamp)(:,1)) +& DEV_VAR(isc%rhotw),DEV_VAR(isc%gamp)(:,1),& +& BOUNDS=(/ig_first,ig_last/)) DP_Sx=DP_Sx + DP_Sx_l * ( -4._SP/spin_occ*pi*E%f(jb,ikp,i_sp_pol) ) ! if (master_thread.and.is_ibz==1.and.n_lt_steps>0) call live_timing(steps=1) @@ -278,6 +275,7 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) call elemental_collision_free(isc) call elemental_collision_free(iscp) YAMBO_FREE(local_rhotw) + call PP_indexes_reset(px) ! call timing('HF',OPR='stop') call timing('HF(REDUX)',OPR='start') diff --git a/src/qp/XCo_driver.F b/src/qp/XCo_driver.F index b3c40e242b..618a76b332 100644 --- a/src/qp/XCo_driver.F +++ b/src/qp/XCo_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2009 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 ! subroutine XCo_driver(E,k,Xk,q) ! diff --git a/src/qp/XCo_local.F b/src/qp/XCo_local.F index 76520553e6..c38222e995 100644 --- a/src/qp/XCo_local.F +++ b/src/qp/XCo_local.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2007 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. -! -! 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 DS ! subroutine XCo_local(E,Xk) ! diff --git a/src/qp/XCo_report.F b/src/qp/XCo_report.F index 7bfcd4acc9..79f20cfa2b 100644 --- a/src/qp/XCo_report.F +++ b/src/qp/XCo_report.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2019 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 ! subroutine XCo_report(qp,E,k) ! diff --git a/src/qp_control/.objects b/src/qp_control/.objects index d49d47505b..9f3239f0f4 100644 --- a/src/qp_control/.objects +++ b/src/qp_control/.objects @@ -1,4 +1,7 @@ +#if defined _ELPH +PH_objs= QP_load_GFs.o +#endif objs= QP_apply.o QP_load_DB.o QP_apply_QP.o QP_apply_interpolate_QP.o QP_apply_the_ACTION.o \ QP_fit_energies.o QP_fit_widths.o QP_fit_report.o QP_eval_the_FIT.o \ QP_apply_dump_user_CTLs.o \ - QP_DBs_add_me.o QP_DBs_merge.o QP_DB_message.o QP_load_GFs.o + QP_DBs_add_me.o QP_DBs_merge.o QP_DB_message.o $(PH_objs) diff --git a/src/qp_control/QP_DB_message.F b/src/qp_control/QP_DB_message.F index 9b15bd8420..94b3856dc0 100644 --- a/src/qp_control/QP_DB_message.F +++ b/src/qp_control/QP_DB_message.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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 ! subroutine QP_DB_message( i_ACTION, qp ) ! diff --git a/src/qp_control/QP_DBs_add_me.F b/src/qp_control/QP_DBs_add_me.F index bf667773ee..4fe9dff5ca 100644 --- a/src/qp_control/QP_DBs_add_me.F +++ b/src/qp_control/QP_DBs_add_me.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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 ! subroutine QP_DBs_add_me(qp_base,qp2add,plan_EWZG,SAME_states,SAME_desc,OP,PRE_FAC) ! diff --git a/src/qp_control/QP_DBs_merge.F b/src/qp_control/QP_DBs_merge.F index 664126f3af..832876128c 100644 --- a/src/qp_control/QP_DBs_merge.F +++ b/src/qp_control/QP_DBs_merge.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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 ! subroutine QP_DBs_merge(n_dbs,qp2merge,plan_EWZG,n_GROUNDS,qp,OP,PRE_FAC,FILES) ! diff --git a/src/qp_control/QP_apply.F b/src/qp_control/QP_apply.F index 8735a11193..72edeab47d 100644 --- a/src/qp_control/QP_apply.F +++ b/src/qp_control/QP_apply.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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. -! -! 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 DS ! subroutine QP_apply(bands,en,k,object,msg_fmt,qp_impose,QP_ctl_impose,main_section) ! diff --git a/src/qp_control/QP_apply_QP.F b/src/qp_control/QP_apply_QP.F index 9b12ac92d4..bdad104a36 100644 --- a/src/qp_control/QP_apply_QP.F +++ b/src/qp_control/QP_apply_QP.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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 ! subroutine QP_apply_QP(i_ACTION,bands,en,k,qp) ! diff --git a/src/qp_control/QP_apply_dump_user_CTLs.F b/src/qp_control/QP_apply_dump_user_CTLs.F index 7aec714fe3..a32d31c7e1 100644 --- a/src/qp_control/QP_apply_dump_user_CTLs.F +++ b/src/qp_control/QP_apply_dump_user_CTLs.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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 ! subroutine QP_apply_dump_user_CTLs( E, object ) ! diff --git a/src/qp_control/QP_apply_interpolate_QP.F b/src/qp_control/QP_apply_interpolate_QP.F index 8f6561fabf..517678adc5 100644 --- a/src/qp_control/QP_apply_interpolate_QP.F +++ b/src/qp_control/QP_apply_interpolate_QP.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 DS ! subroutine QP_apply_interpolate_QP(i_ACTION,bands,en,k,qp) ! @@ -264,7 +248,9 @@ subroutine QP_transfer_nearest(action_kind) ! if (QP_action(i_ACTION)%plan(3)) then if(action_kind=="Stnd_Gd") en%Z(iband,ik,i_spin)=qp%Z(i_qp) + !DEBUG> !if(action_kind=="Fine_Gd") en%Z_FineGd(iband,ik_fg,i_spin)=qp%Z(i_qp) + !DEBUG< if(action_kind=="Stnd_Gd") QP_action(i_ACTION)%STATES_done(iband,ik,i_spin)=1 endif ! diff --git a/src/qp_control/QP_apply_the_ACTION.F b/src/qp_control/QP_apply_the_ACTION.F index af34710595..eb20ab577d 100644 --- a/src/qp_control/QP_apply_the_ACTION.F +++ b/src/qp_control/QP_apply_the_ACTION.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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 ! subroutine QP_apply_the_ACTION(i_ACTION,bands,E,k) ! diff --git a/src/qp_control/QP_eval_the_FIT.F b/src/qp_control/QP_eval_the_FIT.F index fb83ce46c0..825fe581c7 100644 --- a/src/qp_control/QP_eval_the_FIT.F +++ b/src/qp_control/QP_eval_the_FIT.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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 ! complex(SP) function QP_eval_the_FIT(i_ACTION,i_sp_pol,Energy,E_ref_in,bands,E,k,what,is_valence) ! diff --git a/src/qp_control/QP_fit_energies.F b/src/qp_control/QP_fit_energies.F index 091375e550..bb28ec6efd 100644 --- a/src/qp_control/QP_fit_energies.F +++ b/src/qp_control/QP_fit_energies.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! subroutine QP_fit_energies(i_ACTION,bands,en,qp) ! diff --git a/src/qp_control/QP_fit_report.F b/src/qp_control/QP_fit_report.F index 2ee5f9bc10..a42d64a752 100644 --- a/src/qp_control/QP_fit_report.F +++ b/src/qp_control/QP_fit_report.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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 ! subroutine QP_fit_report(i_ACTION,bands,en,k,qp) ! @@ -99,7 +83,7 @@ subroutine QP_fit_report(i_ACTION,bands,en,k,qp) call msg(' r',' (FIT, actual) ',fit_scissor*HA2EV,"[eV]") endif ! - if (any(E/=(/0._SP,1._SP,0._SP,1._SP/))) then + if (any(E/=(/10._SP,10._SP,10._SP,10._SP/))) then call msg(' r',' Energies 0th order ',(/E(1),E(3)/)*HA2EV,"[eV]") call msg(' r',' Energies 1st order ',(/E(2),E(4)/)) if (any((/E_err/=0._SP/)))then diff --git a/src/qp_control/QP_fit_widths.F b/src/qp_control/QP_fit_widths.F index 4fcc9b7228..4eb890ff70 100644 --- a/src/qp_control/QP_fit_widths.F +++ b/src/qp_control/QP_fit_widths.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 DS ! subroutine QP_fit_widths(i_ACTION,bands,en,k,qp) ! diff --git a/src/qp_control/QP_load_DB.F b/src/qp_control/QP_load_DB.F index c38121035b..92f991f6e6 100644 --- a/src/qp_control/QP_load_DB.F +++ b/src/qp_control/QP_load_DB.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine QP_load_DB(i_ACTION,bands,en,k) ! diff --git a/src/qp_control/QP_load_GFs.F b/src/qp_control/QP_load_GFs.F index 1926d60839..fad6bfd6e9 100644 --- a/src/qp_control/QP_load_GFs.F +++ b/src/qp_control/QP_load_GFs.F @@ -1,27 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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) 2009 The Yambo Team ! -#if defined _ELPH +! Authors (see AUTHORS file for details): AM ! subroutine QP_load_GFs(bands,qp,E) ! @@ -55,5 +37,3 @@ subroutine QP_load_GFs(bands,qp,E) enddo ! end subroutine -! -#endif diff --git a/src/real_time_control/.objects b/src/real_time_control/.objects index 499c811488..52d48c2a5e 100644 --- a/src/real_time_control/.objects +++ b/src/real_time_control/.objects @@ -1,3 +1,4 @@ +#if defined _RT objs = RT_alloc.o RT_free.o RT_Dynamics_is_over.o RT_RESTART_database_copy.o $(debug_objs) RT_do_it.o RT_current_AND_polarization.o \ 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 \ @@ -7,3 +8,4 @@ objs = RT_alloc.o RT_free.o RT_Dynamics_is_over.o RT_RESTART_database_copy.o $(d 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 +#endif diff --git a/src/real_time_control/ELPH_project.dep b/src/real_time_control/ELPH_project.dep index d760254f55..d3d4f93639 100644 --- a/src/real_time_control/ELPH_project.dep +++ b/src/real_time_control/ELPH_project.dep @@ -1,2 +1,3 @@ + RT_alloc.o RT_free.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_control/RT_Dynamics_is_over.F b/src/real_time_control/RT_Dynamics_is_over.F index d66845254b..13cc0d576a 100644 --- a/src/real_time_control/RT_Dynamics_is_over.F +++ b/src/real_time_control/RT_Dynamics_is_over.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! logical function RT_Dynamics_is_over() ! 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..b7b1142f35 100644 --- a/src/real_time_control/RT_Fluence_and_PI_kind.F +++ b/src/real_time_control/RT_Fluence_and_PI_kind.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! 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 DS ! subroutine RT_Fluence_and_PI_kind(En,i_field) ! diff --git a/src/real_time_control/RT_Lifetimes_merge_driver.F b/src/real_time_control/RT_Lifetimes_merge_driver.F index cac6c86608..562ce96771 100644 --- a/src/real_time_control/RT_Lifetimes_merge_driver.F +++ b/src/real_time_control/RT_Lifetimes_merge_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine RT_Lifetimes_merge_driver(what) ! diff --git a/src/real_time_control/RT_Lifetimes_merge_inter_k.F b/src/real_time_control/RT_Lifetimes_merge_inter_k.F index 8477b82492..b6155e401f 100644 --- a/src/real_time_control/RT_Lifetimes_merge_inter_k.F +++ b/src/real_time_control/RT_Lifetimes_merge_inter_k.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine RT_Lifetimes_merge_inter_k(LIFE) ! diff --git a/src/real_time_control/RT_Lifetimes_merge_intra_k.F b/src/real_time_control/RT_Lifetimes_merge_intra_k.F index 1dd4eece3e..4afff6ec7a 100644 --- a/src/real_time_control/RT_Lifetimes_merge_intra_k.F +++ b/src/real_time_control/RT_Lifetimes_merge_intra_k.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine RT_Lifetimes_merge_intra_k(LIFE) ! diff --git a/src/real_time_control/RT_Observables.F b/src/real_time_control/RT_Observables.F index 414244fc65..8b3e250b0d 100644 --- a/src/real_time_control/RT_Observables.F +++ b/src/real_time_control/RT_Observables.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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. +! Copyright (C) 2009 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 CA DS ! subroutine RT_Observables(en,k,dG_lesser,OBSERVABLES) ! diff --git a/src/real_time_control/RT_RESTART_database_copy.F b/src/real_time_control/RT_RESTART_database_copy.F index 804fb17bef..f537da4900 100644 --- a/src/real_time_control/RT_RESTART_database_copy.F +++ b/src/real_time_control/RT_RESTART_database_copy.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM 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. +! Copyright (C) 2020 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. -! -! 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 CA ! subroutine RT_RESTART_database_copy(db) ! diff --git a/src/real_time_control/RT_Rabi_frequency.F b/src/real_time_control/RT_Rabi_frequency.F index fddb30067c..5c6688ab4c 100644 --- a/src/real_time_control/RT_Rabi_frequency.F +++ b/src/real_time_control/RT_Rabi_frequency.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! 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): DS ! function RT_Rabi_frequency(En,i_field,l_print_rabi) ! 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 22aa86154d..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 @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! 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): DS ! subroutine RT_Rabi_frequency_ALL_and_print(En,i_field) ! diff --git a/src/real_time_control/RT_SCATT_project.dep b/src/real_time_control/RT_SCATT_project.dep deleted file mode 100644 index 7561c1d5d6..0000000000 --- a/src/real_time_control/RT_SCATT_project.dep +++ /dev/null @@ -1,3 +0,0 @@ - RT_databases_IO.o - RT_free.o - diff --git a/src/real_time_control/RT_alloc.F b/src/real_time_control/RT_alloc.F index 71c170a436..8bcbeb55a9 100644 --- a/src/real_time_control/RT_alloc.F +++ b/src/real_time_control/RT_alloc.F @@ -1,31 +1,17 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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 ! subroutine RT_alloc(en,what) ! use pars, ONLY:SP,cZERO use parallel_m, ONLY:PAR_G_k_range +#if defined _ELPH || defined _PHEL use ELPH, ONLY:elph_branches +#endif use drivers, ONLY:l_use_Hxc_collisions use hamiltonian, ONLY:H_alloc,H_QP_table_setup use FFT_m, ONLY:fft_size @@ -58,7 +44,9 @@ subroutine RT_alloc(en,what) ! if (RT_is_dynamically_dephased) then call RT_EL_lifetimes_alloc(RT_bands,RT_nk) +#if defined _PHEL call RT_PH_lifetimes_alloc(elph_branches,nqibz) +#endif endif ! nk=PAR_G_k_range @@ -73,7 +61,9 @@ subroutine RT_alloc(en,what) ! if( l_all .or. l_carriers) then call RT_EL_occupations_alloc(RT_bands,RT_nk) +#if defined _ELPH || defined _PHEL call RT_PH_occupations_alloc(elph_branches,nqibz) +#endif endif ! if (l_all) then diff --git a/src/real_time_control/RT_apply.F b/src/real_time_control/RT_apply.F index b51710ec1b..0da8e40a41 100644 --- a/src/real_time_control/RT_apply.F +++ b/src/real_time_control/RT_apply.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 DS ! subroutine RT_apply(bands,E,K,what,VERBOSE,IO_COM,Time,keep_RT_carriers,TIMES_ONLY,skip_interpolation) ! diff --git a/src/real_time_control/RT_average_operator.F b/src/real_time_control/RT_average_operator.F index 083dc1cbb7..51537b9635 100644 --- a/src/real_time_control/RT_average_operator.F +++ b/src/real_time_control/RT_average_operator.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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. +! Copyright (C) 2009 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 CA DS ! subroutine RT_average_operator(N_V,O_VALUE,V_VALUE,O_REAL,O_QP,O_MATRIX,& & V_MATRIX,PV_MATRIX,G,k,en,TRANS,Double_Grid,nK_mem) diff --git a/src/real_time_control/RT_carriers_number.F b/src/real_time_control/RT_carriers_number.F index 62683f6a73..2af013e03d 100644 --- a/src/real_time_control/RT_carriers_number.F +++ b/src/real_time_control/RT_carriers_number.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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): DS AM ! subroutine RT_carriers_number(en,k,Ncarr) ! diff --git a/src/real_time_control/RT_carriers_object.F b/src/real_time_control/RT_carriers_object.F index 6136549445..d736640658 100644 --- a/src/real_time_control/RT_carriers_object.F +++ b/src/real_time_control/RT_carriers_object.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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. -! -! 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): DS AM ! subroutine RT_carriers_object(RT,E,K,DB_id,WHAT) ! diff --git a/src/real_time_control/RT_carriers_temperature.F b/src/real_time_control/RT_carriers_temperature.F index 2c0b1d82b1..8cc014344c 100644 --- a/src/real_time_control/RT_carriers_temperature.F +++ b/src/real_time_control/RT_carriers_temperature.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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): DS AM ! subroutine RT_carriers_temperature(Tfit,EfFit) ! diff --git a/src/real_time_control/RT_current_AND_polarization.F b/src/real_time_control/RT_current_AND_polarization.F index ce14defc13..c6a039bf83 100644 --- a/src/real_time_control/RT_current_AND_polarization.F +++ b/src/real_time_control/RT_current_AND_polarization.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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. +! Copyright (C) 2009 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 CA DS ! subroutine RT_current_AND_polarization(k,E,G_input,A_input,Ncarr) ! diff --git a/src/real_time_control/RT_databases_IO.F b/src/real_time_control/RT_databases_IO.F index 776c4eef46..24f4aa0be0 100644 --- a/src/real_time_control/RT_databases_IO.F +++ b/src/real_time_control/RT_databases_IO.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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. +! Copyright (C) 2009 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 CA DS ! subroutine RT_databases_IO(E,DO_IT) ! diff --git a/src/real_time_control/RT_do_it.F b/src/real_time_control/RT_do_it.F index b6ae0a3201..51bdceb469 100644 --- a/src/real_time_control/RT_do_it.F +++ b/src/real_time_control/RT_do_it.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! logical function RT_do_it(what) ! diff --git a/src/real_time_control/RT_energy_components.F b/src/real_time_control/RT_energy_components.F index 8d4082134b..f37fcf6c83 100644 --- a/src/real_time_control/RT_energy_components.F +++ b/src/real_time_control/RT_energy_components.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CA 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. +! Copyright (C) 2017 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): CA AM DS ! subroutine RT_energy_components(en,k,dG_lesser,Energies,dE_IP,what) ! diff --git a/src/real_time_control/RT_entropy.F b/src/real_time_control/RT_entropy.F index 6924a65e07..5f54f0c15f 100644 --- a/src/real_time_control/RT_entropy.F +++ b/src/real_time_control/RT_entropy.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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): DS ! subroutine RT_entropy(en,k,dG_lesser,Entr,TEntr,EnEntr,E_IP) ! diff --git a/src/real_time_control/RT_free.F b/src/real_time_control/RT_free.F index c9aa1498f0..68839fc3eb 100644 --- a/src/real_time_control/RT_free.F +++ b/src/real_time_control/RT_free.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine RT_free( ) ! @@ -27,8 +11,8 @@ subroutine RT_free( ) use DIPOLES, ONLY:DIP_alloc #if defined _ELPH use interfaces, ONLY:ELPH_alloc -#endif use ELPH, ONLY:Q_io_map,GKKP_ep_sq,GKKP_pe_sq +#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,& @@ -88,9 +72,11 @@ subroutine RT_free( ) YAMBO_FREE(rho_reference) YAMBO_FREE(magn_reference) YAMBO_FREE(RT_Deph_Matrix) - YAMBO_FREE(Q_io_map) ! #if defined _ELPH + ! + YAMBO_FREE(Q_io_map) + ! call ELPH_alloc('FREE',GKKP=GKKP_ep_sq) call ELPH_alloc('FREE',GKKP=GKKP_pe_sq) #endif diff --git a/src/real_time_control/RT_interpolation_doit_and_transfer.F b/src/real_time_control/RT_interpolation_doit_and_transfer.F index a3bbeb156d..f29bdb0a26 100644 --- a/src/real_time_control/RT_interpolation_doit_and_transfer.F +++ b/src/real_time_control/RT_interpolation_doit_and_transfer.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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): DS AM ! subroutine RT_interpolation_doit_and_transfer(OBJ,K,E,nb,l_B,N_carriers,df_Max,dE_Max) ! diff --git a/src/real_time_control/RT_interpolation_driver.F b/src/real_time_control/RT_interpolation_driver.F index b64a0f4cdb..8bc70e67eb 100644 --- a/src/real_time_control/RT_interpolation_driver.F +++ b/src/real_time_control/RT_interpolation_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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): DS AM ! subroutine RT_interpolation_driver(bands,E,K,what,Time,l_f,l_E,l_W,l_B,NN,VERB) ! diff --git a/src/real_time_control/RT_k_grid.F b/src/real_time_control/RT_k_grid.F index 0044698b5f..c4e59b4090 100644 --- a/src/real_time_control/RT_k_grid.F +++ b/src/real_time_control/RT_k_grid.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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 DS ! subroutine RT_k_grid(E,k,q) ! diff --git a/src/real_time_control/RT_mean_lifetimes_and_temperatures.F b/src/real_time_control/RT_mean_lifetimes_and_temperatures.F index c57e2766bf..b2a3c9d63d 100644 --- a/src/real_time_control/RT_mean_lifetimes_and_temperatures.F +++ b/src/real_time_control/RT_mean_lifetimes_and_temperatures.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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 DS ! subroutine RT_mean_lifetimes_and_temperatures( LIFE, LIFE_ref ) ! diff --git a/src/real_time_control/RT_occupations_FIT.F b/src/real_time_control/RT_occupations_FIT.F index 0c81f3cf6a..bc7d36a77a 100644 --- a/src/real_time_control/RT_occupations_FIT.F +++ b/src/real_time_control/RT_occupations_FIT.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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. -! -! 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): DS ! subroutine RT_occupations_FIT(T_fit,Ef_fit,Occ_bk) ! diff --git a/src/real_time_control/RT_output.F b/src/real_time_control/RT_output.F index c604134097..1bd1c9825a 100644 --- a/src/real_time_control/RT_output.F +++ b/src/real_time_control/RT_output.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CA 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. +! Copyright (C) 2010 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. -! -! 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): CA AM ! subroutine RT_output(what,VALUES,TIME,E) ! diff --git a/src/real_time_control/RT_output_INIT.F b/src/real_time_control/RT_output_INIT.F index 8580f48741..28b046518f 100644 --- a/src/real_time_control/RT_output_INIT.F +++ b/src/real_time_control/RT_output_INIT.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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. -! -! 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 ! subroutine RT_output_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 4f565ca5b2..d6482a0585 100644 --- a/src/real_time_control/RT_output_and_IO_driver.F +++ b/src/real_time_control/RT_output_and_IO_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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): DS ! subroutine RT_output_and_IO_driver(what,E,k,OBSERVABLES) ! diff --git a/src/real_time_control/RT_project.dep b/src/real_time_control/RT_project.dep index 887d2d1d28..db06478179 100644 --- a/src/real_time_control/RT_project.dep +++ b/src/real_time_control/RT_project.dep @@ -1,2 +1,31 @@ + RT_Dynamics_is_over.o + RT_Fluence_and_PI_kind.o + RT_Lifetimes_merge_driver.o + RT_Lifetimes_merge_inter_k.o + RT_Lifetimes_merge_intra_k.o + RT_Observables.o + RT_RESTART_database_copy.o + RT_Rabi_frequency.o + RT_Rabi_frequency_ALL_and_print.o + RT_alloc.o + RT_apply.o + RT_average_operator.o + RT_carriers_number.o + RT_carriers_object.o + RT_carriers_temperature.o + RT_current_AND_polarization.o + RT_databases_IO.o + RT_do_it.o + RT_energy_components.o + RT_entropy.o + RT_free.o + RT_interpolation_doit_and_transfer.o + RT_interpolation_driver.o + RT_k_grid.o + RT_mean_lifetimes_and_temperatures.o + RT_occupations_FIT.o RT_output.o + RT_output_INIT.o + RT_output_and_IO_driver.o + RT_update_TIME_CONF_descriptions.o diff --git a/src/real_time_control/RT_update_TIME_CONF_descriptions.F b/src/real_time_control/RT_update_TIME_CONF_descriptions.F index 4af4670b75..eaa8bfa673 100644 --- a/src/real_time_control/RT_update_TIME_CONF_descriptions.F +++ b/src/real_time_control/RT_update_TIME_CONF_descriptions.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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. -! -! 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 ! subroutine RT_update_TIME_CONF_descriptions( ) ! diff --git a/src/real_time_drivers/.objects b/src/real_time_drivers/.objects index 8e8911ce1a..ff3ee963b7 100644 --- a/src/real_time_drivers/.objects +++ b/src/real_time_drivers/.objects @@ -1,5 +1,4 @@ #if defined _RT_SCATT -objs = RT_driver.o RT_relaxation.o -#else -objs = RT_driver.o RT_empty_driver.o +RT_scatt_objs = RT_relaxation.o #endif +objs = RT_driver.o $(RT_scatt_objs) diff --git a/src/real_time_drivers/DOUBLE_project.dep b/src/real_time_drivers/DOUBLE_project.dep index 140f2e27fa..1076785588 100644 --- a/src/real_time_drivers/DOUBLE_project.dep +++ b/src/real_time_drivers/DOUBLE_project.dep @@ -1,4 +1,3 @@ RT_driver.o - RT_empty_driver.o RT_relaxation.o diff --git a/src/real_time_drivers/RT_SCATT_project.dep b/src/real_time_drivers/RT_SCATT_project.dep index 22012fe59b..1076785588 100644 --- a/src/real_time_drivers/RT_SCATT_project.dep +++ b/src/real_time_drivers/RT_SCATT_project.dep @@ -1,2 +1,3 @@ + RT_driver.o RT_relaxation.o diff --git a/src/real_time_drivers/RT_driver.F b/src/real_time_drivers/RT_driver.F index 3bb55f4d2e..0cee2fcd2b 100644 --- a/src/real_time_drivers/RT_driver.F +++ b/src/real_time_drivers/RT_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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) 2006 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. -! -! 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 CA DS ! subroutine RT_driver(E,X,k,q,Dip) ! @@ -223,6 +207,7 @@ subroutine RT_driver(E,X,k,q,Dip) ! ! Reference lifetimes and/or G_lesser !===================================== +#if defined _RT_SCATT ! if (NE_i_start_time==1) then ! @@ -241,6 +226,8 @@ subroutine RT_driver(E,X,k,q,Dip) ! endif ! +#endif + ! l_initial_equilibrium=.FALSE. ! ! Qindx_X and Qindx_S not needed in real-time they are used only in dipoles and collisions calculations @@ -297,7 +284,9 @@ subroutine RT_driver(E,X,k,q,Dip) ! ! Calculate all relaxation and dissipation terms !=============================================== +#if defined _RT_SCATT call RT_relaxation(E,k,q,NE_time) +#endif ! ! Write DBs and output !===================== diff --git a/src/real_time_drivers/RT_empty_driver.F b/src/real_time_drivers/RT_empty_driver.F deleted file mode 100644 index 0217293cab..0000000000 --- a/src/real_time_drivers/RT_empty_driver.F +++ /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. -! -subroutine RT_relaxation(E,k,q,Time) - ! - use pars, ONLY:SP - use electrons, ONLY:levels - use R_lattice, ONLY:bz_samp - ! - implicit none - ! - type(levels), intent(inout) :: E - type(bz_samp), intent(in) :: k,q - real(SP), intent(in) :: Time - ! - return - ! -end subroutine RT_relaxation diff --git a/src/real_time_drivers/RT_relaxation.F b/src/real_time_drivers/RT_relaxation.F index de42d82f13..f41bffff5c 100644 --- a/src/real_time_drivers/RT_relaxation.F +++ b/src/real_time_drivers/RT_relaxation.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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. -! -! 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 ! subroutine RT_relaxation(E,k,q,Time) ! diff --git a/src/real_time_hamiltonian/.objects b/src/real_time_hamiltonian/.objects index 071044de3c..2574475c03 100644 --- a/src/real_time_hamiltonian/.objects +++ b/src/real_time_hamiltonian/.objects @@ -1 +1,3 @@ +#if defined _RT objs = RT_Hamiltonian.o RT_Hamiltonian_diagonalize.o RT_apply_field.o +#endif diff --git a/src/real_time_hamiltonian/RT_Hamiltonian.F b/src/real_time_hamiltonian/RT_Hamiltonian.F index 4df9e43ba0..550c99009d 100644 --- a/src/real_time_hamiltonian/RT_Hamiltonian.F +++ b/src/real_time_hamiltonian/RT_Hamiltonian.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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. +! Copyright (C) 2009 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 CA DS ! subroutine RT_Hamiltonian(dG_in,A_input,E,k) ! diff --git a/src/real_time_hamiltonian/RT_Hamiltonian_diagonalize.F b/src/real_time_hamiltonian/RT_Hamiltonian_diagonalize.F index f1ddae7a54..ccdbe629ee 100644 --- a/src/real_time_hamiltonian/RT_Hamiltonian_diagonalize.F +++ b/src/real_time_hamiltonian/RT_Hamiltonian_diagonalize.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, DS +! Copyright (C) 2018 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. -! -! 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. +! Authors (see AUTHORS file for details): AM DS ! subroutine RT_Hamiltonian_diagonalize(E,k,BGR,A_input) ! diff --git a/src/real_time_hamiltonian/RT_apply_field.F b/src/real_time_hamiltonian/RT_apply_field.F index dca837c804..d8a87b39c1 100644 --- a/src/real_time_hamiltonian/RT_apply_field.F +++ b/src/real_time_hamiltonian/RT_apply_field.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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. +! Copyright (C) 2010 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 CA DS ! subroutine RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) ! diff --git a/src/real_time_hamiltonian/RT_project.dep b/src/real_time_hamiltonian/RT_project.dep new file mode 100644 index 0000000000..bb99b1bcd7 --- /dev/null +++ b/src/real_time_hamiltonian/RT_project.dep @@ -0,0 +1,4 @@ + RT_Hamiltonian.o + RT_Hamiltonian_diagonalize.o + RT_apply_field.o + diff --git a/src/real_time_initialize/.objects b/src/real_time_initialize/.objects index cca402ff0f..7f63c40398 100644 --- a/src/real_time_initialize/.objects +++ b/src/real_time_initialize/.objects @@ -1,10 +1,8 @@ -#if !defined _RT_SCATT -RT_scatt=RT_empty.o -#endif -#if defined _PHEL || defined _RT -PH_objs = RT_occupations_and_levels_init.o +#if defined _RT && defined _ELPH +ELPH_objs = RT_ELPH_initialize.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_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 #endif -objs = $(PH_objs) $(RT_objs) $(RT_scatt) +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 6c52e6b757..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_empty.o RT_initialize.o RT_occupations_and_levels_init.o RT_occupations_update.o diff --git a/src/real_time_initialize/ELPH_project.dep b/src/real_time_initialize/ELPH_project.dep index dcd895256e..5bb91066cc 100644 --- a/src/real_time_initialize/ELPH_project.dep +++ b/src/real_time_initialize/ELPH_project.dep @@ -1,2 +1,3 @@ RT_initialize.o + RT_occupations_and_levels_init.o diff --git a/src/real_time_initialize/PHEL_project.dep b/src/real_time_initialize/PHEL_project.dep index dcd895256e..5bb91066cc 100644 --- a/src/real_time_initialize/PHEL_project.dep +++ b/src/real_time_initialize/PHEL_project.dep @@ -1,2 +1,3 @@ RT_initialize.o + RT_occupations_and_levels_init.o diff --git a/src/real_time_initialize/RT_Dephasing_Matrix.F b/src/real_time_initialize/RT_Dephasing_Matrix.F index 920f1d1038..e927355388 100644 --- a/src/real_time_initialize/RT_Dephasing_Matrix.F +++ b/src/real_time_initialize/RT_Dephasing_Matrix.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2011 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 DS ! subroutine RT_Dephasing_Matrix(E) ! diff --git a/src/real_time_initialize/RT_ELPH_initialize.F b/src/real_time_initialize/RT_ELPH_initialize.F index f6cb63ab81..143c94a44a 100644 --- a/src/real_time_initialize/RT_ELPH_initialize.F +++ b/src/real_time_initialize/RT_ELPH_initialize.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine RT_ELPH_initialize(E,k,q) ! diff --git a/src/real_time_initialize/RT_Field_Commensurable_Frequencies.F b/src/real_time_initialize/RT_Field_Commensurable_Frequencies.F index bed073048c..357cde4366 100644 --- a/src/real_time_initialize/RT_Field_Commensurable_Frequencies.F +++ b/src/real_time_initialize/RT_Field_Commensurable_Frequencies.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2011 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 ! subroutine RT_Field_Commensurable_Frequencies() ! diff --git a/src/real_time_initialize/RT_G_lesser_init.F b/src/real_time_initialize/RT_G_lesser_init.F index 752fc246cc..6a0edfd630 100644 --- a/src/real_time_initialize/RT_G_lesser_init.F +++ b/src/real_time_initialize/RT_G_lesser_init.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 ! subroutine RT_G_lesser_init( ) ! diff --git a/src/real_time_initialize/RT_SCATT_project.dep b/src/real_time_initialize/RT_SCATT_project.dep index ab3b8cd3d8..4a744bb46a 100644 --- a/src/real_time_initialize/RT_SCATT_project.dep +++ b/src/real_time_initialize/RT_SCATT_project.dep @@ -1,4 +1,3 @@ - RT_ELPH_initialize.o RT_initialize.o RT_start_and_restart.o diff --git a/src/real_time_initialize/RT_empty.F b/src/real_time_initialize/RT_empty.F deleted file mode 100644 index 9893fa3966..0000000000 --- a/src/real_time_initialize/RT_empty.F +++ /dev/null @@ -1,50 +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. -! -integer function RT_Lifetimes_evaluation_plan( ) - ! - return - ! -end function RT_Lifetimes_evaluation_plan -! -subroutine RT_ELPH_initialize(E,k,q) - ! - use electrons, ONLY:levels - use R_lattice, ONLY:bz_samp - ! - type(levels) :: E - type(bz_samp),intent(in) :: k,q - ! -end subroutine RT_ELPH_initialize -! -subroutine RT_ELPH_zeroing() - ! - return - ! -end subroutine RT_ELPH_zeroing -! -subroutine RT_relaxation_logicals( ) - ! - return - ! -end subroutine RT_relaxation_logicals diff --git a/src/real_time_initialize/RT_initialize.F b/src/real_time_initialize/RT_initialize.F index b7f288e7a4..886c8157f6 100644 --- a/src/real_time_initialize/RT_initialize.F +++ b/src/real_time_initialize/RT_initialize.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): -! -! 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) 2009 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. -! -! 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): ! subroutine RT_initialize(E,k,q) ! @@ -78,7 +62,9 @@ subroutine RT_initialize(E,k,q) 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 +#if defined _RT_SCATT integer, external :: RT_Lifetimes_evaluation_plan +#endif ! ! Logicals !========== @@ -343,8 +329,12 @@ subroutine RT_initialize(E,k,q) ! RT_is_dynamically_dephased=l_elel_scatt.or.l_elph_scatt.or.l_elphoton_scatt.or.l_phel_scatt ! +#if defined _RT_SCATT if ( RT_is_dynamically_dephased) N_T_samplings = RT_Lifetimes_evaluation_plan( ) if (.not.RT_is_dynamically_dephased) N_T_samplings = 0 +#else + N_T_samplings = 0 +#endif ! call RT_adjust_equilibrium() ! 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 bdd9734709..698ff51556 100644 --- a/src/real_time_initialize/RT_occupations_and_levels_init.F +++ b/src/real_time_initialize/RT_occupations_and_levels_init.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 FP ! subroutine RT_occupations_and_levels_init(bands,E,k,q,k_FG,E_FG) ! @@ -30,7 +14,9 @@ subroutine RT_occupations_and_levels_init(bands,E,k,q,k_FG,E_FG) use parallel_m, ONLY:PAR_COM_Xk_ibz_INDEX,PAR_IND_Xk_ibz use parallel_int, ONLY:PP_redux_wait use real_time, ONLY:RT_bands,RT_levels,RT_is_dynamically_dephased,RT_nk +#if defined _ELPH || defined _PHEL use ELPH, ONLY:PH_freqs_sq,PH_Q_modulus,PH_acoustic_branch,l_GKKP_expanded_DB_exists,l_GKKP_DB_exists +#endif use R_lattice, ONLY:bz_samp,bz_fine_grid use electrons, ONLY:levels,spin_occ,E_fine_grid,n_sp_pol ! @@ -133,6 +119,7 @@ subroutine RT_occupations_and_levels_init(bands,E,k,q,k_FG,E_FG) enddo enddo ! +#if defined _ELPH || defined _PHEL ! Ph Occupations !================ if (RT_ph_occ%active) then @@ -150,6 +137,7 @@ subroutine RT_occupations_and_levels_init(bands,E,k,q,k_FG,E_FG) enddo enddo endif +#endif ! #if defined _RT call PP_redux_wait(RT_el_occ%N,COMM=PAR_COM_Xk_ibz_INDEX%COMM) diff --git a/src/real_time_initialize/RT_occupations_update.F b/src/real_time_initialize/RT_occupations_update.F index 21e249504c..6c1ceb6304 100644 --- a/src/real_time_initialize/RT_occupations_update.F +++ b/src/real_time_initialize/RT_occupations_update.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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 ! subroutine RT_occupations_update( ) ! diff --git a/src/real_time_initialize/RT_project.dep b/src/real_time_initialize/RT_project.dep index d8981c43ea..7d13d8b4e4 100644 --- a/src/real_time_initialize/RT_project.dep +++ b/src/real_time_initialize/RT_project.dep @@ -1,2 +1,8 @@ + RT_Dephasing_Matrix.o + RT_Field_Commensurable_Frequencies.o + RT_G_lesser_init.o + RT_initialize.o RT_occupations_and_levels_init.o + RT_occupations_update.o + RT_start_and_restart.o diff --git a/src/real_time_initialize/RT_start_and_restart.F b/src/real_time_initialize/RT_start_and_restart.F index 52c5926941..53ccd06e63 100644 --- a/src/real_time_initialize/RT_start_and_restart.F +++ b/src/real_time_initialize/RT_start_and_restart.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM 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. +! Copyright (C) 2009 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 CA ! subroutine RT_start_and_restart(E,k,q) ! @@ -75,7 +59,9 @@ subroutine RT_start_and_restart(E,k,q) ! integer :: i_mem,i_sp_pol,ik,IO_ACT,nt,i_db,io_err(N_RT_databases),COM_MODE,ib,iE_fg,ik_RT integer, external :: io_RT_components +#if defined _RT_SCATT integer, external :: RT_Lifetimes_evaluation_plan +#endif logical :: RESTART ! ! Initialize the Gf, potentials, levels and occupations @@ -146,8 +132,11 @@ subroutine RT_start_and_restart(E,k,q) ! 3. The REFERENCE -> G_lesser_ref ! RESTART = io_err(RT_return_db_ID("G_lesser_RESTART"))==0.and.& -& io_err(RT_return_db_ID("OBSERVABLES"))==0.and.& -& io_err(RT_return_db_ID("REFERENCE"))==0 +& io_err(RT_return_db_ID("OBSERVABLES"))==0 + ! +#if defined _RT_SCATT + RESTART = RESTART .and. io_err(RT_return_db_ID("REFERENCE"))==0 +#endif ! #if defined _ELPH_ITERATIVE ! 4. The THETA (no CCA mode) @@ -218,7 +207,11 @@ subroutine RT_start_and_restart(E,k,q) ! ! Last thing to do is to update the planned time sampling time (if needed) ! +#if defined _RT_SCATT nt=RT_Lifetimes_evaluation_plan( ) +#else + nt=0 +#endif ! ! Update occupations after loading from DB !========================================== diff --git a/src/real_time_iterative_el-ph/.objects b/src/real_time_iterative_el-ph/.objects index c569d1d6a8..a67126ae60 100644 --- a/src/real_time_iterative_el-ph/.objects +++ b/src/real_time_iterative_el-ph/.objects @@ -1 +1,3 @@ +#if defined _ELPH_ITERATIVE objs = RT_ELPH_zeroing.o RT_ELPH_eq_Kernel.o RT_ELPH_out_of_eq_Kernel.o RT_ELPH_iterative_Kernel.o RT_G_retarded_time.o RT_ELPH_iterative_init.o +#endif diff --git a/src/real_time_iterative_el-ph/ELPH_ITERATIVE_project.dep b/src/real_time_iterative_el-ph/ELPH_ITERATIVE_project.dep new file mode 100644 index 0000000000..98c5150bba --- /dev/null +++ b/src/real_time_iterative_el-ph/ELPH_ITERATIVE_project.dep @@ -0,0 +1,7 @@ + RT_ELPH_eq_Kernel.o + RT_ELPH_iterative_Kernel.o + RT_ELPH_iterative_init.o + RT_ELPH_out_of_eq_Kernel.o + RT_ELPH_zeroing.o + RT_G_retarded_time.o + diff --git a/src/real_time_iterative_el-ph/RT_ELPH_eq_Kernel.F b/src/real_time_iterative_el-ph/RT_ELPH_eq_Kernel.F index 4370aec5aa..c067c28052 100644 --- a/src/real_time_iterative_el-ph/RT_ELPH_eq_Kernel.F +++ b/src/real_time_iterative_el-ph/RT_ELPH_eq_Kernel.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2012 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 ! subroutine RT_ELPH_eq_kernel(ik,i_map,ik_m_q,N_q,E,TIME,ph_freq,Gkkp_sq,S_mat) ! diff --git a/src/real_time_iterative_el-ph/RT_ELPH_iterative_Kernel.F b/src/real_time_iterative_el-ph/RT_ELPH_iterative_Kernel.F index 74c242e5b3..7a16788b5f 100644 --- a/src/real_time_iterative_el-ph/RT_ELPH_iterative_Kernel.F +++ b/src/real_time_iterative_el-ph/RT_ELPH_iterative_Kernel.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2011 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. -! -! 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 ! subroutine RT_ELPH_iterative_Kernel(ik,E,k,q,TIME) ! diff --git a/src/real_time_iterative_el-ph/RT_ELPH_iterative_init.F b/src/real_time_iterative_el-ph/RT_ELPH_iterative_init.F index fd63e03ccd..f62d522c73 100644 --- a/src/real_time_iterative_el-ph/RT_ELPH_iterative_init.F +++ b/src/real_time_iterative_el-ph/RT_ELPH_iterative_init.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine RT_ELPH_iterative_init() ! diff --git a/src/real_time_iterative_el-ph/RT_ELPH_out_of_eq_Kernel.F b/src/real_time_iterative_el-ph/RT_ELPH_out_of_eq_Kernel.F index 0633077e6c..1dfcafda19 100644 --- a/src/real_time_iterative_el-ph/RT_ELPH_out_of_eq_Kernel.F +++ b/src/real_time_iterative_el-ph/RT_ELPH_out_of_eq_Kernel.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2012 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 ! subroutine RT_ELPH_out_of_eq_kernel(ik,iqbz,il,i_map,ik_m_q,N_q,E,ph_freq,Gkkp_sq,S_mat) ! diff --git a/src/real_time_iterative_el-ph/RT_ELPH_zeroing.F b/src/real_time_iterative_el-ph/RT_ELPH_zeroing.F index 4f55a2f4a0..7455b778d8 100644 --- a/src/real_time_iterative_el-ph/RT_ELPH_zeroing.F +++ b/src/real_time_iterative_el-ph/RT_ELPH_zeroing.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine RT_ELPH_zeroing() ! diff --git a/src/real_time_iterative_el-ph/RT_G_retarded_time.F b/src/real_time_iterative_el-ph/RT_G_retarded_time.F index dff1d97964..2890426403 100644 --- a/src/real_time_iterative_el-ph/RT_G_retarded_time.F +++ b/src/real_time_iterative_el-ph/RT_G_retarded_time.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! complex(SP) function RT_G_retarded_time(Approx,E,ib,ik,Time,delta_T) ! diff --git a/src/real_time_lifetimes/.objects b/src/real_time_lifetimes/.objects index b2f26fb424..57d089cad6 100644 --- a/src/real_time_lifetimes/.objects +++ b/src/real_time_lifetimes/.objects @@ -1,5 +1,7 @@ +#if defined _RT objs = RT_Coulomb_Lifetimes.o RT_Radiative_Lifetimes.o \ RT_ELPH_Lifetimes.o RT_ELPH_Q_weights.o \ RT_Lifetimes_evaluation_plan.o RT_Lifetimes_Extrapolation.o \ RT_Lifetimes_save_and_extrap.o RT_Lifetimes_use_delta_Occupations.o \ RT_impose_zero_dE_and_dN.o RT_relaxation_logicals.o RT_G_retarded_convolution.o +#endif diff --git a/src/real_time_lifetimes/RT_Coulomb_Lifetimes.F b/src/real_time_lifetimes/RT_Coulomb_Lifetimes.F index c8c6d3f372..aa549218cc 100644 --- a/src/real_time_lifetimes/RT_Coulomb_Lifetimes.F +++ b/src/real_time_lifetimes/RT_Coulomb_Lifetimes.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2012 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 DS ! subroutine RT_Coulomb_Lifetimes(ik,E,k,q) ! diff --git a/src/real_time_lifetimes/RT_ELPH_Lifetimes.F b/src/real_time_lifetimes/RT_ELPH_Lifetimes.F index 765ad40db8..d86a391f10 100644 --- a/src/real_time_lifetimes/RT_ELPH_Lifetimes.F +++ b/src/real_time_lifetimes/RT_ELPH_Lifetimes.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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 ! subroutine RT_ELPH_Lifetimes(ik,E,k) ! diff --git a/src/real_time_lifetimes/RT_ELPH_Q_weights.F b/src/real_time_lifetimes/RT_ELPH_Q_weights.F index ea06f66f27..fd29a123e9 100644 --- a/src/real_time_lifetimes/RT_ELPH_Q_weights.F +++ b/src/real_time_lifetimes/RT_ELPH_Q_weights.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine RT_ELPH_Q_weights(q) ! diff --git a/src/real_time_lifetimes/RT_G_retarded_convolution.F b/src/real_time_lifetimes/RT_G_retarded_convolution.F index 3a85306fe9..d3a5c61727 100644 --- a/src/real_time_lifetimes/RT_G_retarded_convolution.F +++ b/src/real_time_lifetimes/RT_G_retarded_convolution.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 DS ! real(SP) function RT_G_retarded_convolution(EmEp,Ebose,WmWp,Wbose,Skind) ! diff --git a/src/real_time_lifetimes/RT_Lifetimes_Extrapolation.F b/src/real_time_lifetimes/RT_Lifetimes_Extrapolation.F index ee08305d68..3a811dc817 100644 --- a/src/real_time_lifetimes/RT_Lifetimes_Extrapolation.F +++ b/src/real_time_lifetimes/RT_Lifetimes_Extrapolation.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine RT_Lifetimes_Extrapolation(Life,Time,Life_SAVED,Times_SAVED) ! diff --git a/src/real_time_lifetimes/RT_Lifetimes_evaluation_plan.F b/src/real_time_lifetimes/RT_Lifetimes_evaluation_plan.F index 66448fac39..a0e5622590 100644 --- a/src/real_time_lifetimes/RT_Lifetimes_evaluation_plan.F +++ b/src/real_time_lifetimes/RT_Lifetimes_evaluation_plan.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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 ! integer function RT_Lifetimes_evaluation_plan( ) ! diff --git a/src/real_time_lifetimes/RT_Lifetimes_save_and_extrap.F b/src/real_time_lifetimes/RT_Lifetimes_save_and_extrap.F index ddba46481e..60338d9a60 100644 --- a/src/real_time_lifetimes/RT_Lifetimes_save_and_extrap.F +++ b/src/real_time_lifetimes/RT_Lifetimes_save_and_extrap.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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 ! subroutine RT_Lifetimes_save_and_extrap(Time,EVAL,LIFE) ! diff --git a/src/real_time_lifetimes/RT_Lifetimes_use_delta_Occupations.F b/src/real_time_lifetimes/RT_Lifetimes_use_delta_Occupations.F index 096b4a63e6..81177da647 100644 --- a/src/real_time_lifetimes/RT_Lifetimes_use_delta_Occupations.F +++ b/src/real_time_lifetimes/RT_Lifetimes_use_delta_Occupations.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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 DS ! subroutine RT_Lifetimes_use_delta_Occupations( ) ! diff --git a/src/real_time_lifetimes/RT_Radiative_Lifetimes.F b/src/real_time_lifetimes/RT_Radiative_Lifetimes.F index a6474109b5..3877c64dec 100644 --- a/src/real_time_lifetimes/RT_Radiative_Lifetimes.F +++ b/src/real_time_lifetimes/RT_Radiative_Lifetimes.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! subroutine RT_Radiative_Lifetimes(i_k,E,k,q) ! diff --git a/src/real_time_lifetimes/RT_impose_zero_dE_and_dN.F b/src/real_time_lifetimes/RT_impose_zero_dE_and_dN.F index 84c9007ed5..d49959835d 100644 --- a/src/real_time_lifetimes/RT_impose_zero_dE_and_dN.F +++ b/src/real_time_lifetimes/RT_impose_zero_dE_and_dN.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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 DS ! subroutine RT_impose_zero_dE_and_dN(E,LIFE,Ge,Gh,Ge_ref,Gh_ref,G_prefactor) ! diff --git a/src/real_time_lifetimes/RT_project.dep b/src/real_time_lifetimes/RT_project.dep new file mode 100644 index 0000000000..c080eab15a --- /dev/null +++ b/src/real_time_lifetimes/RT_project.dep @@ -0,0 +1,12 @@ + RT_Coulomb_Lifetimes.o + RT_ELPH_Lifetimes.o + RT_ELPH_Q_weights.o + RT_G_retarded_convolution.o + RT_Lifetimes_Extrapolation.o + RT_Lifetimes_evaluation_plan.o + RT_Lifetimes_save_and_extrap.o + RT_Lifetimes_use_delta_Occupations.o + RT_Radiative_Lifetimes.o + RT_impose_zero_dE_and_dN.o + RT_relaxation_logicals.o + diff --git a/src/real_time_lifetimes/RT_relaxation_logicals.F b/src/real_time_lifetimes/RT_relaxation_logicals.F index b87411d674..961782836b 100644 --- a/src/real_time_lifetimes/RT_relaxation_logicals.F +++ b/src/real_time_lifetimes/RT_relaxation_logicals.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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 ! subroutine RT_relaxation_logicals( ) ! diff --git a/src/real_time_propagation/.objects b/src/real_time_propagation/.objects index 03c5459cd5..04ed6e67b3 100644 --- a/src/real_time_propagation/.objects +++ b/src/real_time_propagation/.objects @@ -1,8 +1,10 @@ #if defined _PHEL PHEL_objects = RT_PHEL_Scattering_step.o #endif +#if defined _RT 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_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/PHEL_project.dep b/src/real_time_propagation/PHEL_project.dep new file mode 100644 index 0000000000..c6bcf8e895 --- /dev/null +++ b/src/real_time_propagation/PHEL_project.dep @@ -0,0 +1,2 @@ + RT_PHEL_Scattering_step.o + diff --git a/src/real_time_propagation/RT_Dephasing_step.F b/src/real_time_propagation/RT_Dephasing_step.F index 26fbcbfba5..6e105c86f2 100644 --- a/src/real_time_propagation/RT_Dephasing_step.F +++ b/src/real_time_propagation/RT_Dephasing_step.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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): DS AM ! subroutine RT_Dephasing_step(dG_out,dG_in,ik,deltaT) ! diff --git a/src/real_time_propagation/RT_EULER_step.F b/src/real_time_propagation/RT_EULER_step.F index 0a5c536d86..64d7e91957 100644 --- a/src/real_time_propagation/RT_EULER_step.F +++ b/src/real_time_propagation/RT_EULER_step.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): 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. +! Copyright (C) 2006 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. -! -! 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): CA DS ! subroutine RT_EULER_step(dG_in,dG_out,ik,nbf,deltaT) ! diff --git a/src/real_time_propagation/RT_EXP_step_accurate.F b/src/real_time_propagation/RT_EXP_step_accurate.F index dd4463fc1e..0ce62016b9 100644 --- a/src/real_time_propagation/RT_EXP_step_accurate.F +++ b/src/real_time_propagation/RT_EXP_step_accurate.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): 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. +! Copyright (C) 2017 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. -! -! 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): CA DS ! subroutine RT_EXP_step_accurate(dG_old,dG_inp,dG_out,ik,deltaT) ! diff --git a/src/real_time_propagation/RT_EXP_step_std.F b/src/real_time_propagation/RT_EXP_step_std.F index ba96d479a3..5fe1bbd3d4 100644 --- a/src/real_time_propagation/RT_EXP_step_std.F +++ b/src/real_time_propagation/RT_EXP_step_std.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): 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. +! Copyright (C) 2017 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. -! -! 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): CA DS ! subroutine RT_EXP_step_std(dG_old,dG_inp,dG_out,ik,deltaT) ! diff --git a/src/real_time_propagation/RT_Ext_fields.F b/src/real_time_propagation/RT_Ext_fields.F index 9d5a2f81f6..ed92e83437 100644 --- a/src/real_time_propagation/RT_Ext_fields.F +++ b/src/real_time_propagation/RT_Ext_fields.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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. +! Copyright (C) 2011 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 CA DS ! subroutine RT_Ext_fields(A,time,i_f) ! diff --git a/src/real_time_propagation/RT_Glesser_evolve.F b/src/real_time_propagation/RT_Glesser_evolve.F index 82ae67cd86..c25d78ec21 100644 --- a/src/real_time_propagation/RT_Glesser_evolve.F +++ b/src/real_time_propagation/RT_Glesser_evolve.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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. +! Copyright (C) 2017 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 CA DS ! subroutine RT_Glesser_evolve(En,kpt,dG_old,dG_in,dG_out,dT,dTp) ! diff --git a/src/real_time_propagation/RT_Glesser_rotate.F b/src/real_time_propagation/RT_Glesser_rotate.F index f7af998d9a..59193eeb78 100644 --- a/src/real_time_propagation/RT_Glesser_rotate.F +++ b/src/real_time_propagation/RT_Glesser_rotate.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine RT_Glesser_rotate(dG) ! diff --git a/src/real_time_propagation/RT_INV_step_accurate.F b/src/real_time_propagation/RT_INV_step_accurate.F index da2061b33a..994d317f40 100644 --- a/src/real_time_propagation/RT_INV_step_accurate.F +++ b/src/real_time_propagation/RT_INV_step_accurate.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): 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. +! Copyright (C) 2017 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. -! -! 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): CA DS ! subroutine RT_INV_step_accurate(dG_old,dG_inp,dG_out,ik,deltaT) ! diff --git a/src/real_time_propagation/RT_INV_step_diago.F b/src/real_time_propagation/RT_INV_step_diago.F index 08511d3a30..f940851435 100644 --- a/src/real_time_propagation/RT_INV_step_diago.F +++ b/src/real_time_propagation/RT_INV_step_diago.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): 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. +! Copyright (C) 2017 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. -! -! 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): CA DS ! subroutine RT_INV_step_diago(dG_old,dG_inp,dG_out,ik,deltaT) ! diff --git a/src/real_time_propagation/RT_INV_step_std.F b/src/real_time_propagation/RT_INV_step_std.F index b5e7f3b039..9eca8f06f6 100644 --- a/src/real_time_propagation/RT_INV_step_std.F +++ b/src/real_time_propagation/RT_INV_step_std.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): 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. +! Copyright (C) 2017 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. -! -! 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): CA DS ! subroutine RT_INV_step_std(dG_old,dG_inp,dG_out,ik,deltaT) ! 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..524e07a1cf 100644 --- a/src/real_time_propagation/RT_IO_type_time_steps.F +++ b/src/real_time_propagation/RT_IO_type_time_steps.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine RT_IO_type_time_steps(what) ! diff --git a/src/real_time_propagation/RT_Integrator.F b/src/real_time_propagation/RT_Integrator.F index 7b4aff9450..02d7370f43 100644 --- a/src/real_time_propagation/RT_Integrator.F +++ b/src/real_time_propagation/RT_Integrator.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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. +! Copyright (C) 2009 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 CA DS ! subroutine RT_Integrator(G_new,dG_new,dG_old,A_new,A_old,E,k,q) ! @@ -109,7 +93,9 @@ subroutine RT_Integrator(G_new,dG_new,dG_old,A_new,A_old,E,k,q) ! ! ... Update of logicals before the occupations update ! +#if defined _RT_SCATT call RT_relaxation_logicals( ) +#endif ! call RT_occupations_eval(dG_tmp(:,:,:,i_step)) ! @@ -125,7 +111,9 @@ subroutine RT_Integrator(G_new,dG_new,dG_old,A_new,A_old,E,k,q) ! 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 +#endif ! call timing('RT integrator',OPR='start') ! diff --git a/src/real_time_propagation/RT_Integrator_init.F b/src/real_time_propagation/RT_Integrator_init.F index 814bbd3547..f6862d8b56 100644 --- a/src/real_time_propagation/RT_Integrator_init.F +++ b/src/real_time_propagation/RT_Integrator_init.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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): DS ! subroutine RT_Integrator_init() ! diff --git a/src/real_time_propagation/RT_MEMORY_index.F b/src/real_time_propagation/RT_MEMORY_index.F index 342f978153..d10a9f6280 100644 --- a/src/real_time_propagation/RT_MEMORY_index.F +++ b/src/real_time_propagation/RT_MEMORY_index.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! subroutine RT_MEMORY_index( ) ! diff --git a/src/real_time_propagation/RT_PHEL_Scattering_step.F b/src/real_time_propagation/RT_PHEL_Scattering_step.F index 63b16c4e5a..5add789802 100644 --- a/src/real_time_propagation/RT_PHEL_Scattering_step.F +++ b/src/real_time_propagation/RT_PHEL_Scattering_step.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): 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. +! Copyright (C) 2020 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. -! -! 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): FP ! subroutine RT_PHEL_Scattering_step(iq,deltaT) ![NOTE] RT_PH_occupations are to be set somewhere after the time step calculation diff --git a/src/real_time_propagation/RT_SCATT_project.dep b/src/real_time_propagation/RT_SCATT_project.dep new file mode 100644 index 0000000000..3533ef60cf --- /dev/null +++ b/src/real_time_propagation/RT_SCATT_project.dep @@ -0,0 +1,3 @@ + RT_Integrator.o + RT_time_step_update.o + diff --git a/src/real_time_propagation/RT_Scattering_step.F b/src/real_time_propagation/RT_Scattering_step.F index 2851fa1b2d..cb8e9427f8 100644 --- a/src/real_time_propagation/RT_Scattering_step.F +++ b/src/real_time_propagation/RT_Scattering_step.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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 DS ! subroutine RT_Scattering_step(dG_old,dG_inp,dG_out,ik,deltaT) ! diff --git a/src/real_time_propagation/RT_apply_RWA.F b/src/real_time_propagation/RT_apply_RWA.F index d4acf80779..2b011f2c9e 100644 --- a/src/real_time_propagation/RT_apply_RWA.F +++ b/src/real_time_propagation/RT_apply_RWA.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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 DS ! subroutine RT_apply_RWA(ik,E,k,dT,dTp,dG_out,dG_in) ! diff --git a/src/real_time_propagation/RT_build_T1_and_T2.F b/src/real_time_propagation/RT_build_T1_and_T2.F index ba89ba14b7..2df31869d8 100644 --- a/src/real_time_propagation/RT_build_T1_and_T2.F +++ b/src/real_time_propagation/RT_build_T1_and_T2.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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): DS ! subroutine RT_build_T1_and_T2(ik,T1_k,T2_k,I1_matrix,dT) ! diff --git a/src/real_time_propagation/RT_occupations_eval.F b/src/real_time_propagation/RT_occupations_eval.F index 620fe2d0c7..76f066b011 100644 --- a/src/real_time_propagation/RT_occupations_eval.F +++ b/src/real_time_propagation/RT_occupations_eval.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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 ! subroutine RT_occupations_eval(dG) ! diff --git a/src/real_time_propagation/RT_project.dep b/src/real_time_propagation/RT_project.dep new file mode 100644 index 0000000000..b14151c261 --- /dev/null +++ b/src/real_time_propagation/RT_project.dep @@ -0,0 +1,20 @@ + RT_Dephasing_step.o + RT_EULER_step.o + RT_EXP_step_accurate.o + RT_EXP_step_std.o + RT_Ext_fields.o + RT_Glesser_evolve.o + RT_Glesser_rotate.o + RT_INV_step_accurate.o + RT_INV_step_diago.o + RT_INV_step_std.o + RT_IO_type_time_steps.o + RT_Integrator.o + RT_Integrator_init.o + RT_MEMORY_index.o + RT_Scattering_step.o + RT_apply_RWA.o + RT_occupations_eval.o + RT_propagate_fields.o + RT_time_step_update.o + diff --git a/src/real_time_propagation/RT_propagate_fields.F b/src/real_time_propagation/RT_propagate_fields.F index 41322ceaea..e81777bb80 100644 --- a/src/real_time_propagation/RT_propagate_fields.F +++ b/src/real_time_propagation/RT_propagate_fields.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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. +! Copyright (C) 2011 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 CA DS ! subroutine RT_propagate_fields(E,k,A_old,A_new,G_inp,T,T_step) ! diff --git a/src/real_time_propagation/RT_time_step_update.F b/src/real_time_propagation/RT_time_step_update.F index 82afe6de1d..d1c3e6e40a 100644 --- a/src/real_time_propagation/RT_time_step_update.F +++ b/src/real_time_propagation/RT_time_step_update.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine RT_time_step_update( E ) ! @@ -51,7 +35,9 @@ subroutine RT_time_step_update( E ) integer :: ib,ibp,ik,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 integer, external :: RT_Lifetimes_evaluation_plan +#endif logical, external :: RT_do_it ! l_Update_Time_Step=NE_time>=NE_initial_time_step_update.and.NE_initial_time_step_update>0._SP @@ -135,7 +121,11 @@ subroutine RT_time_step_update( E ) ! ! ... and Lifetimes evaluation plan update ! +#if defined _RT_SCATT nT_updated =RT_Lifetimes_evaluation_plan( ) +#else + nT_updated =0 +#endif ! ! ... create the linked descriptions ! diff --git a/src/sc/.objects b/src/sc/.objects index cd75052c47..80efc6403d 100644 --- a/src/sc/.objects +++ b/src/sc/.objects @@ -1,6 +1,8 @@ +#if defined _SC objs = SC_driver.o SC_start_and_restart.o SC_Energy.o \ OEP_exact_inversion.o V_Mean_Potential.o \ SC_add_XC.o SC_precondition.o \ SC_History.o OEP_driver.o OEP_Hole.o \ OEP_iterative.o OEP_app_inversion.o OEP_Weighted_Density.o\ OEP_ApplySigmaX.o OEP_ApplySigmaCSX.o ELECTR_initial_check.o SC_add_efield.o +#endif diff --git a/src/sc/ELECTR_initial_check.F b/src/sc/ELECTR_initial_check.F index f198371f5f..d23247ecd7 100644 --- a/src/sc/ELECTR_initial_check.F +++ b/src/sc/ELECTR_initial_check.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AC MG -! -! 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. +! Copyright (C) 2016 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): AC MG ! subroutine ELECTR_initial_check(k,Dip) ! diff --git a/src/sc/OEP_ApplySigmaCSX.F b/src/sc/OEP_ApplySigmaCSX.F index 90bb15893a..f7b8ab633b 100644 --- a/src/sc/OEP_ApplySigmaCSX.F +++ b/src/sc/OEP_ApplySigmaCSX.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG -! -! 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) 2011 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. -! -! 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): MG ! subroutine OEP_ApplySigmaCSX(X,Xw,E,k,q,U_csx) ! @@ -94,7 +78,7 @@ 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)) ! - call elemental_collision_alloc(isc,TITLE="OEP_SigmaCSX",NG=X%ng,NG_GAMP=(/X%ng,X%ng/)) + 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)) YAMBO_ALLOC(u_rs,(fft_size)) diff --git a/src/sc/OEP_ApplySigmaX.F b/src/sc/OEP_ApplySigmaX.F index c85370c299..c3ca7e0433 100644 --- a/src/sc/OEP_ApplySigmaX.F +++ b/src/sc/OEP_ApplySigmaX.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG -! -! 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) 2010 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. -! -! 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): MG ! subroutine OEP_ApplySigmaX(E,k,q,U_x) ! @@ -71,7 +55,7 @@ subroutine OEP_ApplySigmaX(E,k,q,U_x) call elemental_collision_free(isc) call PP_indexes_reset(px) ! - call elemental_collision_alloc(isc,NG=QP_ng_Sx,NG_GAMP=(/QP_ng_Sx,1/),TITLE="OEP_SigmaX") + call elemental_collision_alloc(isc,NG=QP_ng_Sx,GAMP_NG=(/QP_ng_Sx,1/),TITLE="OEP_SigmaX") YAMBO_ALLOC(local_u,(fft_size)) YAMBO_ALLOC(u,(fft_size)) YAMBO_ALLOC(u_rs,(fft_size)) diff --git a/src/sc/OEP_Hole.F b/src/sc/OEP_Hole.F index 9ff9fd47f5..f4beeaac14 100644 --- a/src/sc/OEP_Hole.F +++ b/src/sc/OEP_Hole.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG -! -! 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) 2010 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. -! -! 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): MG ! subroutine OEP_Hole(E,k,Vslt,U_x) ! diff --git a/src/sc/OEP_Weighted_Density.F b/src/sc/OEP_Weighted_Density.F index 02850b6caa..a7d3d82bbb 100644 --- a/src/sc/OEP_Weighted_Density.F +++ b/src/sc/OEP_Weighted_Density.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG -! -! 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) 2011 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. -! -! 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): MG ! subroutine OEP_Weighted_Density(en,Xk,rho) ! diff --git a/src/sc/OEP_app_inversion.F b/src/sc/OEP_app_inversion.F index a71543f379..1e3038b6c8 100644 --- a/src/sc/OEP_app_inversion.F +++ b/src/sc/OEP_app_inversion.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG -! -! 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) 2010 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. -! -! 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): MG ! subroutine OEP_app_inversion(E,k,Vkli,Vslt,U,rho) ! diff --git a/src/sc/OEP_driver.F b/src/sc/OEP_driver.F index 6db2abfa75..e676d96c90 100644 --- a/src/sc/OEP_driver.F +++ b/src/sc/OEP_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG -! -! 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) 2010 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. -! -! 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): MG ! subroutine OEP_driver(X,Xw,E,k,q,V_oep) ! diff --git a/src/sc/OEP_exact_inversion.F b/src/sc/OEP_exact_inversion.F index 19f088c1cc..4ae2d08931 100644 --- a/src/sc/OEP_exact_inversion.F +++ b/src/sc/OEP_exact_inversion.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG -! -! 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) 2007 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. -! -! 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): MG ! subroutine OEP_exact_inversion(X,E,k,Voep,W_x) ! diff --git a/src/sc/OEP_iterative.F b/src/sc/OEP_iterative.F index 70c2ca4d17..3d7bf11720 100644 --- a/src/sc/OEP_iterative.F +++ b/src/sc/OEP_iterative.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG -! -! 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) 2010 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. -! -! 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): MG ! subroutine OEP_iterative(E,k,Voep,Vslt,U,rho) ! diff --git a/src/sc/SC_Energy.F b/src/sc/SC_Energy.F index 26df8b10ed..5d707417a5 100644 --- a/src/sc/SC_Energy.F +++ b/src/sc/SC_Energy.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2010 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. -! -! 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): DS ! subroutine SC_Energy(E_total,E_eigen,E_zero,E_Hartree,E_xc_,E_Fermi,E,k,rho) ! diff --git a/src/sc/SC_History.F b/src/sc/SC_History.F index 8b0acd4ab3..6bfeeb0d8c 100644 --- a/src/sc/SC_History.F +++ b/src/sc/SC_History.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2010 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. -! -! 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 ! subroutine SC_History(it,E) ! diff --git a/src/sc/SC_add_XC.F b/src/sc/SC_add_XC.F index 9b573364f0..294707f11a 100644 --- a/src/sc/SC_add_XC.F +++ b/src/sc/SC_add_XC.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2010 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. -! -! 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 ! subroutine SC_add_XC(X,Xw,Xk,E,k,q,iteration,V_xc_nm1,ELEC,HOLE,DELTA) ! diff --git a/src/sc/SC_add_efield.F b/src/sc/SC_add_efield.F index ab74df2aaa..733d72e538 100644 --- a/src/sc/SC_add_efield.F +++ b/src/sc/SC_add_efield.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CA MG -! -! 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) 2016 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. -! -! 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): CA MG ! ! This subroutine fill the W_electric matrix ! diff --git a/src/sc/SC_driver.F b/src/sc/SC_driver.F index a4081c3dd4..73abd8d9ce 100644 --- a/src/sc/SC_driver.F +++ b/src/sc/SC_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM MG -! -! 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. +! Copyright (C) 2006 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 MG ! subroutine SC_driver(X,Xw,Xk,E,k,q,Dip) ! @@ -382,6 +366,8 @@ subroutine SC_driver(X,Xw,Xk,E,k,q,Dip) do i_sp_pol=1,n_sp_pol ! do ik = 1, QP_nk + ! + i_frag=ik+(i_sp_pol-1)*QP_nk ! H_nl_sc=cZERO ! @@ -403,7 +389,8 @@ subroutine SC_driver(X,Xw,Xk,E,k,q,Dip) ! ! I/O [H_nl_sc] ! - call io_control(ACTION=WR_CL_IF_END,COM=NONE,SEC=(/ik+1/),ID=ID(3)) + 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)) io_V=io_SC_components('V',E,ID(3)) ! ! Mixing for non-local self-energies @@ -425,7 +412,6 @@ subroutine SC_driver(X,Xw,Xk,E,k,q,Dip) ! if (l_sc_XC_is_local.and..not.l_use_collisions) call V_real_space_to_H(ik,i_sp_pol,H_nl_sc,WFo,'xc ',Vxc=V_xc_sc) ! - i_frag=ik+(i_sp_pol-1)*QP_nk 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=(/1+i_frag/),ID=ID(3)) io_V=io_SC_components('V',E,ID(3)) diff --git a/src/sc/SC_precondition.F b/src/sc/SC_precondition.F index 259276f529..59945e7d77 100644 --- a/src/sc/SC_precondition.F +++ b/src/sc/SC_precondition.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DV -! -! 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) 2007 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. -! -! 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): DV ! subroutine SC_precondition(delta_rho) ! diff --git a/src/sc/SC_project.dep b/src/sc/SC_project.dep new file mode 100644 index 0000000000..a5e7ffba97 --- /dev/null +++ b/src/sc/SC_project.dep @@ -0,0 +1,18 @@ + ELECTR_initial_check.o + OEP_ApplySigmaCSX.o + OEP_ApplySigmaX.o + OEP_Hole.o + OEP_Weighted_Density.o + OEP_app_inversion.o + OEP_driver.o + OEP_exact_inversion.o + OEP_iterative.o + SC_Energy.o + SC_History.o + SC_add_XC.o + SC_add_efield.o + SC_driver.o + SC_precondition.o + SC_start_and_restart.o + V_Mean_Potential.o + diff --git a/src/sc/SC_start_and_restart.F b/src/sc/SC_start_and_restart.F index ef12737fdb..e4e401b342 100644 --- a/src/sc/SC_start_and_restart.F +++ b/src/sc/SC_start_and_restart.F @@ -1,25 +1,9 @@ -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2010 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 ! subroutine SC_start_and_restart(X,E,Xk,Dip) ! diff --git a/src/sc/V_Mean_Potential.F b/src/sc/V_Mean_Potential.F index ef65aeaf18..39f134fd35 100644 --- a/src/sc/V_Mean_Potential.F +++ b/src/sc/V_Mean_Potential.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2011 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. -! -! 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 ! subroutine V_mean_potential(ik,i_sp_pol,WFo) ! diff --git a/src/setup/External_corrections.F b/src/setup/External_corrections.F index 687086d94b..b6f77a1428 100644 --- a/src/setup/External_corrections.F +++ b/src/setup/External_corrections.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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 DS ! subroutine External_corrections(en,Xen,Ken,DIPen,Xk,k,X) ! diff --git a/src/setup/G_shells_finder.F b/src/setup/G_shells_finder.F index 281b5f827a..8a6640f61c 100644 --- a/src/setup/G_shells_finder.F +++ b/src/setup/G_shells_finder.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 DS ! subroutine G_shells_finder() ! diff --git a/src/setup/PARALLEL_and_IO_Setup.F b/src/setup/PARALLEL_and_IO_Setup.F index 4ff479f08e..8ab4a2b090 100644 --- a/src/setup/PARALLEL_and_IO_Setup.F +++ b/src/setup/PARALLEL_and_IO_Setup.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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. -! -! 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 ! subroutine PARALLEL_and_IO_Setup(en,k) ! diff --git a/src/setup/QP_state_table_setup.F b/src/setup/QP_state_table_setup.F index f668e7cf80..7bea9aa7d3 100644 --- a/src/setup/QP_state_table_setup.F +++ b/src/setup/QP_state_table_setup.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine QP_state_table_setup(en) ! diff --git a/src/setup/SET_job_strings_and_dirs.F b/src/setup/SET_job_strings_and_dirs.F index 0a5aebc816..bfd4cf4a58 100644 --- a/src/setup/SET_job_strings_and_dirs.F +++ b/src/setup/SET_job_strings_and_dirs.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2018 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. -! -! 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 ! subroutine SET_job_strings_and_dirs(JS) ! diff --git a/src/setup/build_spin_sop.F b/src/setup/build_spin_sop.F index 7a779348ba..b0dc2b482f 100644 --- a/src/setup/build_spin_sop.F +++ b/src/setup/build_spin_sop.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2012 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): DS ! subroutine build_spin_sop() ! diff --git a/src/setup/build_xc_spin_map.F b/src/setup/build_xc_spin_map.F index 2252169919..5ba0e721cd 100644 --- a/src/setup/build_xc_spin_map.F +++ b/src/setup/build_xc_spin_map.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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): DS ! subroutine build_xc_spin_map() ! diff --git a/src/setup/check_periodic_directions.F b/src/setup/check_periodic_directions.F index 8723422a4d..6243568743 100644 --- a/src/setup/check_periodic_directions.F +++ b/src/setup/check_periodic_directions.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2009 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 ! subroutine check_periodic_directions(is_cut) ! diff --git a/src/setup/eval_Mtot.F b/src/setup/eval_Mtot.F index fc19275ddf..dc50a13b99 100644 --- a/src/setup/eval_Mtot.F +++ b/src/setup/eval_Mtot.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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): DS ! subroutine eval_Mtot(en,k,q) ! diff --git a/src/setup/eval_minus_G.F b/src/setup/eval_minus_G.F index 13e7f3f889..e36d57c455 100644 --- a/src/setup/eval_minus_G.F +++ b/src/setup/eval_minus_G.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine eval_minus_G() ! diff --git a/src/setup/setup.F b/src/setup/setup.F index 0bf5cee2c1..c6521874a6 100644 --- a/src/setup/setup.F +++ b/src/setup/setup.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine setup(en,Xen,Ken,k,Xk) ! @@ -28,7 +12,7 @@ subroutine setup(en,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 + use wave_func, ONLY:wf_ng,wf_ncx,wf_igk 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,& @@ -257,6 +241,11 @@ subroutine setup(en,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") + wf_ng=maxval(wf_igk) + endif + ! call msg('r','nG shells ',n_g_shells) call msg('r','nG charge ',ng_closed) call msg('r','nG WFs ',wf_ng) diff --git a/src/stop_and_restart/CLOSE_the_run.F b/src/stop_and_restart/CLOSE_the_run.F index 99d9564c2a..515ff749d3 100644 --- a/src/stop_and_restart/CLOSE_the_run.F +++ b/src/stop_and_restart/CLOSE_the_run.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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. -! -! 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 ! subroutine CLOSE_the_run(MEM,TIME,INIT_stop) ! diff --git a/src/stop_and_restart/STOP_now.F b/src/stop_and_restart/STOP_now.F index e394f49650..24bb3af6e2 100644 --- a/src/stop_and_restart/STOP_now.F +++ b/src/stop_and_restart/STOP_now.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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. -! -! 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 ! logical function STOP_now(DO_IT_NOW) ! diff --git a/src/tddft/TDDFT_ALDA_G_space.F b/src/tddft/TDDFT_ALDA_G_space.F index e9b002c497..cbcef64461 100644 --- a/src/tddft/TDDFT_ALDA_G_space.F +++ b/src/tddft/TDDFT_ALDA_G_space.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! subroutine TDDFT_ALDA_G_space(E,k) ! @@ -30,7 +14,7 @@ subroutine TDDFT_ALDA_G_space(E,k) use electrons, ONLY:levels,n_spin use R_lattice, ONLY:bz_samp,G_m_G use wave_func, ONLY:WF - use xc_functionals,ONLY:F_xc,magn,XC_potential_driver + 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 ! @@ -65,6 +49,8 @@ subroutine TDDFT_ALDA_G_space(E,k) ! ALDA functional ! YAMBO_ALLOC(F_xc,(fft_size,n_spin,n_spin)) + YAMBO_ALLOC(V_xc,(fft_size,n_spin)) + V_xc=0._SP YAMBO_ALLOC(F_xc_DP,(fft_size)) if (n_spin>1) then YAMBO_ALLOC(magn,(fft_size,3)) @@ -94,6 +80,7 @@ subroutine TDDFT_ALDA_G_space(E,k) ! ! Clean ! + YAMBO_FREE(V_xc) YAMBO_FREE(F_xc) YAMBO_FREE(F_xc_DP) YAMBO_FREE(magn) diff --git a/src/tddft/TDDFT_ALDA_R_space.F b/src/tddft/TDDFT_ALDA_R_space.F index 9efb826d0f..b1da0c3f50 100644 --- a/src/tddft/TDDFT_ALDA_R_space.F +++ b/src/tddft/TDDFT_ALDA_R_space.F @@ -1,27 +1,11 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! -function TDDFT_ALDA_R_space(is,os,isp,osp,mode) +function TDDFT_ALDA_R_space(is,os,isp,osp,tddft_wf,mode) ! ! Calculates the F_xc scattering ! @@ -44,22 +28,25 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,mode) 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 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 + 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 - 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,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') ! @@ -69,44 +56,65 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,mode) ! TDDFT_ALDA_R_space=cZERO ! - call WF_apply_symm(is,WF_symm1) - call WF_apply_symm(os,WF_symm2) + 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 ! - if(n_spinor==1) rhotwr1(:)=conjg(WF_symm1(:,1))*WF_symm2(:,1) + ! + 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(irhotw)=conjg(WF_symm1(ifft,i_spinor))*WF_symm2(ifft,j_spinor) + 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(isp,WF_symm1) - call WF_apply_symm(osp,WF_symm2) + 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(isp,WF_symm2) - call WF_apply_symm(osp,WF_symm1) + call WF_apply_symm_cpu(isp,WF_symm2_p) + call WF_apply_symm_cpu(osp,WF_symm1_p) endif ! - 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_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=cZERO + 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(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)) + 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 @@ -116,7 +124,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(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 diff --git a/src/tddft/TDDFT_ALDA_lower_cutoff.F b/src/tddft/TDDFT_ALDA_lower_cutoff.F index c9a1c82d7f..69cb1e675b 100644 --- a/src/tddft/TDDFT_ALDA_lower_cutoff.F +++ b/src/tddft/TDDFT_ALDA_lower_cutoff.F @@ -1,27 +1,27 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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): DS ! subroutine TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) + ! + ! This subroutine performes a double FFT of F_xc + ! F_xc(r) --> F_xc(G_l) --> F_xc(r) + ! + ! Before performing the FFT bach to r space, it can lower the cutoff of F_xc(G) + ! There are three options + ! a) "lower_GmGp" --> F_xc(G_l) with G_l=G-G' and a maximum cutoff is applied to G and G' + ! b) "lower_Gmax" --> a cutoff is applied directly to G_l + ! c) "full_grid" --> no cutoff is applied (for debugging purposes) + ! + ! The three options can be controlled from input. Notice that full grid + ! means Ng = fft_size, where Ng is the number of G-vectors is reciprocal space + ! This means Ng >> ng_closed because F_xc is not at all smooth + ! + ! The main goal of this subrotuine is to allow comparison between a + ! TDDFT run in G-space and one in eh-space ! use pars, ONLY:DP,SP,cZERO use TDDFT, ONLY:FXC_n_g_corr @@ -40,26 +40,21 @@ subroutine TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) ! integer :: i1,i2,ig_fxc,isp1,isp2,isp3,isp4,n_holes complex(DP) :: F_xc_DP(fft_size),F_xc_DP_reduced(fft_size) - logical :: procedure1, procedure2, procedure3=.false. + logical :: l_lower_GmGp, l_lower_Gmax, l_use_fullgd ! if(trim(ALDA_cut_scheme)=="none") return ! - procedure1=trim(ALDA_cut_scheme)=="lower_GmGp" - procedure2=trim(ALDA_cut_scheme)=="lower_Gmax" - ! - ! DEBUG < - !procedure1=.false. - !procedure1=.false. - !procedure3=.true. - ! DEBUG > + 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" ! - if (procedure1) then + if (l_lower_GmGp) then BS_n_g_fxc=maxval(G_m_G(:FXC_n_g_corr,:FXC_n_g_corr)) call PARSER_close_G(BS_n_g_fxc,'tRL') call msg('s',"[TDDFT] lowering the cutoff of F_xc(G-G') for G and G' to ",FXC_n_G_corr) endif ! - if (procedure2) call msg('s',"[TDDFT] lowering the cutoff of F_xc(G) to ",BS_n_g_fxc) + if (l_lower_Gmax) call msg('s',"[TDDFT] lowering the cutoff of F_xc(G) to ",BS_n_g_fxc) ! do isp1=1,n_spin do isp2=1,n_spin @@ -93,7 +88,7 @@ subroutine TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) !! I need FXC_n_g_corr up to wf_ng to arrive up to ng_closed !! This is consistent with what done in G-space TDDFT ! DEBUG < - if (procedure1) then + if (l_lower_GmGp) then F_xc_DP_reduced=cZERO do i1=1,FXC_n_g_corr do i2=1,FXC_n_g_corr @@ -114,7 +109,7 @@ subroutine TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) ! DEBUG > ! ! PROCEDURE 2: I need FXC_n_g_corr up to ng_closed - if (procedure2) then + if (l_lower_Gmax) then n_holes=0 F_xc_DP_reduced=cZERO do i1=1,BS_n_g_fxc @@ -128,7 +123,7 @@ subroutine TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) ! In both previous procedures I can use up to ng_closed vectors max ! However Fxc may need more G vecs, up to G-G' with both running till n_g_closed in principle. ! With this direct procedure all g-vectors are used - if (procedure3) F_xc_DP_reduced=F_xc_DP/real(fft_size,DP) + if (l_use_fullgd) F_xc_DP_reduced=F_xc_DP/real(fft_size,DP) ! DEBUG > ! ! FFT call: FORWARD (G->R) @@ -148,7 +143,7 @@ subroutine TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) enddo enddo ! - if (procedure1) call msg('s','[TDDFT] while lowering the cutoff F_xc is not defined on n_points in the last shells ',n_holes) + if (l_lower_GmGp) call msg('s','[TDDFT] while lowering the cutoff F_xc is not defined on n_points in the last shells ',n_holes) ! ! DEBUG < ! write(*,*) "F_xc= ",F_xc_matt(1:10,1,1,1,1) diff --git a/src/tddft/TDDFT_BSK_2_FXC.F b/src/tddft/TDDFT_BSK_2_FXC.F index bd978d7456..4122b211ca 100644 --- a/src/tddft/TDDFT_BSK_2_FXC.F +++ b/src/tddft/TDDFT_BSK_2_FXC.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! subroutine TDDFT_BSK_2_FXC(iq,ik1,ik2,O1x,O2x,O_x_dim,W,X_static) ! diff --git a/src/tddft/TDDFT_BSK_disk_2_FXC.F b/src/tddft/TDDFT_BSK_disk_2_FXC.F index 9b6bff90a7..9de4f2562e 100644 --- a/src/tddft/TDDFT_BSK_disk_2_FXC.F +++ b/src/tddft/TDDFT_BSK_disk_2_FXC.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! subroutine TDDFT_BSK_disk_2_FXC(iq,Xk,W,X_static) ! diff --git a/src/tddft/TDDFT_PF_coefficient.F b/src/tddft/TDDFT_PF_coefficient.F index e211811260..8c10f6290c 100644 --- a/src/tddft/TDDFT_PF_coefficient.F +++ b/src/tddft/TDDFT_PF_coefficient.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG -! -! 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. +! Copyright (C) 2016 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): MG ! subroutine TDDFT_PF_coefficient(en,Xk,a_xc,b_xc) ! diff --git a/src/tddft/TDDFT_do_X_W_typs.F b/src/tddft/TDDFT_do_X_W_typs.F index b8747d68a1..0f2a8e0df7 100644 --- a/src/tddft/TDDFT_do_X_W_typs.F +++ b/src/tddft/TDDFT_do_X_W_typs.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! subroutine TDDFT_do_X_W_typs(iq,X,wv) ! diff --git a/src/timing/TIMING_clock_write.F b/src/timing/TIMING_clock_write.F index d238a51557..9630fb9650 100644 --- a/src/timing/TIMING_clock_write.F +++ b/src/timing/TIMING_clock_write.F @@ -1,26 +1,10 @@ ! ! Copyright (C) 2004 WanT Group -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, AF -! -! 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. +! Copyright (C) 2020 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 AF ! subroutine TIMING_clock_write(obj,what) ! diff --git a/src/timing/TIMING_overview.F b/src/timing/TIMING_overview.F index 8a26ed77c8..2afbf4eafe 100644 --- a/src/timing/TIMING_overview.F +++ b/src/timing/TIMING_overview.F @@ -1,26 +1,10 @@ ! ! Copyright (C) 2004 WanT Group -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, AF -! -! 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. +! Copyright (C) 2020 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 AF ! subroutine TIMING_overview(list,main_name) ! diff --git a/src/tools/c_printing.c b/src/tools/c_printing.c index cdae809880..f620d55644 100644 --- a/src/tools/c_printing.c +++ b/src/tools/c_printing.c @@ -1,25 +1,9 @@ /* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org + License-Identifier: GPL - 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. + Copyright (C) 2006 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 */ #include diff --git a/src/tools/io.c b/src/tools/io.c index fbed185690..5f31d94cf0 100644 --- a/src/tools/io.c +++ b/src/tools/io.c @@ -23,6 +23,7 @@ #include #include #include +#include void C_FUNC(imkdir, IMKDIR) (char *name) diff --git a/src/wf_and_fft/NL_project.dep b/src/wf_and_fft/NL_project.dep deleted file mode 100644 index 90d799ca7a..0000000000 --- a/src/wf_and_fft/NL_project.dep +++ /dev/null @@ -1,3 +0,0 @@ - fft_1d.o - fft_singleton.o - diff --git a/src/wf_and_fft/PP_compute_becp.F b/src/wf_and_fft/PP_compute_becp.F index 4fc343b7d6..14454d820e 100644 --- a/src/wf_and_fft/PP_compute_becp.F +++ b/src/wf_and_fft/PP_compute_becp.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AF, IM +! Copyright (C) 2018 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. -! -! 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. +! Authors (see AUTHORS file for details): AF IM ! subroutine PP_compute_becp(becp, npwk, wf_nb, wf_c, wf_b_indx) ! diff --git a/src/wf_and_fft/PP_rotate_becp.F b/src/wf_and_fft/PP_rotate_becp.F index 47c77350c4..ad42b83110 100644 --- a/src/wf_and_fft/PP_rotate_becp.F +++ b/src/wf_and_fft/PP_rotate_becp.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AF, IM +! Copyright (C) 2018 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. -! -! 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. +! Authors (see AUTHORS file for details): AF IM ! subroutine PP_rotate_becp(isc,ibec,obec) ! diff --git a/src/wf_and_fft/PP_scatterBamp_init.F b/src/wf_and_fft/PP_scatterBamp_init.F index 9496603144..4174601285 100644 --- a/src/wf_and_fft/PP_scatterBamp_init.F +++ b/src/wf_and_fft/PP_scatterBamp_init.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AF, IM +! Copyright (C) 2006 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. -! -! 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. +! Authors (see AUTHORS file for details): AF IM ! subroutine PP_scatterBamp_init(isc) ! diff --git a/src/wf_and_fft/PP_uspp_init.F b/src/wf_and_fft/PP_uspp_init.F index 6c7c76e7a5..4bbd29b9f5 100644 --- a/src/wf_and_fft/PP_uspp_init.F +++ b/src/wf_and_fft/PP_uspp_init.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AF, IM +! Copyright (C) 2018 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. -! -! 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. +! Authors (see AUTHORS file for details): AF IM ! subroutine PP_uspp_init() ! diff --git a/src/wf_and_fft/PP_vloc_augment.F b/src/wf_and_fft/PP_vloc_augment.F index 8370942bce..307a8cc6ec 100644 --- a/src/wf_and_fft/PP_vloc_augment.F +++ b/src/wf_and_fft/PP_vloc_augment.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AF, IM +! Copyright (C) 2018 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. -! -! 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. +! Authors (see AUTHORS file for details): AF IM ! subroutine PP_vloc_augment(QP_Vloc,Vloc,ik,ib,ibp) ! diff --git a/src/wf_and_fft/WF_alloc.F b/src/wf_and_fft/WF_alloc.F index e6cdb80bec..f20538073a 100644 --- a/src/wf_and_fft/WF_alloc.F +++ b/src/wf_and_fft/WF_alloc.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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 ! subroutine WF_alloc(WF) ! diff --git a/src/wf_and_fft/WF_apply_symm.F b/src/wf_and_fft/WF_apply_symm.F index f1134ff567..e9edc29c68 100644 --- a/src/wf_and_fft/WF_apply_symm.F +++ b/src/wf_and_fft/WF_apply_symm.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DS, AF -! -! 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) 2013 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. -! -! 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): DS AF ! subroutine DEV_SUB_ALT(WF_apply_symm)(isc,WF_symm) ! @@ -63,11 +47,8 @@ subroutine DEV_SUB_ALT(WF_apply_symm)(isc,WF_symm) ! if(n_spinor==1) then ! -#ifdef _CUDA_LOC - !$cuf kernel do(1) <<<*,*>>> -#else - !$omp parallel do default(shared), private(ifft) -#endif + !DEV_CUF kernel do(1) <<<*,*>>> + !DEV_OMP parallel do default(shared), private(ifft) do ifft = 1, fft_size WF_symm(ifft,1)=WF_p(DEV_VAR(fft_rot_r)(ifft,isymm),1,i_wf) enddo @@ -76,11 +57,8 @@ subroutine DEV_SUB_ALT(WF_apply_symm)(isc,WF_symm) ! if (n_spinor==2) then ! -#ifdef _CUDA_LOC - !$cuf kernel do(1) <<<*,*>>> -#else - !$omp parallel do default(shared), private(ifft) -#endif + !DEV_CUF kernel do(1) <<<*,*>>> + !DEV_OMP parallel do default(shared), private(ifft) 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) diff --git a/src/wf_and_fft/WF_apply_symm_incl.F b/src/wf_and_fft/WF_apply_symm_incl.F index 8a8a29f100..2bf8d26972 100644 --- a/src/wf_and_fft/WF_apply_symm_incl.F +++ b/src/wf_and_fft/WF_apply_symm_incl.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL +! +! Copyright (C) 2006 The Yambo Team ! ! Authors (see AUTHORS file for details): AF -! -! 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. ! ! diff --git a/src/wf_and_fft/WF_derivative.F b/src/wf_and_fft/WF_derivative.F index 3bcec1d182..6404c3b952 100644 --- a/src/wf_and_fft/WF_derivative.F +++ b/src/wf_and_fft/WF_derivative.F @@ -1,27 +1,10 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2009 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): DS ! -#if defined _SC || defined _RT 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 @@ -138,4 +121,3 @@ subroutine WF_derivative(derivative_bands,derivative_kpt,derivative_sppol,do_der YAMBO_FREE(wf_der) ! end subroutine -#endif diff --git a/src/wf_and_fft/WF_free.F b/src/wf_and_fft/WF_free.F index fc49d7e6e3..2f6877cf88 100644 --- a/src/wf_and_fft/WF_free.F +++ b/src/wf_and_fft/WF_free.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine WF_free(WF,keep_fft) ! diff --git a/src/wf_and_fft/WF_load.F b/src/wf_and_fft/WF_load.F index 0f8dc7d860..0f42af3ce4 100644 --- a/src/wf_and_fft/WF_load.F +++ b/src/wf_and_fft/WF_load.F @@ -1,24 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, AF -! -! 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, g_ve -! 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) 2006 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 AF ! !> @brief Load wave-function in different forms !! diff --git a/src/wf_and_fft/WF_rotate.F b/src/wf_and_fft/WF_rotate.F index b564ebb7e7..aa3c622ba6 100644 --- a/src/wf_and_fft/WF_rotate.F +++ b/src/wf_and_fft/WF_rotate.F @@ -1,27 +1,10 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 DS ! -! 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 _SC subroutine WF_rotate(ik,i_sp_pol,WFo,wf_size) ! ! = @@ -81,4 +64,3 @@ subroutine WF_rotate(ik,i_sp_pol,WFo,wf_size) enddo ! end subroutine -#endif diff --git a/src/wf_and_fft/WF_shift_kpoint.F b/src/wf_and_fft/WF_shift_kpoint.F index eb7a7d7766..a99fa230c2 100644 --- a/src/wf_and_fft/WF_shift_kpoint.F +++ b/src/wf_and_fft/WF_shift_kpoint.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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. -! -! 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): MG CA ! #include ! diff --git a/src/wf_and_fft/WF_spatial_inversion.F b/src/wf_and_fft/WF_spatial_inversion.F index 9c01661222..6128038a1d 100644 --- a/src/wf_and_fft/WF_spatial_inversion.F +++ b/src/wf_and_fft/WF_spatial_inversion.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine WF_spatial_inversion(en,Xk) ! diff --git a/src/wf_and_fft/WF_symm.F b/src/wf_and_fft/WF_symm.F index 711c768458..16249535dd 100644 --- a/src/wf_and_fft/WF_symm.F +++ b/src/wf_and_fft/WF_symm.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2013 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): DS ! function WF_symm(ifft,isc) ! diff --git a/src/wf_and_fft/WF_symm_kpoint.F b/src/wf_and_fft/WF_symm_kpoint.F index 785e1ab05f..f47426d31f 100644 --- a/src/wf_and_fft/WF_symm_kpoint.F +++ b/src/wf_and_fft/WF_symm_kpoint.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG, CA, DS, AF -! -! 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) 2015 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. -! -! 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): MG CA DS AF ! subroutine DEV_SUB_ALT(WF_symm_kpoint)(b_to_load,ikbz,Xk,WF_k_out) ! @@ -70,9 +54,7 @@ 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) <<<*,*>>> -#endif + !DEV_CUF kernel do(2) <<<*,*>>> 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) @@ -81,9 +63,7 @@ subroutine DEV_SUB_ALT(WF_symm_kpoint)(b_to_load,ikbz,Xk,WF_k_out) ! else ! -#ifdef _CUDA_LOC - !$cuf kernel do(1) <<<*,*>>> -#endif + !DEV_CUF kernel do(1) <<<*,*>>> 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) diff --git a/src/wf_and_fft/WF_symm_kpoint_incl.F b/src/wf_and_fft/WF_symm_kpoint_incl.F index a604582975..ebe569e525 100644 --- a/src/wf_and_fft/WF_symm_kpoint_incl.F +++ b/src/wf_and_fft/WF_symm_kpoint_incl.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL +! +! Copyright (C) 2006 The Yambo Team ! ! Authors (see AUTHORS file for details): AF -! -! 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. ! ! diff --git a/src/wf_and_fft/eval_GradOperator.F b/src/wf_and_fft/eval_GradOperator.F index cc0893800f..5c340f590a 100644 --- a/src/wf_and_fft/eval_GradOperator.F +++ b/src/wf_and_fft/eval_GradOperator.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG -! -! 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. +! Copyright (C) 2011 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): MG ! subroutine eval_GradOperator() ! diff --git a/src/wf_and_fft/eval_R_minus_R.F b/src/wf_and_fft/eval_R_minus_R.F index 957efee3b3..c767664cc4 100644 --- a/src/wf_and_fft/eval_R_minus_R.F +++ b/src/wf_and_fft/eval_R_minus_R.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG -! -! 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. +! Copyright (C) 2011 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): MG ! subroutine eval_R_minus_R() ! diff --git a/src/wf_and_fft/fft_1d.F b/src/wf_and_fft/fft_1d.F index 1a395578d5..057b1d2ffa 100644 --- a/src/wf_and_fft/fft_1d.F +++ b/src/wf_and_fft/fft_1d.F @@ -1,27 +1,10 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2009 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): CA ! -#if defined _YPP_RT || defined _YPP_NL #if defined _FFTW subroutine fft_1d(c,n,fft_sign,fftw_plan) ! @@ -77,4 +60,3 @@ subroutine fft_1d(c,n,fft_sign) end subroutine ! #endif -#endif diff --git a/src/wf_and_fft/fft_3d_cuda.F b/src/wf_and_fft/fft_3d_cuda.F index a2a834174c..e365bc0958 100644 --- a/src/wf_and_fft/fft_3d_cuda.F +++ b/src/wf_and_fft/fft_3d_cuda.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AF -! -! 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) 2006 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. -! -! 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): AF ! !===================================================================== ! Driver to 3D FFT: FFTW, Goedecker diff --git a/src/wf_and_fft/fft_3d_fftw.F b/src/wf_and_fft/fft_3d_fftw.F index 6e3d95c0da..0c3155901d 100644 --- a/src/wf_and_fft/fft_3d_fftw.F +++ b/src/wf_and_fft/fft_3d_fftw.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 ! !===================================================================== ! Driver to 3D FFT: FFTW, Goedecker diff --git a/src/wf_and_fft/fft_3d_qe.F b/src/wf_and_fft/fft_3d_qe.F index 0efdc02f4b..f3e9a82ab2 100644 --- a/src/wf_and_fft/fft_3d_qe.F +++ b/src/wf_and_fft/fft_3d_qe.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 ! !===================================================================== ! Driver to 3D FFT from the QE suite of codes. @@ -100,4 +84,3 @@ subroutine fft_3d(c,n,fft_sign) #endif ! end subroutine - diff --git a/src/wf_and_fft/fft_3d_sg.F b/src/wf_and_fft/fft_3d_sg.F index 78b3da4a65..3030c96734 100644 --- a/src/wf_and_fft/fft_3d_sg.F +++ b/src/wf_and_fft/fft_3d_sg.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 ! !===================================================================== ! Driver to 3D FFT: FFTW, Goedecker diff --git a/src/wf_and_fft/fft_check_size.F b/src/wf_and_fft/fft_check_size.F index c904a1c7b3..920c322a08 100644 --- a/src/wf_and_fft/fft_check_size.F +++ b/src/wf_and_fft/fft_check_size.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): DS ! subroutine fft_check_size(iGo_max,NG_C,NG_HF,mode) ! diff --git a/src/wf_and_fft/fft_desc_init.F b/src/wf_and_fft/fft_desc_init.F index 2b2b7fdad5..1ac590ecef 100644 --- a/src/wf_and_fft/fft_desc_init.F +++ b/src/wf_and_fft/fft_desc_init.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AF -! -! 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. +! Copyright (C) 2014 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): AF ! subroutine fft_desc_init(n,iGo_max,dfft) ! diff --git a/src/wf_and_fft/fft_free.F b/src/wf_and_fft/fft_free.F index 437eed9d13..aaddf83e7d 100644 --- a/src/wf_and_fft/fft_free.F +++ b/src/wf_and_fft/fft_free.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine fft_free() ! diff --git a/src/wf_and_fft/fft_setup.F b/src/wf_and_fft/fft_setup.F index 3d3ee98408..73e9d5a992 100644 --- a/src/wf_and_fft/fft_setup.F +++ b/src/wf_and_fft/fft_setup.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine fft_setup(iG_max,iGo_max,ONLY_SIZE) ! diff --git a/src/wf_and_fft/load_cc.F b/src/wf_and_fft/load_cc.F index 410d11c78c..3c18ec213d 100644 --- a/src/wf_and_fft/load_cc.F +++ b/src/wf_and_fft/load_cc.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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): DS ! subroutine load_cc(manage_zero,x_zero_point,n_coord) ! diff --git a/src/wf_and_fft/scatter_Bamp.F b/src/wf_and_fft/scatter_Bamp.F index ecf23f4138..59435bbf41 100644 --- a/src/wf_and_fft/scatter_Bamp.F +++ b/src/wf_and_fft/scatter_Bamp.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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) 2006 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. -! -! 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): AMDSAF ! subroutine DEV_SUB(scatter_Bamp)(isc) ! @@ -41,8 +25,7 @@ subroutine DEV_SUB(scatter_Bamp)(isc) use D_lattice, ONLY:idt_index use R_lattice, ONLY:DEV_VAR(g_rot) use pseudo, ONLY:pp_is_uspp - use FFT_m, ONLY:fft_size,fft_dim,DEV_VAR(fft_g_table) - use FFT_m, ONLY:fftw_plan,cufft_plan + use FFT_m, ONLY:fftw_plan,cufft_plan,fft_size,fft_dim,DEV_VAR(fft_g_table) use interfaces, ONLY:WF_apply_symm ! implicit none @@ -55,7 +38,6 @@ subroutine DEV_SUB(scatter_Bamp)(isc) complex(SP), pointer DEV_ATTR :: rhotw_p(:) complex(DP), pointer DEV_ATTR :: rho_tw_rs_p(:) logical :: have_cuda_loc - ! ! define pointers to enable CUF kernels ! when compiling using CUDA-Fortran @@ -69,14 +51,12 @@ subroutine DEV_SUB(scatter_Bamp)(isc) #ifdef _CUDA_LOC have_cuda_loc=.true. #endif - ! ! |ib ik_is i_sp> call WF_apply_symm(isc%is,WF_symm_i_p) ! ! | ob ok_os o_sp> call WF_apply_symm(isc%os,WF_symm_o_p) - ! ! \tilde{\rho} in Real Space ! @@ -102,33 +82,25 @@ subroutine DEV_SUB(scatter_Bamp)(isc) ! ! ordinary implementation ! -#ifdef _CUDA_LOC - !$cuf kernel do(1) <<<*,*>>> -#else - !$omp parallel default(shared), private(ir) - !$omp do -#endif + !DEV_OMP parallel default(shared), private(ir) + ! + !DEV_CUF kernel do(1) <<<*,*>>> + !DEV_OMP do do ir = 1, fft_size rho_tw_rs_p(ir) = cmplx(conjg(WF_symm_i_p(ir,1))*WF_symm_o_p(ir,1),kind=DP) enddo ! if (n_spinor==2) then -#ifdef _CUDA_LOC - !$cuf kernel do(1) <<<*,*>>> -#else - !$omp do -#endif + !DEV_CUF kernel do(1) <<<*,*>>> + !DEV_OMP do do ir = 1, fft_size rho_tw_rs_p(ir) = rho_tw_rs_p(ir)+cmplx(conjg(WF_symm_i_p(ir,2))*WF_symm_o_p(ir,2),kind=DP) enddo endif -#if !defined _CUDA_LOC - !$omp end parallel -#endif + ! + !DEV_OMP end parallel ! #endif - - ! ! perform the actual FFT ! @@ -184,22 +156,16 @@ subroutine DEV_SUB(scatter_Bamp)(isc) ! if (qs==idt_index) then ! -#ifdef _CUDA_LOC - !$cuf kernel do(1) <<<*,*>>> -#else - !$omp parallel do default(shared), private(ig) -#endif + !DEV_CUF kernel do(1) <<<*,*>>> + !DEV_OMP parallel do default(shared), private(ig) do ig = 1, isc_ngrho rhotw_p(ig)= cmplx(rho_tw_rs_p(DEV_VAR(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 + !DEV_CUF kernel do(1) <<<*,*>>> + !DEV_OMP parallel do default(shared), private(ig) do ig = 1, isc_ngrho rhotw_p(ig)= cmplx(rho_tw_rs_p(DEV_VAR(fft_g_table)(DEV_VAR(g_rot)(ig,qs),iGo)),kind=SP) enddo @@ -230,4 +196,3 @@ subroutine DEV_SUB(scatter_Bamp)(isc) if (isc%qs(2)==1 .and. isc%is(1)/=isc%os(1)) rhotw_p(1)=cZERO end subroutine DEV_SUB(scatter_Bamp) - diff --git a/src/wf_and_fft/scatter_Bamp_incl.F b/src/wf_and_fft/scatter_Bamp_incl.F index dddb012d5f..024d277f82 100644 --- a/src/wf_and_fft/scatter_Bamp_incl.F +++ b/src/wf_and_fft/scatter_Bamp_incl.F @@ -1,27 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AF -! -! 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) 2006 The Yambo Team ! - +! Authors (see AUTHORS file for details): AF ! !==================== ! scatter_Bamp (cpu) @@ -30,19 +12,14 @@ #include #undef _CUDA_LOC #include"scatter_Bamp.F" -! #include - ! !==================== ! scatter_Bamp_gpu !==================== ! #if defined _CUDA - #include #define _CUDA_LOC #include"scatter_Bamp.F" - #endif - diff --git a/src/wf_and_fft/scatter_Bamp_spin.F b/src/wf_and_fft/scatter_Bamp_spin.F index a13b0f6644..e4a331f65c 100644 --- a/src/wf_and_fft/scatter_Bamp_spin.F +++ b/src/wf_and_fft/scatter_Bamp_spin.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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): DS ! subroutine scatter_Bamp_spin(isc,which) ! 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 a0847ea61b..a5ed8745d1 100644 --- a/src/wf_and_fft/scatter_Bamp_using_the_gradient.F +++ b/src/wf_and_fft/scatter_Bamp_using_the_gradient.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! subroutine scatter_Bamp_using_the_gradient(isc,which) ! diff --git a/src/wf_and_fft/scatter_Gamp.F b/src/wf_and_fft/scatter_Gamp.F index 59f8b9b7af..0aefbc13c7 100644 --- a/src/wf_and_fft/scatter_Gamp.F +++ b/src/wf_and_fft/scatter_Gamp.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine DEV_SUB(scatter_Gamp)(isc,mode) ! @@ -36,8 +20,8 @@ subroutine DEV_SUB(scatter_Gamp)(isc,mode) use drivers, ONLY:l_col_cut use collision_el, ONLY:elemental_collision use R_lattice, ONLY:d3q_factor,RIM_ng,RIM_qpg,RIM_is_diagonal,& -& bare_qpg,RIM_anisotropy,RIM_n_rand_pts,cut_is_slab - use R_lattice, ONLY:RIM_qpg_d,bare_qpg_d +& bare_qpg,RIM_anisotropy,RIM_n_rand_pts,cut_is_slab,& +& RIM_qpg_d,bare_qpg_d use deviceXlib_m use timing_m ! @@ -48,12 +32,12 @@ subroutine DEV_SUB(scatter_Gamp)(isc,mode) ! !Working Space ! - integer :: ng(2),ig1,ig2,iq,i1,i2 + integer :: ig1,ig2,iq,i1,i2 logical :: l_RIM real(SP):: reg_q_m2,q_weight,R_sphere ! complex(SP), pointer DEV_ATTR :: gamp_p(:,:) - integer :: ng1, ng2 + integer :: ng_rows1,ng_rows2,ng_cols1,ng_cols2 #ifdef _CUDA_LOC character(32) :: subname="scatter_Gamp_gpu" #else @@ -104,24 +88,27 @@ subroutine DEV_SUB(scatter_Gamp)(isc,mode) endif #endif ! - ng=shape(isc%gamp) - ng1=ng(1) - ng2=ng(2) + ! desipite this information is (or should be) already present + ! in isc%gamp_rows and isc%gamp_cols, here we recompute it + ! in order to protect for gamp allocations done directly + ! via YAMBO_ALLOC instead of using the proper isc allocator + ! + ng_rows1=lbound(DEV_VAR(isc%gamp),1) + ng_rows2=ubound(DEV_VAR(isc%gamp),1) + ng_cols1=lbound(DEV_VAR(isc%gamp),2) + ng_cols2=ubound(DEV_VAR(isc%gamp),2) ! gamp_p => DEV_VAR(isc%gamp) ! -#ifdef _CUDA_LOC - !$cuf kernel do(2) -#else - !$omp parallel do default(shared), private(i1,i2,ig1,ig2,l_RIM), collapse(2) -#endif + !DEV_CUF kernel do(2) + !DEV_OMP parallel do default(shared), private(i1,i2,ig1,ig2,l_RIM), collapse(2) ! - do i1=1,ng1 - do i2=1,ng2 + do i2=ng_cols1,ng_cols2 + do i1=ng_rows1,ng_rows2 ig1=i1 ig2=i2 - if (ng1==1) ig1=ig2 - if (ng2==1) ig2=ig1 + if (ng_rows1==1.and.ng_rows2==1) ig1=ig2 + if (ng_cols1==1.and.ng_cols2==1) ig2=ig1 ! ! RIM support (Both components) ! @@ -187,7 +174,7 @@ subroutine DEV_SUB(scatter_Gamp)(isc,mode) ! ! Anisotropy correction ! - if (.not.l_col_cut) then + if (.not.l_col_cut.and.ng_rows1==1.and.ng_cols1==1) then if (all((/iq==1,RIM_ng>0,mode=='c',RIM_anisotropy/=0._SP/))) gamp_p(1,1)=RIM_anisotropy/2._SP endif ! diff --git a/src/wf_and_fft/scatter_Gamp_incl.F b/src/wf_and_fft/scatter_Gamp_incl.F index 8f66a0903c..64b7ce4c7f 100644 --- a/src/wf_and_fft/scatter_Gamp_incl.F +++ b/src/wf_and_fft/scatter_Gamp_incl.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL +! +! Copyright (C) 2006 The Yambo Team ! ! Authors (see AUTHORS file for details): AF -! -! 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. ! ! diff --git a/src/wf_and_fft/scatter_Modscr.F b/src/wf_and_fft/scatter_Modscr.F index baa77e07f7..461c5fd58b 100644 --- a/src/wf_and_fft/scatter_Modscr.F +++ b/src/wf_and_fft/scatter_Modscr.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG,DV -! -! 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) 2006 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. -! -! 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): MGDV ! subroutine scatter_ModScr(isc,mu) ! diff --git a/src/xc_functionals/Build_F_xc_mat.F b/src/xc_functionals/Build_F_xc_mat.F index 0b7d8f96e5..f120e69cf1 100644 --- a/src/xc_functionals/Build_F_xc_mat.F +++ b/src/xc_functionals/Build_F_xc_mat.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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): DS ! subroutine Build_F_xc_mat(V_xc,F_xc,F_xc_mat) ! @@ -75,15 +59,35 @@ 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 + ! + ! 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 + ! + 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 ! else if (n_spinor==2) then @@ -110,8 +114,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/Build_V_xc_mat.F b/src/xc_functionals/Build_V_xc_mat.F index f0aec338e1..a4bee7ab8c 100644 --- a/src/xc_functionals/Build_V_xc_mat.F +++ b/src/xc_functionals/Build_V_xc_mat.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2014 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. -! -! 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 DS ! subroutine Build_V_xc_mat(V_xc,V_xc_mat) ! diff --git a/src/xc_functionals/RT_project.dep b/src/xc_functionals/RT_project.dep index f38e7965e5..9364187715 100644 --- a/src/xc_functionals/RT_project.dep +++ b/src/xc_functionals/RT_project.dep @@ -1,5 +1,7 @@ XC_libxc_driver.o XC_potential_driver.o el_density_and_current.o + el_density_matrix.o el_magnetization.o + el_magnetization_matrix.o diff --git a/src/xc_functionals/XC_eval_gga_kernel.F b/src/xc_functionals/XC_eval_gga_kernel.F index 10e42009b6..e8865e1446 100644 --- a/src/xc_functionals/XC_eval_gga_kernel.F +++ b/src/xc_functionals/XC_eval_gga_kernel.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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): DS ! subroutine XC_eval_gga_kernel(v1rho,v1sigma,v2rho2,v2rhosigma,v2sigma2) ! diff --git a/src/xc_functionals/XC_eval_gga_potential.F b/src/xc_functionals/XC_eval_gga_potential.F index 8c6b75e0c7..b9aac272db 100644 --- a/src/xc_functionals/XC_eval_gga_potential.F +++ b/src/xc_functionals/XC_eval_gga_potential.F @@ -1,27 +1,11 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): 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. +! Copyright (C) 2012 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): MG DS ! -! 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 XC_eval_gga_potential(v1rho,v1sigma,drho) +subroutine XC_eval_gga_potential(v1rho,v1sigma,drho,V_xc) ! ! Given the partial derivatives, v1rho, v1sigma, provide the vxc_tot: ! Remember sigma = drho(1)^2+drho(2)^2+drho(3)^2 @@ -35,7 +19,7 @@ subroutine XC_eval_gga_potential(v1rho,v1sigma,drho) use QP_m, ONLY:QP_ng_Vxc use D_lattice, ONLY:alat use electrons, ONLY:n_spin - use xc_functionals,ONLY:xc_spin,V_xc + use xc_functionals,ONLY:xc_spin use FFT_m, ONLY:fft_size,fft_dim,fft_g_table #if defined _FFTW use FFT_m, ONLY:fftw_plan @@ -45,6 +29,7 @@ subroutine XC_eval_gga_potential(v1rho,v1sigma,drho) ! real(DP),intent(in) :: v1rho(n_spin,fft_size),v1sigma(xc_spin(1),fft_size) real(SP),intent(in) :: drho(fft_size,n_spin,3) + real(SP),intent(inout) :: V_xc(fft_size,n_spin) ! ! Work space ! @@ -105,7 +90,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_eval_lda_kernel.F b/src/xc_functionals/XC_eval_lda_kernel.F index 96783f32d9..7f229f72dd 100644 --- a/src/xc_functionals/XC_eval_lda_kernel.F +++ b/src/xc_functionals/XC_eval_lda_kernel.F @@ -1,29 +1,13 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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): DS ! 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 @@ -58,15 +42,12 @@ subroutine XC_eval_lda_kernel(v1rho,v2rho2) 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 + ! 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 2,1 means -- and 12 ++ (or viceversa, to be checked) - F_xc(:,2,1)=F_xc(:,1,2) + ! Here 1,1 means -- and 22 ++ (or viceversa, to be checked) + F_xc(:,2,2)=F_xc(:,1,1) endif endif ! diff --git a/src/xc_functionals/XC_eval_pbe-gaux.F b/src/xc_functionals/XC_eval_pbe-gaux.F index 8e9f48fdda..7f40d91c68 100644 --- a/src/xc_functionals/XC_eval_pbe-gaux.F +++ b/src/xc_functionals/XC_eval_pbe-gaux.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DV -! -! 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. +! Copyright (C) 2019 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): DV ! subroutine XC_eval_pbegaux(spin_rho_DP,sigma,exsr,vx1,vx2) diff --git a/src/xc_functionals/XC_libxc_driver.F b/src/xc_functionals/XC_libxc_driver.F index f6c17abe94..f45232d9a3 100644 --- a/src/xc_functionals/XC_libxc_driver.F +++ b/src/xc_functionals/XC_libxc_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG, DS, DV -! -! 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) 2010 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. -! -! 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): MG DS DV ! subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) ! @@ -30,6 +14,8 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) ! To do: compute a more precise drho also in the case n_spin>1 (see comment around line 200) ! use pars, ONLY:SP,DP,IPL,pi,pi_DP,RZERO + use com, ONLY:msg + use parser_m, ONLY:parser use R_lattice, ONLY:bz_samp use D_lattice, ONLY:DL_vol,alat use drivers, ONLY:l_real_time,l_nl_optics @@ -60,17 +46,18 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) ! ! Work Space ! - integer :: i1,i2,is_xc,is1,is2,ixc,ifft + logical :: l_Fxc_from_Vxc + integer :: i1,i2,is_xc,is1,is2,ixc,ifft,ORDER_NOW integer(IPL) :: size_IPL real(SP) :: mod_magn real(SP) :: local_exx_fraction - real(DP) :: exsr + real(DP) :: exsr,PERT_FAC ! ! XC routines arrays ! real(SP) :: spin_rho_SP(fft_size,n_spin),rho(fft_size) real(DP) :: spin_rho_DP(n_spin,fft_size),rspts(fft_size) - real(SP),allocatable:: drho(:,:,:),drho_tmp(:,:) + real(SP),allocatable:: drho(:,:,:),drho_tmp(:,:),V_xc_pert(:,:) real(DP),allocatable:: sigma(:,:) complex(SP), allocatable:: drho_cmplx(:,:) complex(SP), allocatable:: spin_rho_SP_cmplx(:) @@ -81,7 +68,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 + logical :: EvaluateDGradient,l_Fxc_Libxc ! ! Functional and Functional infos ! @@ -91,6 +78,9 @@ 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 @@ -156,7 +146,16 @@ 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) + ! DEBUG < + ! 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 + ! DEBUG > + enddo + enddo ! !============================= ! Electronic density gradient @@ -169,7 +168,7 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) YAMBO_ALLOC(v1rho,(n_spin,fft_size)) v1rho=0._DP endif - if (ORDER==2) then + if (ORDER==2.and..not.l_Fxc_from_Vxc) then YAMBO_ALLOC(v2rho2,(xc_spin(1),fft_size)) v2rho2=0._DP endif @@ -182,7 +181,7 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) YAMBO_ALLOC(v1sigma,(xc_spin(1),fft_size)) v1sigma=0._DP endif - if (ORDER==2) then + if (ORDER==2.and..not.l_Fxc_from_Vxc) then YAMBO_ALLOC(v2rhosigma,(xc_spin(1)*n_spin,fft_size)) YAMBO_ALLOC(v2sigma2,(xc_spin(1)*n_spin,fft_size)) v2rhosigma=0._DP @@ -195,9 +194,6 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) vx2=0._DP endif ! - ! DS. To do: compute a more precise drho also in the case n_spin>1 - ! This is particularly important for the case order=2 - ! if (n_spin>1 .or. order<2) then YAMBO_ALLOC(drho_cmplx,(fft_size,3)) YAMBO_ALLOC(spin_rho_SP_cmplx,(fft_size)) @@ -209,6 +205,9 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) YAMBO_FREE(drho_cmplx) YAMBO_FREE(spin_rho_SP_cmplx) else + ! DS: This procedure computes a more precise drho (much less noise) + ! This is particularly important for the case order=2 + ! To do: Extend the procedure to the case n_spin>1 YAMBO_ALLOC(drho_tmp,(fft_size,3)) call el_density_and_current(en,Xk,drho=drho_tmp) drho(:,1,:) = drho_tmp(:,:) @@ -221,12 +220,11 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) do is1 = 1,n_spin do is2 = is1,n_spin is_xc = xc_spin_map1(is1,is2) - sigma(is_xc,i1) = drho(i1,is1,1)*drho(i1,is2,1)+drho(i1,is1,2)*drho(i1,is2,2)+drho(i1,is1,3)*drho(i1,is2,3) + sigma(is_xc,i1) = real(drho(i1,is1,1)*drho(i1,is2,1)+drho(i1,is1,2)*drho(i1,is2,2)+drho(i1,is1,3)*drho(i1,is2,3),DP) end do end do end do ! - ! endif ! !=========================== @@ -254,29 +252,47 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) ! size_IPL=int(fft_size,kind=IPL) ! + ORDER_NOW=ORDER + if (l_Fxc_from_Vxc.and.ORDER==2) then + call msg('s',' 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)) + V_xc_pert=0._SP + endif do ixc = 1,2 if (fnctl(ixc)%id == 0) cycle if (fnctl(ixc)%family==XC_FAMILY_LDA) then - select case(ORDER) + select case(ORDER_NOW) case(0) 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, 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) + 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) + spin_rho_DP=spin_rho_DP/PERT_FAC + endif 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 - call XC_eval_lda_kernel(v1rho,v2rho2) + ! 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 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 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) + select case(ORDER_NOW) case(0) 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) @@ -289,17 +305,29 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) v1sigma=v1sigma-(EXX_FRACTION*vx2)/2._DP endif ! Yambo internal for V_xc - call XC_eval_gga_potential(v1rho,v1sigma,drho) + call XC_eval_gga_potential(v1rho,v1sigma,drho,V_xc) + if (l_Fxc_from_Vxc.and.ORDER==2) then + spin_rho_DP=spin_rho_DP*PERT_FAC + sigma =sigma *PERT_FAC + 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_eval_gga_potential(v1rho,v1sigma,drho,V_xc_pert) + spin_rho_DP=spin_rho_DP/PERT_FAC + sigma =sigma /PERT_FAC + 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 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,V_xc) 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) + ! 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 end select end if call xc_f03_func_end(fnctl(ixc)%conf) @@ -310,6 +338,13 @@ 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 + do ifft=1,fft_size + if (abs(spin_rho_DP(1,ifft))<1.E-7_DP) cycle + F_xc(ifft,1,1)=real( real(V_xc_pert(ifft,1)-V_xc(ifft,1),DP)/(spin_rho_DP(1,ifft)*(PERT_FAC-1._DP)),SP) + enddo + endif + ! if (EvaluateDGradient) then YAMBO_FREE(sigma) YAMBO_FREE(drho) diff --git a/src/xc_functionals/XC_nlcc_setup.F b/src/xc_functionals/XC_nlcc_setup.F index 265e758ec9..a91af5a763 100644 --- a/src/xc_functionals/XC_nlcc_setup.F +++ b/src/xc_functionals/XC_nlcc_setup.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AF -! -! 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) 2017 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. -! -! 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): AF ! subroutine XC_nlcc_setup() ! diff --git a/src/xc_functionals/XC_potential_driver.F b/src/xc_functionals/XC_potential_driver.F index a52afab384..212161d07c 100644 --- a/src/xc_functionals/XC_potential_driver.F +++ b/src/xc_functionals/XC_potential_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG 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. +! Copyright (C) 2010 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): MG AM ! !> @brief Calculate exchange-correlation energy and its derivatives !! diff --git a/src/xc_functionals/el_density_and_current.F b/src/xc_functionals/el_density_and_current.F index e4140698ef..5b0cdea18c 100644 --- a/src/xc_functionals/el_density_and_current.F +++ b/src/xc_functionals/el_density_and_current.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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. -! -! 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 DS ! subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion) ! @@ -57,7 +41,7 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion) use com, ONLY:msg use stderr, ONLY:real2ch use electrons, ONLY:levels,n_spinor,n_sp_pol - use R_lattice, ONLY:bz_samp,b + use R_lattice, ONLY:bz_samp 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 @@ -66,7 +50,7 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion) use wave_func, ONLY:WF 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 @@ -97,7 +81,7 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion) real(SP) :: f_occ,rho_no_sym(fft_size),drho_no_sym(fft_size,3),J_no_sym(fft_size,3) real(SP) :: raux complex(SP), allocatable :: WF_der(:,:,:) - complex(DP), allocatable :: rhog_aug_DP(:,:), wf_DP(:), aux_DP(:) + complex(DP), allocatable :: rhog_aug_DP(:,:), aux_DP(:) logical :: warn_done,l_si,l_rho,l_drho,l_J ! #if defined _RT @@ -118,7 +102,8 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion) endif ! if (l_drho) then - call warning(" USPP corrections to rho gradient not implemented") + 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,(fft_size,n_spinor,3)) drho =0._SP drho_no_sym=0._SP diff --git a/src/xc_functionals/el_density_matrix.F b/src/xc_functionals/el_density_matrix.F index d89595cd20..32a51d256f 100644 --- a/src/xc_functionals/el_density_matrix.F +++ b/src/xc_functionals/el_density_matrix.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, DS +! Copyright (C) 2013 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. -! -! 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. +! Authors (see AUTHORS file for details): AM DS ! subroutine el_density_matrix(G_lesser,en,Xk,rho,lowest_band) ! diff --git a/src/xc_functionals/el_density_of_states.F b/src/xc_functionals/el_density_of_states.F index e3f3d291f8..817ff9608c 100644 --- a/src/xc_functionals/el_density_of_states.F +++ b/src/xc_functionals/el_density_of_states.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): DS AM ! subroutine el_density_of_states(Xk,Xen,dos_E,DOS_broadening,DOS_bands,dos_value,& & USE_the_DbGd,USE_Eo,USE_W,USE_occupations,WF_fac,PDOS_fac) @@ -40,8 +24,8 @@ subroutine el_density_of_states(Xk,Xen,dos_E,DOS_broadening,DOS_bands,dos_value, integer, intent(in) :: DOS_bands(2) real(SP), intent(out) :: dos_value(n_spin) logical, optional, intent(in) :: USE_Eo,USE_W,USE_the_DbGd,USE_occupations - real(SP), optional, intent(in) :: WF_fac(:,:,:) - real(SP), optional, intent(in) :: PDOS_fac(:,:,:) + real(SP), pointer, optional, intent(in) :: WF_fac(:,:,:) + real(SP), pointer, optional, intent(in) :: PDOS_fac(:,:,:) ! ! Work space ! @@ -65,8 +49,11 @@ subroutine el_density_of_states(Xk,Xen,dos_E,DOS_broadening,DOS_bands,dos_value, USE_occ=.FALSE. if (present(USE_occupations)) USE_occ=USE_occupations ! - USE_WFs =present(WF_fac) - USE_PDOS=present(PDOS_fac) + USE_WFs =.FALSE. + if(present(WF_fac)) USE_WFs = associated(WF_fac) + ! + USE_PDOS =.FALSE. + if(present(PDOS_fac)) USE_PDOS = associated(PDOS_fac) ! DOS_broadening_=DOS_broadening ! @@ -109,8 +96,8 @@ subroutine el_density_of_states(Xk,Xen,dos_E,DOS_broadening,DOS_bands,dos_value, ! if (n_spinor==2) then if (USE_WFs) then - proj_fac(1)=proj_fac(1)*WF_fac(ib-DOS_bands(1)+1,ik,1) - proj_fac(2)=proj_fac(2)*WF_fac(ib-DOS_bands(1)+1,ik,2) + proj_fac(1)=proj_fac(1)*WF_fac(ib,ik,1) + proj_fac(2)=proj_fac(2)*WF_fac(ib,ik,2) else proj_fac =proj_fac*0.5_SP endif @@ -118,7 +105,7 @@ subroutine el_density_of_states(Xk,Xen,dos_E,DOS_broadening,DOS_bands,dos_value, ! ! Project on PSOC coefficients ! - if (USE_PDOS) proj_fac=proj_fac*PDOS_fac(ib-DOS_bands(1)+1,ik,i_sp_pol) + if (USE_PDOS) proj_fac=proj_fac*PDOS_fac(ib,ik,i_sp_pol) ! ! Sum-up ! diff --git a/src/xc_functionals/el_magnetization.F b/src/xc_functionals/el_magnetization.F index d59e63471a..6e243e3090 100644 --- a/src/xc_functionals/el_magnetization.F +++ b/src/xc_functionals/el_magnetization.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): -! -! 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) 2006 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. -! -! 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): ! subroutine el_magnetization(en,Xk,magn,bands) ! diff --git a/src/xc_functionals/el_magnetization_matrix.F b/src/xc_functionals/el_magnetization_matrix.F index 2d79d271bf..cc1690ae81 100644 --- a/src/xc_functionals/el_magnetization_matrix.F +++ b/src/xc_functionals/el_magnetization_matrix.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): -! -! 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) 2006 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. -! -! 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): ! subroutine el_magnetization_matrix(G_lesser,en,Xk,magn,lowest_band) ! diff --git a/src/xc_functionals/xc_rpa_kp.F b/src/xc_functionals/xc_rpa_kp.F index 43b9b2b98a..039a51d059 100644 --- a/src/xc_functionals/xc_rpa_kp.F +++ b/src/xc_functionals/xc_rpa_kp.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 ! subroutine xc_rpa_kp(rs,exc) ! diff --git a/ypp/bits/WANNIER_driver.F b/ypp/bits/WANNIER_driver.F index 496c1ce5a9..eaab628c66 100644 --- a/ypp/bits/WANNIER_driver.F +++ b/ypp/bits/WANNIER_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM AR -! -! 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) 2016 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. -! -! 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 AR ! subroutine WANNIER_driver(k,E) ! diff --git a/ypp/bits/WF_map_perturbative_SOC.F b/ypp/bits/WF_map_perturbative_SOC.F index ccacd86922..ab55cfb161 100644 --- a/ypp/bits/WF_map_perturbative_SOC.F +++ b/ypp/bits/WF_map_perturbative_SOC.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): DS ! subroutine WF_map_perturbative_SOC(kpt,En) ! diff --git a/ypp/dipoles/DIPOLE_ypp_driver.F b/ypp/dipoles/DIPOLE_ypp_driver.F index 68701c1cdc..ad08a43d04 100644 --- a/ypp/dipoles/DIPOLE_ypp_driver.F +++ b/ypp/dipoles/DIPOLE_ypp_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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 ! subroutine DIPOLE_ypp_driver(k,E,q) ! diff --git a/ypp/el-ph/ELPH_atomic_amplitude.F b/ypp/el-ph/ELPH_atomic_amplitude.F index 3b88410189..7add6b2493 100644 --- a/ypp/el-ph/ELPH_atomic_amplitude.F +++ b/ypp/el-ph/ELPH_atomic_amplitude.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine ELPH_atomic_amplitude(q) ! diff --git a/ypp/el-ph/ELPH_databases.F b/ypp/el-ph/ELPH_databases.F index 353fd894ec..2263d3416c 100644 --- a/ypp/el-ph/ELPH_databases.F +++ b/ypp/el-ph/ELPH_databases.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine ELPH_databases(k,E,q) ! diff --git a/ypp/el-ph/ELPH_databases_IO_elemental.F b/ypp/el-ph/ELPH_databases_IO_elemental.F index f345ead0cb..314764825b 100644 --- a/ypp/el-ph/ELPH_databases_IO_elemental.F +++ b/ypp/el-ph/ELPH_databases_IO_elemental.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! integer function ELPH_databases_IO_elemental(what,IDB) ! diff --git a/ypp/el-ph/ELPH_databases_IO_freqs.F b/ypp/el-ph/ELPH_databases_IO_freqs.F index 41f95fd353..dec5f6faad 100644 --- a/ypp/el-ph/ELPH_databases_IO_freqs.F +++ b/ypp/el-ph/ELPH_databases_IO_freqs.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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. -! -! 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 FP ! subroutine ELPH_databases_IO_freqs(ph_file,n_q,q_pt,ph_freqs) ! diff --git a/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F b/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F index 3405aa3b22..c2445e35ee 100644 --- a/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F +++ b/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine ELPH_databases_IO_gkkp_expand(mode,iq,iq_s,k,q,qindx_ID,qindx_ID_frag,GKKP) ! diff --git a/ypp/el-ph/ELPH_databases_IO_grids_check.F b/ypp/el-ph/ELPH_databases_IO_grids_check.F index 5ee4590575..324d60cb9b 100644 --- a/ypp/el-ph/ELPH_databases_IO_grids_check.F +++ b/ypp/el-ph/ELPH_databases_IO_grids_check.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2012 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. -! -! 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 FP ! subroutine ELPH_databases_IO_grids_check(k) ! diff --git a/ypp/el-ph/ELPH_databases_IO_modes.F b/ypp/el-ph/ELPH_databases_IO_modes.F index 9604af8f42..33366df70b 100644 --- a/ypp/el-ph/ELPH_databases_IO_modes.F +++ b/ypp/el-ph/ELPH_databases_IO_modes.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CA, 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. +! Copyright (C) 2021 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. -! -! 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): CA AM FP ! subroutine ELPH_databases_IO_modes(ph_file,n_q,q_pt,ph_freqs,ph_pol) ! diff --git a/ypp/el-ph/ELPH_databases_IO_pol_and_freqs.F b/ypp/el-ph/ELPH_databases_IO_pol_and_freqs.F index 41c2746aab..a0ebeacb5e 100644 --- a/ypp/el-ph/ELPH_databases_IO_pol_and_freqs.F +++ b/ypp/el-ph/ELPH_databases_IO_pol_and_freqs.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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 FP ! subroutine ELPH_databases_IO_pol_and_freqs(IDB) ! 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 6e83ff231e..ba1b83ed86 100644 --- a/ypp/el-ph/ELPH_databases_IO_transfer_and_write.F +++ b/ypp/el-ph/ELPH_databases_IO_transfer_and_write.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine ELPH_databases_IO_transfer_and_write(IDB,k,E,GKKP) ! diff --git a/ypp/el-ph/ELPH_double_grid.F b/ypp/el-ph/ELPH_double_grid.F index 66558aeb7a..e79d6299d0 100644 --- a/ypp/el-ph/ELPH_double_grid.F +++ b/ypp/el-ph/ELPH_double_grid.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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): CA ! subroutine ELPH_double_grid(k,E,q) ! @@ -221,7 +205,7 @@ subroutine ELPH_double_grid(k,E,q) ! endif ! - if(any(E%nbm/=E%nbf)) call error("ELPH_double_grid: This code for the moment works only for semiconductors/insulators") + if(any(E%nbm/=E%nbf)) call warning("Metallic system") ! ! Final I/O !=========== diff --git a/ypp/el-ph/ELPH_eliashberg_dos.F b/ypp/el-ph/ELPH_eliashberg_dos.F index 449de985db..827f35b431 100644 --- a/ypp/el-ph/ELPH_eliashberg_dos.F +++ b/ypp/el-ph/ELPH_eliashberg_dos.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine ELPH_eliashberg_dos(k,en,q) ! diff --git a/ypp/el-ph/ELPH_excitonic_gkkp.F b/ypp/el-ph/ELPH_excitonic_gkkp.F index dc56073258..ff8a4539b7 100644 --- a/ypp/el-ph/ELPH_excitonic_gkkp.F +++ b/ypp/el-ph/ELPH_excitonic_gkkp.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine ELPH_excitonic_gkkp(Xk) ! diff --git a/ypp/el-ph/ELPH_general_gFsq.F b/ypp/el-ph/ELPH_general_gFsq.F index 1969312ad3..1889d2128d 100644 --- a/ypp/el-ph/ELPH_general_gFsq.F +++ b/ypp/el-ph/ELPH_general_gFsq.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine ELPH_general_gFsq(k,en,Xk,Xen,q,BS_E_degs) ! diff --git a/ypp/el-ph/ELPH_plot_gkkp.F b/ypp/el-ph/ELPH_plot_gkkp.F index 766934aca4..fc7d6b68ae 100644 --- a/ypp/el-ph/ELPH_plot_gkkp.F +++ b/ypp/el-ph/ELPH_plot_gkkp.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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): CA ! subroutine ELPH_plot_gkkp(k,E,q) ! diff --git a/ypp/el-ph/Eliashberg_Dos_Func.F b/ypp/el-ph/Eliashberg_Dos_Func.F index b0bf54a826..d6ccceaa37 100644 --- a/ypp/el-ph/Eliashberg_Dos_Func.F +++ b/ypp/el-ph/Eliashberg_Dos_Func.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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): CA ! real(SP) function Eliashberg_Dos_Func(iq,im,ph_en, ph_broad, PH_E, q) ! diff --git a/ypp/el-ph/YPP_ELPH_project.dep b/ypp/el-ph/YPP_ELPH_project.dep new file mode 100644 index 0000000000..77cfe8cedd --- /dev/null +++ b/ypp/el-ph/YPP_ELPH_project.dep @@ -0,0 +1,16 @@ + ELPH_atomic_amplitude.o + ELPH_databases.o + ELPH_databases_IO_elemental.o + ELPH_databases_IO_freqs.o + ELPH_databases_IO_gkkp_expand.o + ELPH_databases_IO_grids_check.o + ELPH_databases_IO_modes.o + ELPH_databases_IO_pol_and_freqs.o + ELPH_databases_IO_transfer_and_write.o + ELPH_double_grid.o + ELPH_eliashberg_dos.o + ELPH_excitonic_gkkp.o + ELPH_general_gFsq.o + ELPH_plot_gkkp.o + Eliashberg_Dos_Func.o + diff --git a/ypp/electrons/ELPH_project.dep b/ypp/electrons/ELPH_project.dep deleted file mode 100644 index e977d2707c..0000000000 --- a/ypp/electrons/ELPH_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - electrons_WFs.o - diff --git a/ypp/electrons/RT_project.dep b/ypp/electrons/RT_project.dep deleted file mode 100644 index 3146dd7eb7..0000000000 --- a/ypp/electrons/RT_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - electrons_bands_interpolate.o - diff --git a/ypp/electrons/SC_project.dep b/ypp/electrons/SC_project.dep deleted file mode 100644 index b75af2485b..0000000000 --- a/ypp/electrons/SC_project.dep +++ /dev/null @@ -1,4 +0,0 @@ - electrons_WFs.o - electrons_bands.o - electrons_driver.o - diff --git a/ypp/electrons/YPP_SC_project.dep b/ypp/electrons/YPP_SC_project.dep index b75af2485b..b8b85d1ce5 100644 --- a/ypp/electrons/YPP_SC_project.dep +++ b/ypp/electrons/YPP_SC_project.dep @@ -1,4 +1,7 @@ electrons_WFs.o + electrons_WFs_proj_interpolate.o + electrons_angular_momentum.o electrons_bands.o electrons_driver.o + electrons_position.o diff --git a/ypp/electrons/electrons_WFs.F b/ypp/electrons/electrons_WFs.F index bc11eee9d1..35b6465562 100644 --- a/ypp/electrons/electrons_WFs.F +++ b/ypp/electrons/electrons_WFs.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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. -! -! 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 ! subroutine electrons_WFs(Xen) ! diff --git a/ypp/electrons/electrons_WFs_proj_interpolate.F b/ypp/electrons/electrons_WFs_proj_interpolate.F index 60e08c7286..cf9cfd3569 100644 --- a/ypp/electrons/electrons_WFs_proj_interpolate.F +++ b/ypp/electrons/electrons_WFs_proj_interpolate.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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. -! -! 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): DS ! subroutine electrons_WFs_proj_interpolate(Xen,SEED_k,OUT_k,BANDS_range,proj_fac,ID_proj) ! diff --git a/ypp/electrons/electrons_angular_momentum.F b/ypp/electrons/electrons_angular_momentum.F index e35e1c355a..251b904ad5 100644 --- a/ypp/electrons/electrons_angular_momentum.F +++ b/ypp/electrons/electrons_angular_momentum.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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. -! -! 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 DS ! subroutine electrons_angular_momentum(nkpt_angular,nband_angular) ! diff --git a/ypp/electrons/electrons_bands.F b/ypp/electrons/electrons_bands.F index 50561bc783..ea305ea32f 100644 --- a/ypp/electrons/electrons_bands.F +++ b/ypp/electrons/electrons_bands.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CA, DS, AM +! Copyright (C) 2015 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. -! -! 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. +! Authors (see AUTHORS file for details): CA DS AM ! subroutine electrons_bands(Xk,Xen) ! @@ -110,7 +94,7 @@ subroutine electrons_bands(Xk,Xen) call k_circuit_driver( BANDS_path, BANDS_steps ) if (CIRCUIT_k%nbz==0.and..not.GRID_interpolate) then call k_special(.TRUE.) - call error('No BZ circuit defined in input') + call error(' [electrons_bands] No BZ circuit defined in input') endif ! if (BANDS_interpolated.or.l_PROJECT_plane) then diff --git a/ypp/electrons/electrons_bands_interpolate.F b/ypp/electrons/electrons_bands_interpolate.F index 947ac1ab1e..ff654a40ef 100644 --- a/ypp/electrons/electrons_bands_interpolate.F +++ b/ypp/electrons/electrons_bands_interpolate.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CA, DS, AM +! Copyright (C) 2015 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. -! -! 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. +! Authors (see AUTHORS file for details): CA DS AM ! subroutine electrons_bands_interpolate(Xen,Xk,BANDS_range,ID_bands,CIRCUIT_E,GRID_E,CIRCUIT_dE) ! @@ -57,7 +41,7 @@ subroutine electrons_bands_interpolate(Xen,Xk,BANDS_range,ID_bands,CIRCUIT_E,GRI ! if (any(BANDS_range<=0)) call error(" Wrong bands range") ! - if (BANDS_range(2)-BANDS_range(1)+1>20) call error(" YPP cannot interpolate more than 20 bands. Reduce bands range") + if (BANDS_range(2)-BANDS_range(1)+1>40) call error(" YPP cannot interpolate more than 40 bands. Reduce bands range") ! l_interp_dE= (allocated(Xen%Eo).and.BANDS_from_db) ! diff --git a/ypp/electrons/electrons_current.F b/ypp/electrons/electrons_current.F index 16f838f209..0b871eca38 100644 --- a/ypp/electrons/electrons_current.F +++ b/ypp/electrons/electrons_current.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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. -! -! 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 ! subroutine electrons_current(Xk,Xen) ! diff --git a/ypp/electrons/electrons_density.F b/ypp/electrons/electrons_density.F index b2445d1969..60d8529047 100644 --- a/ypp/electrons/electrons_density.F +++ b/ypp/electrons/electrons_density.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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. -! -! 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 ! subroutine electrons_density(Xk,Xen) ! diff --git a/ypp/electrons/electrons_dos.F b/ypp/electrons/electrons_dos.F index 38d07f2a7c..20a14ab455 100644 --- a/ypp/electrons/electrons_dos.F +++ b/ypp/electrons/electrons_dos.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, DS +! Copyright (C) 2015 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. -! -! 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. +! Authors (see AUTHORS file for details): AM DS ! subroutine electrons_dos(Xk,Xen) ! @@ -48,8 +32,12 @@ subroutine electrons_dos(Xk,Xen) real(SP) :: dos_E(DOS_E_steps),values(DOS_bands(2)+4),dos_integral(2) real(SP), external :: RIntegrate real(SP), allocatable :: el_dos(:,:,:) - integer :: i_E,i_f,N_files,is,ib,ik,ikbz,ID_E,ID_f,ID_spin,ID_pdos,ID_bare_spin,ID_bare_pdos,ik_path,n_t - character(schlen) :: titles(DOS_bands(2)+4) + real(SP), pointer :: spin_fac(:,:,:) => null() + real(SP), pointer :: magn_fac(:,:,:) => null() + real(SP), pointer :: pdos_fac(:,:,:) => null() + integer :: i_E,i_f,N_files,N_grid_files,ival,is,ib,ik,ikbz,ID_E,ID_f, & + & ID_spin,ID_magn,ID_pdos,ik_path,n_t + character(schlen) :: base_fname,titles(DOS_bands(2)+4) logical :: l_DbGd type(levels) :: GRID_E integer, external :: PROJECTION_k_on_the_path_or_plane @@ -91,28 +79,25 @@ subroutine electrons_dos(Xk,Xen) ! Use the INTERPOLATE structure to pass the arrays to the el_density_of_states via the ! intermediate electrons_dos_elemental. ! - ID_bare_pdos=0 if (l_PROJECT_atom) then - ID_bare_pdos=1 - INTERP_obj(ID_bare_pdos)%in_use=.TRUE. - YAMBO_ALLOC(INTERP_obj(ID_bare_pdos)%INTERP,(DOS_bands(1):DOS_bands(2),Xk%nibz,n_sp_pol)) - call electrons_pdos_factors((/1,Xk%nibz/),DOS_bands,INTERP_obj(ID_bare_pdos)%INTERP) + YAMBO_ALLOC_P(pdos_fac,(DOS_bands(1):DOS_bands(2),Xk%nibz,n_sp_pol)) + call electrons_pdos_factors((/1,Xk%nibz/),DOS_bands,pdos_fac) endif ! - ID_bare_spin=0 if (n_spinor==2) then - ID_bare_spin=ID_bare_pdos+1 - INTERP_obj(ID_bare_spin)%in_use=.TRUE. - YAMBO_ALLOC(INTERP_obj(ID_bare_spin)%INTERP,(DOS_bands(1):DOS_bands(2),Xk%nibz,n_spinor)) - call electrons_spin_factors((/1,Xk%nibz/),DOS_bands,INTERP_obj(ID_bare_spin)%INTERP) + YAMBO_ALLOC_P(spin_fac,(DOS_bands(1):DOS_bands(2),Xk%nibz,n_spinor)) + call electrons_spin_factors((/1,Xk%nibz/),DOS_bands,spin_fac) + YAMBO_ALLOC_P(magn_fac,(DOS_bands(1):DOS_bands(2),Xk%nibz,3)) + call electrons_magn_factors((/1,Xk%nibz/),DOS_bands,magn_fac) endif ! if (.not.l_PROJECT_line) then - call electrons_dos_elemental(Xk,Xen,DOS_bands,el_dos(:,:,1),dos_E,ID_bare_spin,ID_bare_pdos,USE_the_DbGd=l_DbGD) + call electrons_dos_elemental(Xk,Xen,DOS_bands,el_dos(:,:,1),dos_E,spin_fac,pdos_fac,USE_the_DbGd=l_DbGD) endif ! ! Define the regular grid for interpolation if (all(interp_grid>0)) !=================================================================== + N_grid_files=1 N_files=1 ID_E =0 ID_f =0 @@ -134,47 +119,69 @@ subroutine electrons_dos(Xk,Xen) ! ID_pdos=0 if (l_PROJECT_atom) then - call INTERPOLATION_driver_seed("PDOS_factors_on_built_in",ID_pdos,DOS_bands,Xk,SEED_R3=INTERP_obj(ID_bare_pdos)%INTERP) + call INTERPOLATION_driver_seed("PDOS_factors_on_built_in",ID_pdos,DOS_bands,Xk,SEED_R3=pdos_fac) call INTERPOLATION_driver_do("PDOS_factors_on_built_in",ID_pdos,GRID_k) endif ! ID_spin=0 + ID_magn=0 if (n_spinor==2) then - call INTERPOLATION_driver_seed("SPIN_factors_on_built_in",ID_spin,DOS_bands,Xk,SEED_R3=INTERP_obj(ID_bare_spin)%INTERP) + N_grid_files=N_grid_files+2 + call INTERPOLATION_driver_seed("SPIN_factors_on_built_in",ID_spin,DOS_bands,Xk,SEED_R3=spin_fac) call INTERPOLATION_driver_do("SPIN_factors_on_built_in",ID_spin,GRID_k) + N_grid_files=N_grid_files+3 + call INTERPOLATION_driver_seed("MAGN_factors_on_built_in",ID_magn,DOS_bands,Xk,SEED_R3=magn_fac) + call INTERPOLATION_driver_do("MAGN_factors_on_built_in",ID_magn,GRID_k) endif ! + do i_f=1,N_grid_files do is=1,n_sp_pol ! if (DOS_bands(2)-DOS_bands(1)>10) cycle if (.not.allocated(GRID_k%ptbz)) cycle ! - output_fname="grid" - if (n_sp_pol>1.and.is==1) output_fname="grid_spin-up" - if (n_sp_pol>1.and.is==2) output_fname="grid_spin-db" + if (i_f==1) base_fname="Egrid" + if (i_f>=2) base_fname="Sgrid" + if (i_f>=4) base_fname="Mgrid" + ! + output_fname=trim(base_fname) + ! + if (i_f==2) output_fname=trim(base_fname)//"_spin-up" + if (i_f==3) output_fname=trim(base_fname)//"_spin-dn" + if (i_f==4) output_fname=trim(base_fname)//"_Mx" + if (i_f==5) output_fname=trim(base_fname)//"_My" + if (i_f==6) output_fname=trim(base_fname)//"_Mz" + if (n_sp_pol==2.and.is==1) output_fname=trim(base_fname)//"_spin-up" + if (n_sp_pol==2.and.is==2) output_fname=trim(base_fname)//"_spin-dn" ! call of_open_close(trim(output_fname),'ot') ! titles(1) = " ik " titles(2:4)=(/" kx [iku]"," ky [iku]"," kz [iku]"/) do ib=DOS_bands(1),DOS_bands(2) - titles(4+ib-DOS_bands(1)+1)=' b'//trim(intc(ib))//' [eV]' + ival=4+ib-DOS_bands(1)+1 + titles(ival)=' b'//trim(intc(ib)) + if (i_f==1) titles(ival)=trim(titles(ival))//' [eV]' enddo - call msg('o grid','#',titles(:DOS_bands(2)-DOS_bands(1)+5),INDENT=0,USE_TABS=.true.) - call msg('o grid',"#") + call msg('o '//trim(base_fname),'#',titles(:DOS_bands(2)-DOS_bands(1)+5),INDENT=0,USE_TABS=.true.) + call msg('o '//trim(base_fname),"#") ! do ikbz=1,GRID_k%nbz values(2:4)=GRID_k%ptbz(ikbz,:) call K_transform(values(2:4),"iku") ik=GRID_k%sstar(ikbz,1) values(1)=real(ik,SP) - values(1+4:DOS_bands(2)-DOS_bands(1)+5)=GRID_E%E(DOS_bands(1):DOS_bands(2),ik,is)*HA2EV - call msg('o grid',' ',values(:DOS_bands(2)-DOS_bands(1)+5),INDENT=0,USE_TABS=.true.) + ival=DOS_bands(2)-DOS_bands(1) + if (i_f==1) values(5:ival+5)=GRID_E%E(DOS_bands(1):DOS_bands(2),ik,is)*HA2EV + if (i_f>=2.and.i_f<=3) values(5:ival+5)=INTERP_obj(ID_spin)%INTERP(DOS_bands(1):DOS_bands(2),ik,i_f-1) + if (i_f>=4 ) values(5:ival+5)=INTERP_obj(ID_magn)%INTERP(DOS_bands(1):DOS_bands(2),ik,i_f-3) + call msg('o '//trim(base_fname),' ',values(:ival+5),INDENT=0,USE_TABS=.true.) enddo ! call of_open_close(trim(output_fname)) ! enddo + enddo ! if (l_PROJECT_line) then call live_timing('Projecting the DOS',PROJECT_N_par) @@ -184,7 +191,7 @@ subroutine electrons_dos(Xk,Xen) SLICE_E%E=GRID_E%E(DOS_bands(1):DOS_bands(2),PROJECT_N_perp*(ik_path-1)+1:PROJECT_N_perp*ik_path,:) SLICE_E%f=GRID_E%f(DOS_bands(1):DOS_bands(2),PROJECT_N_perp*(ik_path-1)+1:PROJECT_N_perp*ik_path,:) call electrons_dos_elemental(SLICE_k,SLICE_E,DOS_bands,el_dos(ik_path,:,:),dos_E,& -& ID_spin,ID_pdos,USE_the_DbGd=.FALSE.,QUIET=.TRUE.) +& spin_fac,pdos_fac,USE_the_DbGd=.FALSE.,QUIET=.TRUE.) call live_timing(steps=1) enddo call live_timing( ) @@ -193,7 +200,7 @@ subroutine electrons_dos(Xk,Xen) ! ! DOS ! - call electrons_dos_elemental(GRID_k,GRID_E,DOS_bands,el_dos(:,:,2),dos_E,ID_spin,ID_pdos,USE_the_DbGd=.FALSE.) + call electrons_dos_elemental(GRID_k,GRID_E,DOS_bands,el_dos(:,:,2),dos_E,spin_fac,pdos_fac,USE_the_DbGd=.FALSE.) ! endif endif diff --git a/ypp/electrons/electrons_dos_elemental.F b/ypp/electrons/electrons_dos_elemental.F index eaab711b30..2ae2d92181 100644 --- a/ypp/electrons/electrons_dos_elemental.F +++ b/ypp/electrons/electrons_dos_elemental.F @@ -1,27 +1,11 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, DS +! Copyright (C) 2018 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 DS ! -! 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 electrons_dos_elemental(k,E,bands,el_dos,dos_E,ID_spin,ID_pdos,USE_the_DbGd,QUIET,FORCE_occ) +subroutine electrons_dos_elemental(k,E,bands,el_dos,dos_E,spin_fac,pdos_fac,USE_the_DbGd,QUIET,FORCE_occ) ! use pars, ONLY:SP,rZERO use electrons, ONLY:levels,n_spin @@ -39,15 +23,17 @@ subroutine electrons_dos_elemental(k,E,bands,el_dos,dos_E,ID_spin,ID_pdos,USE_th ! type(bz_samp), intent(in) :: k type(levels), intent(in) :: E - integer, intent(in) :: bands(2),ID_spin,ID_pdos + integer, intent(in) :: bands(2) real(SP), intent(in) :: dos_E(DOS_E_steps) real(SP), intent(out):: el_dos(DOS_E_steps,n_spin) + real(SP),pointer, optional, intent(in):: spin_fac(:,:,:) + real(SP),pointer, optional, intent(in):: pdos_fac(:,:,:) logical, optional, intent(in) :: USE_the_DbGd,QUIET,FORCE_occ ! ! Work Space ! integer :: i_E - logical :: LIVE_t_,USE_occ + logical :: LIVE_t_,USE_occ,l_spin,l_pdos type(PP_indexes) :: px ! ! Use occupations? @@ -62,6 +48,12 @@ subroutine electrons_dos_elemental(k,E,bands,el_dos,dos_E,ID_spin,ID_pdos,USE_th LIVE_t_=.TRUE. if (present(QUIET)) LIVE_t_=.not.QUIET ! + l_spin=.false. + if (present(spin_fac)) l_spin=associated(spin_fac) + ! + l_pdos=.false. + if (present(pdos_fac)) l_pdos=associated(pdos_fac) + ! call PP_indexes_reset(px) call PARALLEL_index(px,(/DOS_E_steps/)) ! @@ -74,22 +66,9 @@ subroutine electrons_dos_elemental(k,E,bands,el_dos,dos_E,ID_spin,ID_pdos,USE_th ! if (.not.px%element_1D(i_E)) cycle ! - if (ID_spin==0.and.ID_pdos==0) then - call el_density_of_states(k,E,dos_E(i_E),DOS_broadening,bands,el_dos(i_E,:), & -& USE_W=.true.,USE_the_DbGd=USE_the_DbGd,USE_occupations=USE_occ) - else if (ID_spin>0.and.ID_pdos==0) then - call el_density_of_states(k,E,dos_E(i_E),DOS_broadening,bands,el_dos(i_E,:), & -& USE_W=.true.,USE_the_DbGd=USE_the_DbGd,USE_occupations=USE_occ,& -& WF_fac=INTERP_obj(ID_spin)%INTERP) - else if (ID_spin==0.and.ID_pdos>0) then - call el_density_of_states(k,E,dos_E(i_E),DOS_broadening,bands,el_dos(i_E,:), & -& USE_W=.true.,USE_the_DbGd=USE_the_DbGd,USE_occupations=USE_occ,& -& PDOS_fac=INTERP_obj(ID_pdos)%INTERP) - else if (ID_spin>0.and.ID_pdos>0) then - call el_density_of_states(k,E,dos_E(i_E),DOS_broadening,bands,el_dos(i_E,:), & + call el_density_of_states(k,E,dos_E(i_E),DOS_broadening,bands,el_dos(i_E,:), & & USE_W=.true.,USE_the_DbGd=USE_the_DbGd,USE_occupations=USE_occ,& -& WF_fac=INTERP_obj(ID_spin)%INTERP,PDOS_fac=INTERP_obj(ID_pdos)%INTERP) - endif +& WF_fac=spin_fac,PDOS_fac=pdos_fac) ! if (LIVE_t_) call live_timing(steps=1) ! diff --git a/ypp/electrons/electrons_dos_setup.F b/ypp/electrons/electrons_dos_setup.F index db652a2f31..0edd67cd50 100644 --- a/ypp/electrons/electrons_dos_setup.F +++ b/ypp/electrons/electrons_dos_setup.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM, DS +! Copyright (C) 2006 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. -! -! 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. +! Authors (see AUTHORS file for details): AM DS ! subroutine electrons_dos_setup( E, dos_E , bands ) ! diff --git a/ypp/electrons/electrons_driver.F b/ypp/electrons/electrons_driver.F index 670d141bea..46cbd28e4f 100644 --- a/ypp/electrons/electrons_driver.F +++ b/ypp/electrons/electrons_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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. -! -! 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 ! subroutine electrons_driver(Xk,Xen,Xq) ! diff --git a/ypp/electrons/electrons_magn_factors.F b/ypp/electrons/electrons_magn_factors.F index 68f2c63677..51af39e85d 100644 --- a/ypp/electrons/electrons_magn_factors.F +++ b/ypp/electrons/electrons_magn_factors.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): -! -! 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) 2016 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. -! -! 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): ! subroutine electrons_magn_factors(kpts,bands,magn_factors) ! diff --git a/ypp/electrons/electrons_magnetization.F b/ypp/electrons/electrons_magnetization.F index 8a7a316036..578015a025 100644 --- a/ypp/electrons/electrons_magnetization.F +++ b/ypp/electrons/electrons_magnetization.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2017 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. -! -! 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 ! subroutine electrons_magnetization(Xk,Xen) ! diff --git a/ypp/electrons/electrons_pdos_factors.F b/ypp/electrons/electrons_pdos_factors.F index 54b0a1e5a8..4a61bf8459 100644 --- a/ypp/electrons/electrons_pdos_factors.F +++ b/ypp/electrons/electrons_pdos_factors.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2019 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. -! -! 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): DS ! subroutine electrons_pdos_factors(kpts,bands,PDOS_fac) ! diff --git a/ypp/electrons/electrons_position.F b/ypp/electrons/electrons_position.F index 122c5c57fe..96adce4c26 100644 --- a/ypp/electrons/electrons_position.F +++ b/ypp/electrons/electrons_position.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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. -! -! 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 DS ! subroutine electrons_position(nkpt_pos,nband_pos,power,what,format) ! diff --git a/ypp/electrons/electrons_spin_and_magn_interpolate.F b/ypp/electrons/electrons_spin_and_magn_interpolate.F index 8104f02ae0..ef8d4598f1 100644 --- a/ypp/electrons/electrons_spin_and_magn_interpolate.F +++ b/ypp/electrons/electrons_spin_and_magn_interpolate.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): DS ! subroutine electrons_spin_and_magn_interpolate(what,SEED_k,OUT_k,BANDS_range,ID_spin,ID_magn) ! @@ -40,6 +24,9 @@ subroutine electrons_spin_and_magn_interpolate(what,SEED_k,OUT_k,BANDS_range,ID_ ! real(SP) :: spin_fac(BANDS_range(1):BANDS_range(2),SEED_k%nibz,n_spinor),& & magn_fac(BANDS_range(1):BANDS_range(2),SEED_k%nibz,3) + ! + ID_spin=0 + ID_magn=0 ! ! SPIN !------ diff --git a/ypp/electrons/electrons_spin_factors.F b/ypp/electrons/electrons_spin_factors.F index f906ef695a..7d8738113c 100644 --- a/ypp/electrons/electrons_spin_factors.F +++ b/ypp/electrons/electrons_spin_factors.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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. -! -! 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): DS ! subroutine electrons_spin_factors(kpts,bands,spin_factors) ! diff --git a/ypp/excitons/ELPH_project.dep b/ypp/excitons/ELPH_project.dep deleted file mode 100644 index d69819a652..0000000000 --- a/ypp/excitons/ELPH_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - excitons_driver.o - diff --git a/ypp/excitons/RT_project.dep b/ypp/excitons/RT_project.dep deleted file mode 100644 index d69819a652..0000000000 --- a/ypp/excitons/RT_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - excitons_driver.o - diff --git a/ypp/excitons/YPP_ELPH_project.dep b/ypp/excitons/YPP_ELPH_project.dep index d69819a652..73a76b2b29 100644 --- a/ypp/excitons/YPP_ELPH_project.dep +++ b/ypp/excitons/YPP_ELPH_project.dep @@ -1,2 +1,3 @@ excitons_driver.o + excitons_ph_ass_dos.o diff --git a/ypp/excitons/excitons_WFs.F b/ypp/excitons/excitons_WFs.F index 67e07b68a3..d5bd2d74d6 100644 --- a/ypp/excitons/excitons_WFs.F +++ b/ypp/excitons/excitons_WFs.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM DV -! -! 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) 2015 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. -! -! 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 DV ! subroutine exciton_WFs(Xk,BS_E_degs,iq) ! diff --git a/ypp/excitons/excitons_amplitudes.F b/ypp/excitons/excitons_amplitudes.F index 6c3586dae8..f8088e6537 100644 --- a/ypp/excitons/excitons_amplitudes.F +++ b/ypp/excitons/excitons_amplitudes.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM DV -! -! 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) 2015 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. -! -! 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 DV ! subroutine excitons_amplitudes(Xk,Xen,q,BS_E_degs,iq) ! diff --git a/ypp/excitons/excitons_bands.F b/ypp/excitons/excitons_bands.F index e9b01f5201..cda9c27715 100644 --- a/ypp/excitons/excitons_bands.F +++ b/ypp/excitons/excitons_bands.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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): CA ! subroutine excitons_bands(k,Xk,en,Xen,q) ! diff --git a/ypp/excitons/excitons_degeneracy_average.F b/ypp/excitons/excitons_degeneracy_average.F index edac4e4289..cf561b2bf8 100644 --- a/ypp/excitons/excitons_degeneracy_average.F +++ b/ypp/excitons/excitons_degeneracy_average.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM DV -! -! 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) 2006 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. -! -! 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 DV ! subroutine excitons_degeneracy_average(N,BS_E_degs,R,C,VERB) ! diff --git a/ypp/excitons/excitons_driver.F b/ypp/excitons/excitons_driver.F index 2b29420001..68aa252729 100644 --- a/ypp/excitons/excitons_driver.F +++ b/ypp/excitons/excitons_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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. -! -! 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 DV DS ! subroutine excitons_driver(k,Xk,en,Xen,q) ! diff --git a/ypp/excitons/excitons_find_degeneracies.F b/ypp/excitons/excitons_find_degeneracies.F index 97e4abe31e..420343116c 100644 --- a/ypp/excitons/excitons_find_degeneracies.F +++ b/ypp/excitons/excitons_find_degeneracies.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM DV -! -! 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) 2006 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. -! -! 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 DV ! subroutine excitons_find_degeneracies(BS_E,BS_E_degs) ! diff --git a/ypp/excitons/excitons_interpolate_setup.F b/ypp/excitons/excitons_interpolate_setup.F index 16d5e30428..b31322c4bb 100644 --- a/ypp/excitons/excitons_interpolate_setup.F +++ b/ypp/excitons/excitons_interpolate_setup.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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): CA ! subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,report) ! diff --git a/ypp/excitons/excitons_kinematics.F b/ypp/excitons/excitons_kinematics.F index fa6e953116..0f79fd17d6 100644 --- a/ypp/excitons/excitons_kinematics.F +++ b/ypp/excitons/excitons_kinematics.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 ! subroutine excitons_kinematics(Xk,eh,i_s) ! diff --git a/ypp/excitons/excitons_ph_ass_dos.F b/ypp/excitons/excitons_ph_ass_dos.F index c7c3374936..38b0657ca1 100644 --- a/ypp/excitons/excitons_ph_ass_dos.F +++ b/ypp/excitons/excitons_ph_ass_dos.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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): CA ! subroutine excitons_ph_ass_dos(k,Xk,en,Xen,q_exc) ! @@ -37,9 +21,9 @@ subroutine excitons_ph_ass_dos(k,Xk,en,Xen,q_exc) use LIVE_t, ONLY:live_timing use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset use parallel_int, ONLY:PARALLEL_index - use ELPH, ONLY:FAN_deltaE_treshold + use ELPH, ONLY:FAN_deltaE_treshold,elph_branches use functions, ONLY:Lorentzian_func,boltzman_f,bose_f - use stderr, ONLY:STRING_same + use stderr, ONLY:STRING_same,intc ! #include ! @@ -156,6 +140,10 @@ subroutine excitons_ph_ass_dos(k,Xk,en,Xen,q_exc) ! ! ph_ass_dos(w) = \sum_{Q,l,n} Bose(E^exc_{l,Q}, T) * Bose(w_{n,q}, T) \delta { E^exc_{l,Q} - w_{n,q} - w } \delta {Q,q} ! + if(elph_branches(1)<=0) elph_branches(1)=1 + if(elph_branches(1)>ph_modes) call error('Max number of phonon modes '//trim(intc(ph_modes))) + if(elph_branches(2)==-1) elph_branches(2)=ph_modes + ! do i_idx=1,n_full_q ! i_q=iq_indx(i_idx) @@ -166,7 +154,7 @@ subroutine excitons_ph_ass_dos(k,Xk,en,Xen,q_exc) ! exc_OCC=exc_OCC+Boltz_F_exc*q_matdyn%weights(i_q) ! - do i_l=1,ph_modes + do i_l=elph_branches(1),elph_branches(2) ! if(ph_freqs(i_l,i_q) @@ -175,6 +159,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. 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 fb879b98b2..1c9a433474 100644 --- a/ypp/k-points/k_map_fine_to_coarse_reduce.F +++ b/ypp/k-points/k_map_fine_to_coarse_reduce.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2011 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 DS ! logical function k_map_fine_to_coarse_reduce(FineGd_k) ! diff --git a/ypp/k-points/k_random.F b/ypp/k-points/k_random.F index f0a2f4b4f1..5e58ce11b1 100644 --- a/ypp/k-points/k_random.F +++ b/ypp/k-points/k_random.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! subroutine k_random(Xk,No_Weight) ! diff --git a/ypp/k-points/k_special.F b/ypp/k-points/k_special.F index 00cfefc9c5..72d18d33fe 100644 --- a/ypp/k-points/k_special.F +++ b/ypp/k-points/k_special.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! subroutine k_special(LIST_only) ! diff --git a/ypp/modules/.objects b/ypp/modules/.objects index 74dc15bc34..5392808664 100644 --- a/ypp/modules/.objects +++ b/ypp/modules/.objects @@ -1,7 +1,11 @@ -#if defined _YPP_RT || YPP_NL +#if defined _YPP_NL RT_obj = mod_YPP_real_time.o #endif -#if defined _YPP_ELPH || defined _YPP_RT +#if defined _YPP_RT +RT_obj = mod_YPP_real_time.o +ELPH_obj = mod_YPP_ELPH.o +#endif +#if defined _YPP_ELPH ELPH_obj = mod_YPP_ELPH.o #endif objs = mod_YPP.o mod_YPP_symm.o mod_YPP_interfaces.o $(RT_obj) $(ELPH_obj) YPP_SET_defaults.o diff --git a/ypp/modules/ELPH_project.dep b/ypp/modules/ELPH_project.dep deleted file mode 100644 index b5c55fcf6f..0000000000 --- a/ypp/modules/ELPH_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - YPP_SET_defaults.o - diff --git a/ypp/modules/NL_project.dep b/ypp/modules/NL_project.dep deleted file mode 100644 index 6cd3fbaec9..0000000000 --- a/ypp/modules/NL_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - mod_YPP_real_time.o - diff --git a/ypp/modules/RT_project.dep b/ypp/modules/RT_project.dep deleted file mode 100644 index fc27fbbebe..0000000000 --- a/ypp/modules/RT_project.dep +++ /dev/null @@ -1,3 +0,0 @@ - YPP_SET_defaults.o - mod_YPP_interfaces.o - diff --git a/ypp/modules/SC_project.dep b/ypp/modules/SC_project.dep deleted file mode 100644 index b5c55fcf6f..0000000000 --- a/ypp/modules/SC_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - YPP_SET_defaults.o - diff --git a/ypp/modules/YPP_NL_project.dep b/ypp/modules/YPP_NL_project.dep index b5c55fcf6f..159429f038 100644 --- a/ypp/modules/YPP_NL_project.dep +++ b/ypp/modules/YPP_NL_project.dep @@ -1,2 +1,3 @@ YPP_SET_defaults.o + mod_YPP_real_time.o diff --git a/ypp/modules/YPP_SET_defaults.F b/ypp/modules/YPP_SET_defaults.F index c10505f8e1..9c00aad6cc 100644 --- a/ypp/modules/YPP_SET_defaults.F +++ b/ypp/modules/YPP_SET_defaults.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DS,AM +! 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. -! -! 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. +! Authors (see AUTHORS file for details): DSAM ! subroutine YPP_SET_defaults() ! @@ -55,7 +39,7 @@ subroutine YPP_SET_defaults() #if defined _YPP_ELPH use YPP_ELPH, ONLY:elph_dbs_path, elph_Ef, elph_gamma_broad, elph_steps, l_atomic_amplitude, l_eliashberg,& & l_gkkp, l_phonons, ph_broad, ph_freqs_file, ph_modes_file - use ELPH, ONLY:gsqF_energy_steps + use ELPH, ONLY:gsqF_energy_steps,elph_branches #endif #if defined _YPP_NL use YPP_real_time, ONLY:Pump_path @@ -192,6 +176,7 @@ subroutine YPP_SET_defaults() ph_freqs_file='none' ph_modes_file='none' gsqF_energy_steps=1 + elph_branches=(/-1,-1/) ! #endif ! diff --git a/ypp/modules/mod_YPP.F b/ypp/modules/mod_YPP.F index 72813fd2e8..405c4b8d69 100644 --- a/ypp/modules/mod_YPP.F +++ b/ypp/modules/mod_YPP.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! module YPPm ! diff --git a/ypp/modules/mod_YPP_ELPH.F b/ypp/modules/mod_YPP_ELPH.F index 950c962c19..ffb7a9c2a2 100644 --- a/ypp/modules/mod_YPP_ELPH.F +++ b/ypp/modules/mod_YPP_ELPH.F @@ -1,27 +1,10 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! -#if defined _YPP_ELPH || defined _YPP_RT module YPP_ELPH ! use pars, ONLY:SP,schlen,DP @@ -151,4 +134,3 @@ subroutine ELPH_DB_free() end subroutine ! end module YPP_ELPH -#endif diff --git a/ypp/modules/mod_YPP_interfaces.F b/ypp/modules/mod_YPP_interfaces.F index f27988a07c..69d7885a2a 100644 --- a/ypp/modules/mod_YPP_interfaces.F +++ b/ypp/modules/mod_YPP_interfaces.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! module YPP_interfaces ! @@ -41,7 +25,7 @@ subroutine RT_OBSERVABLES_IO(what,J,P,IO_error,first_sec_only,G_lesser_only,COM ! #endif ! - subroutine electrons_dos_elemental(k,E,bands,el_dos,dos_E,ID_spin,ID_pdos,USE_the_DbGd,QUIET,FORCE_occ) + subroutine electrons_dos_elemental(k,E,bands,el_dos,dos_E,spin_fac,pdos_fac,USE_the_DbGd,QUIET,FORCE_occ) use pars, ONLY:SP use electrons, ONLY:levels,n_spin use R_lattice, ONLY:bz_samp @@ -50,9 +34,11 @@ subroutine electrons_dos_elemental(k,E,bands,el_dos,dos_E,ID_spin,ID_pdos,USE_th implicit none type(bz_samp), intent(in) :: k type(levels), intent(in) :: E - integer, intent(in) :: bands(2),ID_spin,ID_pdos + integer, intent(in) :: bands(2) real(SP), intent(in) :: dos_E(DOS_E_steps) real(SP), intent(out):: el_dos(DOS_E_steps,n_spin) + real(SP),pointer, optional, intent(in):: spin_fac(:,:,:) + real(SP),pointer, optional, intent(in):: pdos_fac(:,:,:) logical, optional,intent(in) :: USE_the_DbGd,QUIET,FORCE_occ end subroutine electrons_dos_elemental ! diff --git a/ypp/modules/mod_YPP_real_time.F b/ypp/modules/mod_YPP_real_time.F index 65923cbf96..f6561fcb2a 100644 --- a/ypp/modules/mod_YPP_real_time.F +++ b/ypp/modules/mod_YPP_real_time.F @@ -1,27 +1,10 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): DS ! -#if defined _YPP_RT || YPP_NL module YPP_real_time ! use units, ONLY:HA2EV @@ -233,4 +216,3 @@ subroutine gimme_a_G_Time_Point(i_T) end subroutine ! end module YPP_real_time -#endif diff --git a/ypp/modules/mod_YPP_symm.F b/ypp/modules/mod_YPP_symm.F index e62cc132f1..6da97446a9 100644 --- a/ypp/modules/mod_YPP_symm.F +++ b/ypp/modules/mod_YPP_symm.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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): DS ! module YPP_symm ! diff --git a/ypp/plotting/PROJECTION_axis.F b/ypp/plotting/PROJECTION_axis.F index 5df8c716cf..1ee2921cdf 100644 --- a/ypp/plotting/PROJECTION_axis.F +++ b/ypp/plotting/PROJECTION_axis.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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 ! subroutine PROJECTION_axis( axis, O ) ! diff --git a/ypp/plotting/PROJECTION_k_on_the_path_or_plane.F b/ypp/plotting/PROJECTION_k_on_the_path_or_plane.F index 61b7b0b2c7..2ca0d4a226 100644 --- a/ypp/plotting/PROJECTION_k_on_the_path_or_plane.F +++ b/ypp/plotting/PROJECTION_k_on_the_path_or_plane.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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. -! -! 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 ! integer function PROJECTION_k_on_the_path_or_plane(ik) ! diff --git a/ypp/plotting/PROJECTION_perpendicular_sampling.F b/ypp/plotting/PROJECTION_perpendicular_sampling.F index 55f3904420..8bd82178fd 100644 --- a/ypp/plotting/PROJECTION_perpendicular_sampling.F +++ b/ypp/plotting/PROJECTION_perpendicular_sampling.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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 ! subroutine PROJECTION_perpendicular_sampling( K, versor ) ! diff --git a/ypp/plotting/PROJECTION_plot.F b/ypp/plotting/PROJECTION_plot.F index fc2c0376f7..7d1bb291e1 100644 --- a/ypp/plotting/PROJECTION_plot.F +++ b/ypp/plotting/PROJECTION_plot.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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 ! subroutine PROJECTION_plot( what, N, Ns, bands, W, TIME, OBS_K, OBS_B) ! diff --git a/ypp/plotting/PROJECTION_setup.F b/ypp/plotting/PROJECTION_setup.F index 79874562bc..45ae7471ec 100644 --- a/ypp/plotting/PROJECTION_setup.F +++ b/ypp/plotting/PROJECTION_setup.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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. -! -! 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 ! subroutine PROJECTION_setup( what ,bands ) ! diff --git a/ypp/plotting/RT_plot_interpolated_values.F b/ypp/plotting/RT_plot_interpolated_values.F index 983aa9296b..b5b3d1b7ee 100644 --- a/ypp/plotting/RT_plot_interpolated_values.F +++ b/ypp/plotting/RT_plot_interpolated_values.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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): DS AM ! subroutine RT_plot_interpolated_values(CIRCUIT_E,RT_E,CIRCUIT_dE,i_T,ID_circuit,ID_spin,Max_occ,WARN_elec,WARN_hole) ! diff --git a/ypp/plotting/RT_project.dep b/ypp/plotting/RT_project.dep deleted file mode 100644 index b9a9e91c14..0000000000 --- a/ypp/plotting/RT_project.dep +++ /dev/null @@ -1,3 +0,0 @@ - PROJECTION_plot.o - plot_interpolated_values.o - diff --git a/ypp/plotting/SC_project.dep b/ypp/plotting/SC_project.dep deleted file mode 100644 index 5989fb55e7..0000000000 --- a/ypp/plotting/SC_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - plot_interpolated_values.o - diff --git a/ypp/plotting/YPP_RT_project.dep b/ypp/plotting/YPP_RT_project.dep index b9a9e91c14..a040d51b6b 100644 --- a/ypp/plotting/YPP_RT_project.dep +++ b/ypp/plotting/YPP_RT_project.dep @@ -1,3 +1,4 @@ PROJECTION_plot.o + RT_plot_interpolated_values.o plot_interpolated_values.o diff --git a/ypp/plotting/plot_and_project_1D.F b/ypp/plotting/plot_and_project_1D.F index 6f1d0bea86..d7b71e9958 100644 --- a/ypp/plotting/plot_and_project_1D.F +++ b/ypp/plotting/plot_and_project_1D.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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. -! -! 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 ! subroutine plot_and_project_1D(V,direction) ! diff --git a/ypp/plotting/plot_check_and_launch.F b/ypp/plotting/plot_check_and_launch.F index 5abe62fefc..0bb4733f7f 100644 --- a/ypp/plotting/plot_check_and_launch.F +++ b/ypp/plotting/plot_check_and_launch.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM DV -! -! 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) 2016 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. -! -! 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 DV ! subroutine plot_check_and_launch(check_only) ! diff --git a/ypp/plotting/plot_cube.F b/ypp/plotting/plot_cube.F index e3c47ecd19..b8eb9862be 100644 --- a/ypp/plotting/plot_cube.F +++ b/ypp/plotting/plot_cube.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM DV -! -! 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) 2016 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. -! -! 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 DV ! subroutine plot_cube() ! diff --git a/ypp/plotting/plot_gnuplot.F b/ypp/plotting/plot_gnuplot.F index 961c53ff54..110b2536ce 100644 --- a/ypp/plotting/plot_gnuplot.F +++ b/ypp/plotting/plot_gnuplot.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM DV -! -! 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) 2016 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. -! -! 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 DV ! subroutine plot_gnuplot(eval_only) ! diff --git a/ypp/plotting/plot_interpolated_values.F b/ypp/plotting/plot_interpolated_values.F index 8ac81f868e..da345abfaf 100644 --- a/ypp/plotting/plot_interpolated_values.F +++ b/ypp/plotting/plot_interpolated_values.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CA, DS, AM +! Copyright (C) 2019 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. -! -! 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. +! Authors (see AUTHORS file for details): CA DS AM ! subroutine plot_interpolated_values(Xk,Xen,Ef,LOCAL_k,IDs,dims,nquantities,nfiles,basename,int_kind,i_T) ! diff --git a/ypp/plotting/plot_xcrysden.F b/ypp/plotting/plot_xcrysden.F index d8f93f37da..6c9fb4ef8e 100644 --- a/ypp/plotting/plot_xcrysden.F +++ b/ypp/plotting/plot_xcrysden.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM DV -! -! 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) 2016 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. -! -! 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 DV ! subroutine plot_xcrysden() ! diff --git a/ypp/qp/QP_DB_expand.F b/ypp/qp/QP_DB_expand.F index 578974503d..d2b4cb9f45 100644 --- a/ypp/qp/QP_DB_expand.F +++ b/ypp/qp/QP_DB_expand.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2020 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 ! subroutine QP_DB_expand( k ) ! diff --git a/ypp/qp/QP_DBs_create_and_modify.F b/ypp/qp/QP_DBs_create_and_modify.F index 6d712265a4..dfa571f056 100644 --- a/ypp/qp/QP_DBs_create_and_modify.F +++ b/ypp/qp/QP_DBs_create_and_modify.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): CA 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. +! Copyright (C) 2016 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): CA AM ! subroutine QP_DBs_create_and_modify(en,k) ! diff --git a/ypp/qp/QP_DBs_manipulate.F b/ypp/qp/QP_DBs_manipulate.F index 88cd537ec1..0f7a9e2ed1 100644 --- a/ypp/qp/QP_DBs_manipulate.F +++ b/ypp/qp/QP_DBs_manipulate.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! subroutine QP_DBs_manipulate( E ) ! diff --git a/ypp/real_time/NL_exc_driver.F b/ypp/real_time/NL_exc_driver.F index 61702d270c..5d4cdd492f 100644 --- a/ypp/real_time/NL_exc_driver.F +++ b/ypp/real_time/NL_exc_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): MG -! -! 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. +! Copyright (C) 2006 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): MG ! subroutine NL_exc_driver(en,k) ! diff --git a/ypp/real_time/NL_project.dep b/ypp/real_time/NL_project.dep deleted file mode 100644 index 552d958f89..0000000000 --- a/ypp/real_time/NL_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - RT_X_LRR_real_field.o - diff --git a/ypp/real_time/NL_ypp_driver.F b/ypp/real_time/NL_ypp_driver.F index 6d75fef955..e33731e7e0 100644 --- a/ypp/real_time/NL_ypp_driver.F +++ b/ypp/real_time/NL_ypp_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): MG CA ! subroutine NL_ypp_driver(en,k) ! diff --git a/ypp/real_time/RT_1D_Fourier_Transform.F b/ypp/real_time/RT_1D_Fourier_Transform.F index 5b756de9eb..5b2839e7bb 100644 --- a/ypp/real_time/RT_1D_Fourier_Transform.F +++ b/ypp/real_time/RT_1D_Fourier_Transform.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM 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. +! Copyright (C) 2016 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 CA ! subroutine RT_1D_Fourier_Transform(mode,FT,RT,I_sign) ! diff --git a/ypp/real_time/RT_1D_Fourier_setup.F b/ypp/real_time/RT_1D_Fourier_setup.F index 1207d341c6..6305a265dd 100644 --- a/ypp/real_time/RT_1D_Fourier_setup.F +++ b/ypp/real_time/RT_1D_Fourier_setup.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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 ! subroutine RT_1D_Fourier_setup(FT,RT,N) ! diff --git a/ypp/real_time/RT_DBs_carriers_setup.F b/ypp/real_time/RT_DBs_carriers_setup.F index 03e6ab79d9..2b165a6120 100644 --- a/ypp/real_time/RT_DBs_carriers_setup.F +++ b/ypp/real_time/RT_DBs_carriers_setup.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): DS ! subroutine RT_DBs_carriers_setup(en,kpt,qpt) ! diff --git a/ypp/real_time/RT_Fermi_excitation.F b/ypp/real_time/RT_Fermi_excitation.F index 8009fc7957..8d76d986b8 100644 --- a/ypp/real_time/RT_Fermi_excitation.F +++ b/ypp/real_time/RT_Fermi_excitation.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): DS AM FP AMS -! -! 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. +! Copyright (C) 2017 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): DS AM FP AMS ! subroutine RT_Fermi_excitation(E,k,do_kpt,SUCCESS) ! diff --git a/ypp/real_time/RT_G_two_times_build.F b/ypp/real_time/RT_G_two_times_build.F index 03da261dba..3710a9bd2f 100644 --- a/ypp/real_time/RT_G_two_times_build.F +++ b/ypp/real_time/RT_G_two_times_build.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2019 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): DS ! subroutine RT_G_two_times_build(en,kpt,qpt) ! diff --git a/ypp/real_time/RT_G_two_times_driver.F b/ypp/real_time/RT_G_two_times_driver.F index 6b77d756d2..2a5646fa41 100644 --- a/ypp/real_time/RT_G_two_times_driver.F +++ b/ypp/real_time/RT_G_two_times_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2006 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): DS ! subroutine RT_G_two_times_driver(en,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 e497fdfc7b..06abc473b0 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 @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2019 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): DS ! subroutine RT_G_two_times_interp_and_plot(en,kpt,qpt) ! diff --git a/ypp/real_time/RT_OBSERVABLES_IO.F b/ypp/real_time/RT_OBSERVABLES_IO.F index 8476783775..4925967e1a 100644 --- a/ypp/real_time/RT_OBSERVABLES_IO.F +++ b/ypp/real_time/RT_OBSERVABLES_IO.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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. +! Copyright (C) 2016 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 CA DS ! subroutine RT_OBSERVABLES_IO(what,Curr,Pol,IO_error,first_sec_only,G_lesser_only,COM_) ! diff --git a/ypp/real_time/RT_OBSERVABLES_IO_path.F b/ypp/real_time/RT_OBSERVABLES_IO_path.F index 403e95cb92..a0713c7aa9 100644 --- a/ypp/real_time/RT_OBSERVABLES_IO_path.F +++ b/ypp/real_time/RT_OBSERVABLES_IO_path.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! subroutine RT_OBSERVABLES_IO_paths(what,en) ! diff --git a/ypp/real_time/RT_OBSERVABLES_damp_and_write.F b/ypp/real_time/RT_OBSERVABLES_damp_and_write.F index 9f649f9a59..726ca0ca9f 100644 --- a/ypp/real_time/RT_OBSERVABLES_damp_and_write.F +++ b/ypp/real_time/RT_OBSERVABLES_damp_and_write.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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. +! Copyright (C) 2015 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 CA DS ! subroutine RT_OBSERVABLES_damp_and_write(OBS,RT,IO_skip) ! diff --git a/ypp/real_time/RT_Polarization.F b/ypp/real_time/RT_Polarization.F index af806dc1c7..40a8b68085 100644 --- a/ypp/real_time/RT_Polarization.F +++ b/ypp/real_time/RT_Polarization.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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 ! subroutine RT_Polarization(en,k,q) ! diff --git a/ypp/real_time/RT_TRabs_driver.F b/ypp/real_time/RT_TRabs_driver.F index 357b82c565..7022d55f3a 100644 --- a/ypp/real_time/RT_TRabs_driver.F +++ b/ypp/real_time/RT_TRabs_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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. -! -! 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): DS AM ! subroutine RT_transient_absorption(Xen,Xk,Xq) ! diff --git a/ypp/real_time/RT_TRabs_output.F b/ypp/real_time/RT_TRabs_output.F index 791829e945..b03c3f995e 100644 --- a/ypp/real_time/RT_TRabs_output.F +++ b/ypp/real_time/RT_TRabs_output.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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. -! -! 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): DS AM ! subroutine RT_TRabs_output(what,how,ofile,N_files,W,TIME) ! diff --git a/ypp/real_time/RT_TRabs_residuals.F b/ypp/real_time/RT_TRabs_residuals.F index f587137908..9e1556d664 100644 --- a/ypp/real_time/RT_TRabs_residuals.F +++ b/ypp/real_time/RT_TRabs_residuals.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2021 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. -! -! 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): DS AM ! subroutine RT_TRabs_residuals(what,N_trans,N_dirs,DIP_dir,Xen,Xk,nb,l_EQ) ! diff --git a/ypp/real_time/RT_X_LRR_real_field.F b/ypp/real_time/RT_X_LRR_real_field.F index dc1d78aa13..91ed358e77 100644 --- a/ypp/real_time/RT_X_LRR_real_field.F +++ b/ypp/real_time/RT_X_LRR_real_field.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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. +! Copyright (C) 2015 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 CA DS ! ! Partialy inspired from Octopus v. 3.1.0 ! diff --git a/ypp/real_time/RT_X_effective.F b/ypp/real_time/RT_X_effective.F index e3141f49fd..af359237a1 100644 --- a/ypp/real_time/RT_X_effective.F +++ b/ypp/real_time/RT_X_effective.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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 ! subroutine RT_X_effective(en) ! diff --git a/ypp/real_time/RT_X_inversion.F b/ypp/real_time/RT_X_inversion.F index 1aa2ead252..5aa078f32d 100644 --- a/ypp/real_time/RT_X_inversion.F +++ b/ypp/real_time/RT_X_inversion.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM MG -! -! 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. +! Copyright (C) 2015 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 MG ! subroutine RT_X_inversion(RT_P_Probe,Susceptibility,Harmonic_Frequency,X_effective) ! diff --git a/ypp/real_time/RT_X_qssin.F b/ypp/real_time/RT_X_qssin.F index d76e847f58..0bcd65c3f5 100644 --- a/ypp/real_time/RT_X_qssin.F +++ b/ypp/real_time/RT_X_qssin.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM CA MG -! -! 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. +! Copyright (C) 2015 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 CA MG ! subroutine RT_X_qssin ! diff --git a/ypp/real_time/RT_X_response.F b/ypp/real_time/RT_X_response.F index 50c7b4d059..e1e6d95936 100644 --- a/ypp/real_time/RT_X_response.F +++ b/ypp/real_time/RT_X_response.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM 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. +! Copyright (C) 2015 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 CA ! subroutine RT_X_response(en,k,q) ! diff --git a/ypp/real_time/RT_apply_Texp.F b/ypp/real_time/RT_apply_Texp.F index 52cf38c141..e61b2a361d 100644 --- a/ypp/real_time/RT_apply_Texp.F +++ b/ypp/real_time/RT_apply_Texp.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): 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. +! Copyright (C) 2019 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. -! -! 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): CA DS ! subroutine RT_apply_Texp(H1,Gret,H2,deltaT,eta,n_order) ! diff --git a/ypp/real_time/RT_coefficients_Fourier.F b/ypp/real_time/RT_coefficients_Fourier.F index 0d55e3430b..4cd323a762 100644 --- a/ypp/real_time/RT_coefficients_Fourier.F +++ b/ypp/real_time/RT_coefficients_Fourier.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! subroutine RT_coefficients_Fourier(nt,P,nw,W,X,X_err,deltaW) ! diff --git a/ypp/real_time/RT_coefficients_Inversion.F b/ypp/real_time/RT_coefficients_Inversion.F index f4d9aa0e92..6a2f364f49 100644 --- a/ypp/real_time/RT_coefficients_Inversion.F +++ b/ypp/real_time/RT_coefficients_Inversion.F @@ -1,33 +1,25 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM MG -! -! 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) 2016 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 MG ! -! 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 Polarization coefficient inversion see Sec. III in PRB 88, 235113 (2013) +!! +!! @param[in] NW order of the response functions +!! @param[in] NX numer of coefficents required +!! @param[in] P real-time polarization +!! @param[in] W multiples of the laser frequency +!! @param[in] T_prediod shorted cicle period +!! @param[out] X coefficents of the response functions X1,X2,X3... ! 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 pars, ONLY:SP,cI,cONE,cZERO,rZERO 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 @@ -46,25 +38,31 @@ subroutine RT_coefficients_Inversion(NW,NX,P,X,W,T_period) nP_components =X_order+1 ! i_t_start=nint(RT_conf%T_range(1)/RT_step)+1 - i_deltaT=nint(T_period/RT_step)/M_size + i_deltaT =nint(T_period/RT_step)/M_size ! YAMBO_ALLOC(M,(M_size,M_size)) YAMBO_ALLOC(P_i,(M_size)) YAMBO_ALLOC(T_i,(M_size)) YAMBO_ALLOC(X_here,(nP_components)) ! - M=cZERO + M =cZERO + P_i =rZERO + T_i =rZERO + X_here=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 ! do i_t=1,M_size M(i_t,1) = cONE + enddo + ! + do i_t=1,M_size do i_n=2,nP_components - M(i_t,i_n ) = exp( cI*W(i_n)*T_i(i_t)) - M(i_t,i_n+X_order) = exp(-cI*W(i_n)*T_i(i_t)) + M(i_t,i_n ) = exp(-cI*W(i_n)*T_i(i_t)) + M(i_t,i_n+X_order) = exp(+cI*W(i_n)*T_i(i_t)) end do end do ! diff --git a/ypp/real_time/RT_components_energy_plot.F b/ypp/real_time/RT_components_energy_plot.F index f4a20b840d..f19fa67b54 100644 --- a/ypp/real_time/RT_components_energy_plot.F +++ b/ypp/real_time/RT_components_energy_plot.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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. -! -! 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): DS AM ! subroutine RT_components_energy_plot(En,kpt,n_T_steps) ! diff --git a/ypp/real_time/RT_damp_it.F b/ypp/real_time/RT_damp_it.F index 99726632ae..87a55eb62f 100644 --- a/ypp/real_time/RT_damp_it.F +++ b/ypp/real_time/RT_damp_it.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM 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. +! Copyright (C) 2016 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 CA ! subroutine RT_damp_it(damp_type,damp_factor,ft,lda) ! diff --git a/ypp/real_time/RT_density.F b/ypp/real_time/RT_density.F index 805d34a633..2c7d965596 100644 --- a/ypp/real_time/RT_density.F +++ b/ypp/real_time/RT_density.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): DS ! subroutine RT_density(en,kpt,qpt) ! diff --git a/ypp/real_time/RT_dos_time_plot.F b/ypp/real_time/RT_dos_time_plot.F index ce34f9fea7..62232e4671 100644 --- a/ypp/real_time/RT_dos_time_plot.F +++ b/ypp/real_time/RT_dos_time_plot.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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. -! -! 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 DS ! subroutine RT_dos_time_plot(En,k,n_T_steps) ! @@ -50,8 +34,10 @@ subroutine RT_dos_time_plot(En,k,n_T_steps) ! real(SP) :: el_dos(DOS_E_steps,n_spin,2),dos_E(DOS_E_steps),el_dos_max(2),el_dos_integral(n_T_steps,2) real(SP),allocatable :: TMP_fac(:,:,:) + real(SP), pointer :: spin_fac(:,:,:) => null() + real(SP), pointer :: pdos_fac(:,:,:) => null() real(SP), external :: RIntegrate - integer :: i_E,i_T,ib,N_files,i_f,i_RT,ID_E,ID_f,ID_spin,ID_pdos,ID_bare_spin,ID_bare_pdos + integer :: i_E,i_T,ib,N_files,i_f,i_RT,ID_E,ID_f,ID_spin,ID_pdos logical :: space_printed,l_interp type(levels) :: RT_E,GRID_E type(bz_samp) :: RT_k @@ -90,27 +76,22 @@ subroutine RT_dos_time_plot(En,k,n_T_steps) ! ! Load the PDOS coefficient !----------------------------- - ID_bare_pdos=0 if (l_PROJECT_atom) then - ID_bare_pdos=1 - INTERP_obj(ID_bare_pdos)%in_use=.TRUE. YAMBO_ALLOC(TMP_fac,(RT_carriers%nb(1):RT_carriers%nb(2),k%nibz,n_sp_pol)) - YAMBO_ALLOC(INTERP_obj(ID_bare_pdos)%INTERP,(RT_carriers%nb(1):RT_carriers%nb(2),RT_carriers%nk,n_sp_pol)) + YAMBO_ALLOC_P(pdos_fac,(RT_carriers%nb(1):RT_carriers%nb(2),RT_carriers%nk,n_sp_pol)) call electrons_pdos_factors((/1,k%nibz/),RT_carriers%nb,TMP_fac) do i_RT=1,RT_carriers%nstates - INTERP_obj(ID_bare_pdos)%INTERP(:,RT_carriers%table(i_RT,3),:)=TMP_fac(:, RT_carriers%table(i_RT,2), :) + pdos_fac(:,RT_carriers%table(i_RT,3),:)=TMP_fac(:, RT_carriers%table(i_RT,2), :) enddo YAMBO_FREE(TMP_fac) endif ! - ID_bare_spin=0 if (n_spinor==2) then - ID_bare_spin=ID_bare_pdos+1 YAMBO_ALLOC(TMP_fac,(RT_carriers%nb(1):RT_carriers%nb(2),k%nibz,n_spinor)) - YAMBO_ALLOC(INTERP_obj(ID_bare_spin)%INTERP,(RT_carriers%nb(1):RT_carriers%nb(2),RT_carriers%nk,n_spinor)) + YAMBO_ALLOC_P(spin_fac,(RT_carriers%nb(1):RT_carriers%nb(2),RT_carriers%nk,n_spinor)) call electrons_spin_factors((/1,k%nibz/),RT_carriers%nb,TMP_fac) do i_RT=1,RT_carriers%nstates - INTERP_obj(ID_bare_spin)%INTERP(:,RT_carriers%table(i_RT,3),:)=TMP_fac(:, RT_carriers%table(i_RT,2), :) + spin_fac(:,RT_carriers%table(i_RT,3),:)=TMP_fac(:, RT_carriers%table(i_RT,2), :) enddo YAMBO_FREE(TMP_fac) endif @@ -128,12 +109,12 @@ subroutine RT_dos_time_plot(En,k,n_T_steps) call INTERPOLATION_create_the_grid(INTERP_grid) ! if (l_PROJECT_atom) then - call INTERPOLATION_driver_seed("PDOS_factors_on_RT_grid",ID_pdos,RT_bands,RT_k,SEED_R3=INTERP_obj(ID_bare_pdos)%INTERP) + call INTERPOLATION_driver_seed("PDOS_factors_on_RT_grid",ID_pdos,RT_bands,RT_k,SEED_R3=spin_fac) call INTERPOLATION_driver_do("PDOS_factors_on_RT_grid",ID_pdos,GRID_k) endif ! if (n_spinor==2) then - call INTERPOLATION_driver_seed("SPIN_fac_on_RT_grid",ID_spin,RT_bands,RT_k,SEED_R3=INTERP_obj(ID_bare_spin)%INTERP) + call INTERPOLATION_driver_seed("SPIN_fac_on_RT_grid",ID_spin,RT_bands,RT_k,SEED_R3=pdos_fac) call INTERPOLATION_driver_do("SPIN_fac_on_RT_grid",ID_spin,GRID_k) endif ! @@ -167,7 +148,7 @@ subroutine RT_dos_time_plot(En,k,n_T_steps) ! !... DOS ! - call electrons_dos_elemental(RT_k,RT_E,RT_bands,el_dos(:,:,1),dos_E,ID_spin,ID_pdos,& + call electrons_dos_elemental(RT_k,RT_E,RT_bands,el_dos(:,:,1),dos_E,spin_fac,pdos_fac,& & USE_the_DbGd=.FALSE.,quiet=.TRUE.,FORCE_occ=.not.l_skip_occ) ! if (n_spin==1) el_dos_integral(i_T,1)=RIntegrate(el_dos(:,1,1),dos_E,DOS_E_steps)*DL_vol @@ -181,7 +162,7 @@ subroutine RT_dos_time_plot(En,k,n_T_steps) call INTERPOLATION_driver_do("f_on_RT_grid",ID_f,GRID_k,OUT_E=GRID_E) ! !... DOS - call electrons_dos_elemental(GRID_k,GRID_E,RT_bands,el_dos(:,:,2),dos_E,ID_spin,ID_pdos,& + call electrons_dos_elemental(GRID_k,GRID_E,RT_bands,el_dos(:,:,2),dos_E,spin_fac,pdos_fac,& & USE_the_DbGd=.FALSE.,QUIET=.TRUE.,FORCE_occ=.TRUE.) ! if (n_spin==1) el_dos_integral(i_T,2)=RIntegrate(el_dos(:,1,2),dos_E,DOS_E_steps)*DL_vol @@ -257,7 +238,5 @@ subroutine RT_dos_time_plot(En,k,n_T_steps) ! call INTERPOLATION_driver_end(ID_pdos) call INTERPOLATION_driver_end(ID_spin) - call INTERPOLATION_driver_end(ID_bare_spin) - call INTERPOLATION_driver_end(ID_bare_pdos) ! end subroutine RT_dos_time_plot diff --git a/ypp/real_time/RT_manual_excitation.F b/ypp/real_time/RT_manual_excitation.F index b933e0b03d..8f941a93cf 100644 --- a/ypp/real_time/RT_manual_excitation.F +++ b/ypp/real_time/RT_manual_excitation.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): DS AM ! subroutine RT_manual_excitation(E_RT,k,do_kpt,SUCCESS) ! diff --git a/ypp/real_time/RT_occ_bands_interpolation.F b/ypp/real_time/RT_occ_bands_interpolation.F index 9d51fbed39..6f42a11b5e 100644 --- a/ypp/real_time/RT_occ_bands_interpolation.F +++ b/ypp/real_time/RT_occ_bands_interpolation.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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): DS AM ! subroutine RT_occ_bands_interpolation(en,k,q,n_T_steps) ! diff --git a/ypp/real_time/RT_occ_time_plot.F b/ypp/real_time/RT_occ_time_plot.F index 353acdfbcf..d9c3e4d9b7 100644 --- a/ypp/real_time/RT_occ_time_plot.F +++ b/ypp/real_time/RT_occ_time_plot.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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. -! -! 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): DS AM ! subroutine RT_occ_time_plot(En,kpt,n_T_steps) ! diff --git a/ypp/real_time/RT_occupations_driver.F b/ypp/real_time/RT_occupations_driver.F index 0557e83055..b16f3a9de0 100644 --- a/ypp/real_time/RT_occupations_driver.F +++ b/ypp/real_time/RT_occupations_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2015 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. -! -! 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): DS AM ! subroutine RT_occupations_driver(k,q,en) ! diff --git a/ypp/real_time/RT_split_Polarization.F b/ypp/real_time/RT_split_Polarization.F index 127536ccbb..9333a67552 100644 --- a/ypp/real_time/RT_split_Polarization.F +++ b/ypp/real_time/RT_split_Polarization.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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 ! subroutine RT_split_Polarization(nh,nt,W,X,P,what) ! diff --git a/ypp/real_time/RT_time_configuration_setup.F b/ypp/real_time/RT_time_configuration_setup.F index 6836bf15a8..662d160185 100644 --- a/ypp/real_time/RT_time_configuration_setup.F +++ b/ypp/real_time/RT_time_configuration_setup.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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. -! -! 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 DS ! subroutine RT_time_configuration_setup(what,GENERAL_RT_IO_t) ! diff --git a/ypp/real_time/RT_ypp_driver.F b/ypp/real_time/RT_ypp_driver.F index 12d8ddff68..97b6f604d5 100644 --- a/ypp/real_time/RT_ypp_driver.F +++ b/ypp/real_time/RT_ypp_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM 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. +! Copyright (C) 2015 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 CA ! subroutine RT_ypp_driver(en,k,q) ! diff --git a/ypp/real_time/YPP_NL_project.dep b/ypp/real_time/YPP_NL_project.dep index 552d958f89..565eb7051e 100644 --- a/ypp/real_time/YPP_NL_project.dep +++ b/ypp/real_time/YPP_NL_project.dep @@ -1,2 +1,5 @@ + NL_exc_driver.o + NL_ypp_driver.o RT_X_LRR_real_field.o + RT_coefficients_Inversion.o diff --git a/ypp/real_time/YPP_RT_project.dep b/ypp/real_time/YPP_RT_project.dep new file mode 100644 index 0000000000..b1463c24d6 --- /dev/null +++ b/ypp/real_time/YPP_RT_project.dep @@ -0,0 +1,28 @@ + RT_1D_Fourier_Transform.o + RT_1D_Fourier_setup.o + RT_DBs_carriers_setup.o + RT_Fermi_excitation.o + RT_G_two_times_build.o + RT_G_two_times_driver.o + RT_G_two_times_interp_and_plot.o + RT_OBSERVABLES_IO.o + RT_OBSERVABLES_IO_path.o + RT_OBSERVABLES_damp_and_write.o + RT_Polarization.o + RT_TRabs_driver.o + RT_TRabs_output.o + RT_TRabs_residuals.o + RT_X_LRR_real_field.o + RT_X_response.o + RT_apply_Texp.o + RT_components_energy_plot.o + RT_damp_it.o + RT_density.o + RT_dos_time_plot.o + RT_manual_excitation.o + RT_occ_bands_interpolation.o + RT_occ_time_plot.o + RT_occupations_driver.o + RT_time_configuration_setup.o + RT_ypp_driver.o + diff --git a/ypp/symmetries/SC_project.dep b/ypp/symmetries/SC_project.dep deleted file mode 100644 index 8a7c287a3e..0000000000 --- a/ypp/symmetries/SC_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - fix_WFs_and_E.o - diff --git a/ypp/symmetries/YPP_SC_project.dep b/ypp/symmetries/YPP_SC_project.dep index 8a7c287a3e..f63c1aa260 100644 --- a/ypp/symmetries/YPP_SC_project.dep +++ b/ypp/symmetries/YPP_SC_project.dep @@ -1,2 +1,3 @@ + fix_SC_DBs.o fix_WFs_and_E.o diff --git a/ypp/symmetries/fix_ATOMPROJs.F b/ypp/symmetries/fix_ATOMPROJs.F index 7ed2258671..625d399f33 100644 --- a/ypp/symmetries/fix_ATOMPROJs.F +++ b/ypp/symmetries/fix_ATOMPROJs.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2019 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): DS ! subroutine fix_ATOMPROJs(E,k,k_save,kpoints_map,old_nsym,old_dl_sop,old_sop_inv,S_contains_TR,action_kind) ! diff --git a/ypp/symmetries/fix_PPs.F b/ypp/symmetries/fix_PPs.F index 5da8a55eac..bbe7000e3c 100644 --- a/ypp/symmetries/fix_PPs.F +++ b/ypp/symmetries/fix_PPs.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): 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. +! Copyright (C) 2016 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): CA DS ! subroutine fix_PPs(E,k,k_save,kpoints_map,old_nsym,old_dl_sop,old_sop_inv,S_contains_TR,action_kind) ! diff --git a/ypp/symmetries/fix_QP_DBs.F b/ypp/symmetries/fix_QP_DBs.F index c26d61a599..798a28ba9d 100644 --- a/ypp/symmetries/fix_QP_DBs.F +++ b/ypp/symmetries/fix_QP_DBs.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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. +! Copyright (C) 2016 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): DS ! subroutine fix_QP_DBs(k,k_save,kpoints_map,action_kind) ! diff --git a/ypp/symmetries/fix_SC_DBs.F b/ypp/symmetries/fix_SC_DBs.F index 80ae5d3ccb..2c6c694ba4 100644 --- a/ypp/symmetries/fix_SC_DBs.F +++ b/ypp/symmetries/fix_SC_DBs.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): 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. +! Copyright (C) 2016 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): CA DS ! subroutine fix_SC_DBs(k,k_save,kpoints_map,action_kind) ! diff --git a/ypp/symmetries/fix_WFs_Gshells.F b/ypp/symmetries/fix_WFs_Gshells.F index 2924b69beb..8d3a1eefe8 100644 --- a/ypp/symmetries/fix_WFs_Gshells.F +++ b/ypp/symmetries/fix_WFs_Gshells.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): 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. +! Copyright (C) 2016 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): CA DS ! subroutine fix_WFs_Gshells(k,k_save,kpoints_map,old_nsym,action_kind) ! diff --git a/ypp/symmetries/fix_WFs_and_E.F b/ypp/symmetries/fix_WFs_and_E.F index 6566acea47..eb84c876c7 100644 --- a/ypp/symmetries/fix_WFs_and_E.F +++ b/ypp/symmetries/fix_WFs_and_E.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): 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. +! Copyright (C) 2016 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): CA DS ! subroutine fix_WFs_and_E(E,k,k_save,kpoints_map,old_nsym,S_contains_TR,action_kind) ! diff --git a/ypp/symmetries/fix_symmetries.F b/ypp/symmetries/fix_symmetries.F index 1f637a4ef5..d73423d5af 100644 --- a/ypp/symmetries/fix_symmetries.F +++ b/ypp/symmetries/fix_symmetries.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): 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. +! Copyright (C) 2016 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): CA DS ! subroutine fix_symmetries(old_nsym,old_dl_sop,old_sop_inv,S_contains_TR,action_kind) ! diff --git a/ypp/symmetries/k_build_map.F b/ypp/symmetries/k_build_map.F index bffbe229fd..367e80bc96 100644 --- a/ypp/symmetries/k_build_map.F +++ b/ypp/symmetries/k_build_map.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): 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. +! Copyright (C) 2016 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): CA DS ! subroutine k_build_map(k,k_save,kpoints_map,action_kind) ! diff --git a/ypp/symmetries/symmetries_driver.F b/ypp/symmetries/symmetries_driver.F index 126f2f8a32..4a66f7e01d 100644 --- a/ypp/symmetries/symmetries_driver.F +++ b/ypp/symmetries/symmetries_driver.F @@ -1,25 +1,9 @@ ! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! 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 -! 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. +! Copyright (C) 2016 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 CA DS ! subroutine symmetries_driver(E,Xk) ! From de6125149780aaa3f983c81955737b95cdfdb8fe Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Sat, 14 Oct 2023 15:21:53 +0200 Subject: [PATCH 074/110] merged with develop, but no QP printing at least on doncamillo --- src/qp/QP_ppa_cohsex.F | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index e1ad19b126..6bd6be136d 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -41,7 +41,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) use IO_int, ONLY:io_control use IO_m, ONLY:manage_action,OP_RD_CL,REP,VERIFY,NONE,OP_RD,RD_CL_IF_END,& & io_RESPONSE,deliver_IO_error_message - use QP_m, ONLY:QP_t,QP_n_G_bands,QP_dSc_steps,QP_table,l_update_W,l_QP_symmetrize,& + use QP_m, ONLY:QP_solver,QP_t,QP_n_G_bands,QP_dSc_steps,QP_Sc_steps,QP_table,l_QP_symmetrize,& & QP_Sc,QP_n_states,QP_G_damp,QP_table,QP_dSc_delta,GW_terminator_E,& & COHSEX_use_empties,l_GW_terminator,GW_terminator_Kind,QP_states_simmetrize use X_m, ONLY:X_ALLOC_elemental,X_par,X_t @@ -73,6 +73,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) type(QP_t) ::qp type(w_samp) ::Xw integer ::GW_iter + type(w_samp) ::Sc_W(qp%n_states) ! ! Work Space ! @@ -101,7 +102,6 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) complex(SP), pointer DEV_ATTR :: iscp_rhotw_p(:) complex(SP), pointer DEV_ATTR :: isc_gamp_p(:,:) complex(SP), pointer DEV_ATTR :: X_blc_p(:,:,:) - real(SP), pointer DEV_ATTR :: RIM_W_p(:,:,:) ! integer, external ::io_X complex(SP), external ::QP_ppa_EET_terminator @@ -441,9 +441,6 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) isc_gamp_p => DEV_VAR(isc%gamp) endif ! - if(l_ppa.and.l_RIM_W) then - RIM_W_p=>DEV_VAR(RIM_W) - endif ! if(l_ppa.and.l_GW_terminator) then YAMBO_ALLOC(eet_factor,(X_rows1:X_rows2,X_cols1:X_cols2)) @@ -678,7 +675,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) if (RIM_W_is_diagonal.and.l_RIM_W_g) l_RIM_W_g=(ig1==ig2) ! if (l_RIM_W_g) then - PPA_R=-cmplx(RIM_W_p(iqibz,ig1,ig2)/2._SP, & + PPA_R=-cmplx(real(RIM_W_d(1,iqibz,ig1,ig2))/2._SP, & & aimag(X_blc_p(ig1,ig2,X_range1))*real(isc_gamp_p(ig1,ig2)),kind=SP)/2._SP*PPA_E else PPA_R=-X_blc_p(ig1,ig2,X_range1)/2._SP*PPA_E*isc_gamp_p(ig1,ig2) From 8a740df4e5330bd19bc98afab99625dc991563e9 Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Sat, 14 Oct 2023 16:03:55 +0200 Subject: [PATCH 075/110] adding in QP_mpa the l_RIMW_W_g as private variable in omp. PPA works, MPA maybe. ToTest --- src/qp/QP_mpa.F | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index aed2cc6fa0..56febc1b11 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -290,7 +290,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) MP_Qerr=0._SP cond_numQ(:)=0._SP ! - !$omp parallel default(shared),private(ig1,ig2,MPred,PPcond_rate,MP_err,cond_num,i_np,MPA_Xo), & + !$omp parallel default(shared),private(ig1,ig2,MPred,PPcond_rate,MP_err,cond_num,i_np,MPA_Xo,l_RIM_W_g), & !$omp & reduction(+:MPred_rate,PPcond_Qrate,MP_Qerr,cond_numQ) ! YAMBO_ALLOC(MPA_Xo,(Xw%n_freqs)) @@ -442,7 +442,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) W_1=W_(1) W_i=W_(i_w) ! - !DEV_OMP parallel do default(shared), private(i_np,ig1,ig2,bose_PPA_E,ctmp), & + !DEV_OMP parallel do default(shared), private(i_np,ig1,ig2,bose_PPA_E,ctmp,l_RIM_W_g), & !DEV_OMP & reduction(+:dp_dummy), collapse(3) ! !DEV_CUF kernel do(3) From 15c5cde21b1040b9596dae26a5a4893932efd685 Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Sat, 14 Oct 2023 16:21:12 +0200 Subject: [PATCH 076/110] trying to use the same dp_dummy logic in mpa as in ppa --- src/qp/QP_mpa.F | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index 56febc1b11..33f11ce987 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -506,11 +506,12 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) ! if (have_cuda) dp_dummy=cmplx(dp_dummy_r,dp_dummy_i,kind=DP) ! - dc(i_w) = cmplx(dp_dummy,KIND=SP) + !dc(i_w) = cmplx(dp_dummy,KIND=SP) + QP_Sc(i_qp,i_w)=QP_Sc(i_qp,i_w)+cmplx(dp_dummy,kind=SP) ! enddo ! - QP_Sc(i_qp,:QP_dSc_steps)=QP_Sc(i_qp,:QP_dSc_steps)+dc(:QP_dSc_steps) + !QP_Sc(i_qp,:QP_dSc_steps)=QP_Sc(i_qp,:QP_dSc_steps)+dc(:QP_dSc_steps) ! ! enddo ! loop on scattering states From 0c02a440a150ab3deff5778fc3e0830db8a04b72 Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Sun, 15 Oct 2023 14:14:28 +0200 Subject: [PATCH 077/110] MPA_Xo allocation done now in io_MPA (with the assignement MPA_Xo = X_mat(ig1,ig2) for ig1,ig2 in 1,X%Ng ==> in this way we deallocate X_mat in the io_MPA MPA_Xo variable is defined in mod_MPA now. MPA_Xo is deallocated in MPA_FREE now. --- src/io/io_MPA.F | 380 ++++++++++++++++++++++-------------------- src/modules/mod_MPA.F | 4 + src/qp/QP_mpa.F | 10 +- 3 files changed, 203 insertions(+), 191 deletions(-) diff --git a/src/io/io_MPA.F b/src/io/io_MPA.F index cd1e98a335..72384fac34 100644 --- a/src/io/io_MPA.F +++ b/src/io/io_MPA.F @@ -6,201 +6,211 @@ ! Authors (see AUTHORS file for details): DALV AF ! integer function io_MPA(X,Xw,ID) - ! - use pars, ONLY:SP,schlen - use units, ONLY:HA2EV - use R_lattice, ONLY:nqibz,g_vec - 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_bulk,io_header,& +! +use pars, ONLY:SP,schlen +use units, ONLY:HA2EV +use R_lattice, ONLY:nqibz,g_vec +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_bulk,io_header,& & def_variable_bulk,io_variable_bulk,def_variable_elemental,io_variable_elemental,& & io_fragment,ver_is_gt_or_eq - use IO_m, ONLY:io_sec,io_com,io_status,read_is_on,write_is_on,io_serial_number,serial_number,& +use IO_m, ONLY:io_sec,io_com,io_status,read_is_on,write_is_on,io_serial_number,serial_number,& & NONE,IO_INCOMPATIBLE_VAR,io_MULTIPOLE,IO_NOT_ALLOWED,io_extension,& & IO_OUTDATED_DB,frag_MULTIPOLE,IO_NO_DATABASE,io_mode,DUMP,frag_RESPONSE - use stderr, ONLY:intc - use timing_m, ONLY:timing - use mpa_m, ONLY:MPA_E_mat,MPA_R_mat,MPA_freqs,MPA_alloc - ! +use stderr, ONLY:intc +use timing_m, ONLY:timing +use mpa_m, ONLY:MPA_E_mat,MPA_R_mat,MPA_freqs,MPA_alloc,MPA_Xo +! #include - ! - type(X_t) :: X - type(w_samp):: Xw - integer :: ID - ! - !Work Space - ! - integer :: sec_size,i1,iq,i_err,io_com_save,io_err,ID_frag - logical :: different_db_RL_order - character(schlen) :: ch,db_desc - character(2) :: local_XC_KIND - real(SP), allocatable :: RL_vecs_disk(:,:) - complex(SP),allocatable :: X_on_disk(:,:) - ! - integer, external :: variables_MPA - ! - ! checks & return - ! - if (.not.io_MULTIPOLE) then - io_MPA=IO_NOT_ALLOWED - call io_disconnect(ID,FORCE=.TRUE.) - return - endif - ! - call timing('io_MPA',OPR='start') - ! - different_db_RL_order=.false. - ! - ID_frag=0 - ! - io_extension(ID)='mpa_ER' - ! - iq=0 - do i1=1,size(io_sec(ID,:)) - if (io_sec(ID,i1)==0) cycle - iq=io_sec(ID,i1)/2 - enddo - ! - io_MPA=io_connect(desc=trim(io_extension(ID)),type=2,ID=ID,FORCE_READ_MODE=iq>0.and.frag_RESPONSE) - if (io_MPA/=0) goto 1 - ! - if (any((/io_sec(ID,:)==1/))) then - ! - ! Header - ! - io_MPA=io_header(ID,QPTS=.true.,R_LATT=.true.,WF=.false.,FRAG=frag_MULTIPOLE) - if (io_MPA/=0) goto 1 - ! - ! Global Descriptions - !===================== - ! - io_MPA=variables_MPA(ID,MPA_desc,X) - if (io_MPA/=0) goto 1 - ! - ! Close & Menu lower line - ! - if (.not.any((/io_sec(ID,:)==2/))) then - call io_elemental(ID,VAR="",VAR_SZ=0,MENU=1) - io_MPA=io_status(ID) - if (io_MPA/=0) goto 1 - else - call io_elemental(ID,VAR="",VAR_SZ=0,MENU=0) - endif - endif - ! - if (iq==0) goto 1 - ! - call io_fragment(ID,ID_frag,i_fragment=iq,ierr=io_err) - io_MPA=io_err - if (io_err/=0) goto 1 - ! - ! 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) - call def_variable_elemental(ID_frag,trim(ch),sec_size,SP,1) - ! - 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,"",0,0,1) - io_MPA=io_status(ID_frag) - ! - io_com(ID_frag)=io_com_save - ! - if (io_MPA/=0) goto 1 - ! - endif - ! - if (any((/io_sec(ID,:)==2*iq+1/))) then - ! - ! Xw%p - ! - if (read_is_on(ID)) then - YAMBO_FREE(Xw%p) - YAMBO_ALLOC(Xw%p,(Xw%n_freqs)) - endif - ! - ! poles @iq - ! - ch="MPA_E_Q_"//trim(intc(iq)) - ! - ! - call def_variable_bulk(ID_frag,trim(ch),1,(/2,shape(MPA_E_mat)/),SP) - call io_variable_bulk(ID_frag,1,C3=MPA_E_mat,IPOS=(/1,1,1,1/)) - ! - ! residues @iq - ! - ch="MPA_R_Q_"//trim(intc(iq)) - ! - call def_variable_bulk(ID_frag,trim(ch),1,(/2,shape(MPA_R_mat)/),SP) - call io_variable_bulk(ID_frag,1,C3=MPA_R_mat,IPOS=(/1,1,1,1/)) - ! - if (read_is_on(ID) .and. different_db_RL_order) then - call error('[io_MPA] different_db_RL_order not implemented') - ! - YAMBO_ALLOC(X_on_disk,(X%ng,X%ng)) - do i1=1,Xw%n_freqs - X_on_disk=X_mat(:,:,i1) - X_mat(X_RLcomp_ig(:),X_RLcomp_ig(:),i1)=X_on_disk - enddo - YAMBO_FREE(X_on_disk) - endif - ! - endif - ! - ! Sections 1 & 2 are used in VERIFY mode. - ! Now that the menu is closed I can return with io_MPA/=0 if there is a restart point - ! - if (io_mode(ID)/=DUMP) then - io_MPA=IO_NO_DATABASE - if (io_err==0) io_MPA=iq - endif - ! +! +type(X_t) :: X +type(w_samp):: Xw +integer :: ID +! +!Work Space +! +integer :: sec_size,i1,iq,i_err,io_com_save,io_err,ID_frag +!MB adding ig1,ig2. +integer :: ig1,ig2 +logical :: different_db_RL_order +character(schlen) :: ch,db_desc +character(2) :: local_XC_KIND +real(SP), allocatable :: RL_vecs_disk(:,:) +complex(SP),allocatable :: X_on_disk(:,:) +! +integer, external :: variables_MPA +! +! checks & return +! +if (.not.io_MULTIPOLE) then + io_MPA=IO_NOT_ALLOWED + call io_disconnect(ID,FORCE=.TRUE.) + return +endif +! +call timing('io_MPA',OPR='start') +! +different_db_RL_order=.false. +! +ID_frag=0 +! +io_extension(ID)='mpa_ER' +! +iq=0 +do i1=1,size(io_sec(ID,:)) + if (io_sec(ID,i1)==0) cycle + iq=io_sec(ID,i1)/2 +enddo +! +io_MPA=io_connect(desc=trim(io_extension(ID)),type=2,ID=ID,FORCE_READ_MODE=iq>0.and.frag_RESPONSE) +if (io_MPA/=0) goto 1 +! +if (any((/io_sec(ID,:)==1/))) then + ! + ! Header + ! + io_MPA=io_header(ID,QPTS=.true.,R_LATT=.true.,WF=.false.,FRAG=frag_MULTIPOLE) + if (io_MPA/=0) goto 1 + ! + ! Global Descriptions + !===================== + ! + io_MPA=variables_MPA(ID,MPA_desc,X) + if (io_MPA/=0) goto 1 + ! + ! Close & Menu lower line + ! + if (.not.any((/io_sec(ID,:)==2/))) then + call io_elemental(ID,VAR="",VAR_SZ=0,MENU=1) + io_MPA=io_status(ID) + if (io_MPA/=0) goto 1 + else + call io_elemental(ID,VAR="",VAR_SZ=0,MENU=0) + endif +endif +! +if (iq==0) goto 1 +! +call io_fragment(ID,ID_frag,i_fragment=iq,ierr=io_err) +io_MPA=io_err +if (io_err/=0) goto 1 +! +! 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) + call def_variable_elemental(ID_frag,trim(ch),sec_size,SP,1) + ! + 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,"",0,0,1) + io_MPA=io_status(ID_frag) + ! + io_com(ID_frag)=io_com_save + ! + if (io_MPA/=0) goto 1 + ! +endif +! +if (any((/io_sec(ID,:)==2*iq+1/))) then + ! + ! Xw%p + ! + if (read_is_on(ID)) then + YAMBO_FREE(Xw%p) + YAMBO_ALLOC(Xw%p,(Xw%n_freqs)) + endif + ! + ! poles @iq + ! + ch="MPA_E_Q_"//trim(intc(iq)) + ! + ! + call def_variable_bulk(ID_frag,trim(ch),1,(/2,shape(MPA_E_mat)/),SP) + call io_variable_bulk(ID_frag,1,C3=MPA_E_mat,IPOS=(/1,1,1,1/)) + ! + ! residues @iq + ! + ch="MPA_R_Q_"//trim(intc(iq)) + ! + call def_variable_bulk(ID_frag,trim(ch),1,(/2,shape(MPA_R_mat)/),SP) + call io_variable_bulk(ID_frag,1,C3=MPA_R_mat,IPOS=(/1,1,1,1/)) + ! + if (read_is_on(ID) .and. different_db_RL_order) then + call error('[io_MPA] different_db_RL_order not implemented') + ! + YAMBO_ALLOC(X_on_disk,(X%ng,X%ng)) + do i1=1,Xw%n_freqs + X_on_disk=X_mat(:,:,i1) + X_mat(X_RLcomp_ig(:),X_RLcomp_ig(:),i1)=X_on_disk + enddo + YAMBO_FREE(X_on_disk) + endif + ! +endif +!MB: +allocate(MPA_Xo(Xw%n_freqs)) +do ig2=1,X%ng + do ig1=1,X%ng + MPA_Xo(1:Xw%n_freqs)=X_mat(ig1,ig2,1:Xw%n_freqs) + enddo +enddo +YAMBO_FREE(X_mat) +! +! Sections 1 & 2 are used in VERIFY mode. +! Now that the menu is closed I can return with io_MPA/=0 if there is a restart point +! +if (io_mode(ID)/=DUMP) then + io_MPA=IO_NO_DATABASE + if (io_err==0) io_MPA=iq +endif +! 1 call io_fragment_disconnect(ID,ID_frag) - call io_disconnect(ID) - ! - call timing('io_MPA',OPR='stop') - ! +call io_disconnect(ID) +! +call timing('io_MPA',OPR='stop') +! end function ! ! integer function variables_MPA(ID,local_desc,X) - ! - use pars, ONLY:schlen,lchlen - use units, ONLY:HA2EV - use descriptors, ONLY:IO_desc,IO_desc_reset - use X_m, ONLY:X_t - use IO_int, ONLY:io_elemental,ver_is_gt_or_eq - use IO_m, ONLY:io_status,read_is_on - implicit none - ! - integer ::ID - type(IO_desc) ::local_desc - type(X_t) ::X - ! - ! Work Space - ! - integer ::i_local_desc,sec_size - character(schlen) ::X_label,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,& +! +use pars, ONLY:schlen,lchlen +use units, ONLY:HA2EV +use descriptors, ONLY:IO_desc,IO_desc_reset +use X_m, ONLY:X_t +use IO_int, ONLY:io_elemental,ver_is_gt_or_eq +use IO_m, ONLY:io_status,read_is_on +implicit none +! +integer ::ID +type(IO_desc) ::local_desc +type(X_t) ::X +! +! Work Space +! +integer ::i_local_desc,sec_size +character(schlen) ::X_label,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,& +call io_elemental(ID,& & VAR="MPA npoles :",I0=X%mpa_npoles,MENU=0,DESCRIPTOR=local_desc) - ! - variables_MPA=io_status(ID) - ! +! +variables_MPA=io_status(ID) +! end function diff --git a/src/modules/mod_MPA.F b/src/modules/mod_MPA.F index eda6ba071d..813ecb57df 100644 --- a/src/modules/mod_MPA.F +++ b/src/modules/mod_MPA.F @@ -42,6 +42,8 @@ module mpa_m ! complex(SP), allocatable DEV_ATTR, target :: MPA_E_mat_d(:,:,:) complex(SP), allocatable DEV_ATTR, target :: MPA_R_mat_d(:,:,:) + !MB MPA_Xo from QP_mpa to here. + complex(SP), allocatable :: MPA_Xo(:) public :: mpa_RE_solver,err_func_X public :: MPA_alloc,MPA_free @@ -65,6 +67,8 @@ subroutine MPA_free() YAMBO_FREE(MPA_E_mat) YAMBO_FREE(MPA_R_mat) YAMBO_FREE(MPA_freqs) + !MB: adding free MPA_Xo + YAMBO_FREE(MPA_Xo) #ifdef _CUDA YAMBO_FREE(MPA_E_mat_d) YAMBO_FREE(MPA_R_mat_d) diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index 33f11ce987..93e0fe6ce6 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -39,7 +39,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) use matrix_operate,ONLY:mat_transpose use timing_m, ONLY:timing use mpa_m, ONLY:mpa_RE_solver,err_func_X,MPA_E_mat,MPA_R_mat,MPA_freqs,& -& MPA_alloc,MPA_free,MPA_E_mat_d,MPA_R_mat_d +& MPA_alloc,MPA_free,MPA_E_mat_d,MPA_R_mat_d,MPA_Xo use drivers, ONLY:Finite_Tel use D_lattice, ONLY:Bose_Temp use functions, ONLY:bose_E_cut @@ -86,7 +86,6 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) integer :: i_np,ID2 logical :: MPred real(SP) :: bose_PPA_E,MPred_rate,PPcond_rate,PPcond_Qrate,MP_err,MP_Qerr,cond_num(2),cond_numQ(2) - complex(SP), allocatable :: MPA_Xo(:) character(len=99):: str ! integer, external::io_X,io_MPA,QP_state_extract @@ -293,7 +292,6 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) !$omp parallel default(shared),private(ig1,ig2,MPred,PPcond_rate,MP_err,cond_num,i_np,MPA_Xo,l_RIM_W_g), & !$omp & reduction(+:MPred_rate,PPcond_Qrate,MP_Qerr,cond_numQ) ! - YAMBO_ALLOC(MPA_Xo,(Xw%n_freqs)) ! !$omp do collapse(2) do ig2=1,X%ng @@ -302,9 +300,10 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) l_RIM_W_g=(l_RIM_W.and.ig1<=RIM_W_ng.and.ig2<=RIM_W_ng) if(l_RIM_W_g) then MPA_Xo(1:Xw%n_freqs)=RIM_W(1:Xw%n_freqs,iqibz,ig1,ig2)/2._SP - else + !MB: the else now is no more needed. it is already done in io_MPA + !else !DALV: the multiplication by isc%gamp(ig1,ig2) is performed later - MPA_Xo(1:Xw%n_freqs)=X_mat(ig1,ig2,1:Xw%n_freqs) + !MPA_Xo(1:Xw%n_freqs)=X_mat(ig1,ig2,1:Xw%n_freqs) endif MPred=.false. PPcond_rate=0._SP @@ -322,7 +321,6 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) enddo !$omp end do ! - YAMBO_FREE(MPA_Xo) ! !$omp end parallel ! From c4bd4282a0f3c609ad22a24a429dd532b0807e7e Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Sun, 15 Oct 2023 16:02:12 +0200 Subject: [PATCH 078/110] Revert "trying to use the same dp_dummy logic in mpa as in ppa" This reverts commit 15c5cde21b1040b9596dae26a5a4893932efd685. --- src/qp/QP_mpa.F | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index 93e0fe6ce6..39b837b81c 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -504,12 +504,11 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) ! if (have_cuda) dp_dummy=cmplx(dp_dummy_r,dp_dummy_i,kind=DP) ! - !dc(i_w) = cmplx(dp_dummy,KIND=SP) - QP_Sc(i_qp,i_w)=QP_Sc(i_qp,i_w)+cmplx(dp_dummy,kind=SP) + dc(i_w) = cmplx(dp_dummy,KIND=SP) ! enddo ! - !QP_Sc(i_qp,:QP_dSc_steps)=QP_Sc(i_qp,:QP_dSc_steps)+dc(:QP_dSc_steps) + QP_Sc(i_qp,:QP_dSc_steps)=QP_Sc(i_qp,:QP_dSc_steps)+dc(:QP_dSc_steps) ! ! enddo ! loop on scattering states From 7b46b3869fcabb402b345f1674b2a6bf98354f96 Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Sun, 15 Oct 2023 16:02:42 +0200 Subject: [PATCH 079/110] Revert "MPA_Xo allocation done now in io_MPA (with the assignement" This reverts commit 0c02a440a150ab3deff5778fc3e0830db8a04b72. --- src/io/io_MPA.F | 380 ++++++++++++++++++++---------------------- src/modules/mod_MPA.F | 4 - src/qp/QP_mpa.F | 10 +- 3 files changed, 191 insertions(+), 203 deletions(-) diff --git a/src/io/io_MPA.F b/src/io/io_MPA.F index 72384fac34..cd1e98a335 100644 --- a/src/io/io_MPA.F +++ b/src/io/io_MPA.F @@ -6,211 +6,201 @@ ! Authors (see AUTHORS file for details): DALV AF ! integer function io_MPA(X,Xw,ID) -! -use pars, ONLY:SP,schlen -use units, ONLY:HA2EV -use R_lattice, ONLY:nqibz,g_vec -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_bulk,io_header,& + ! + use pars, ONLY:SP,schlen + use units, ONLY:HA2EV + use R_lattice, ONLY:nqibz,g_vec + 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_bulk,io_header,& & def_variable_bulk,io_variable_bulk,def_variable_elemental,io_variable_elemental,& & io_fragment,ver_is_gt_or_eq -use IO_m, ONLY:io_sec,io_com,io_status,read_is_on,write_is_on,io_serial_number,serial_number,& + use IO_m, ONLY:io_sec,io_com,io_status,read_is_on,write_is_on,io_serial_number,serial_number,& & NONE,IO_INCOMPATIBLE_VAR,io_MULTIPOLE,IO_NOT_ALLOWED,io_extension,& & IO_OUTDATED_DB,frag_MULTIPOLE,IO_NO_DATABASE,io_mode,DUMP,frag_RESPONSE -use stderr, ONLY:intc -use timing_m, ONLY:timing -use mpa_m, ONLY:MPA_E_mat,MPA_R_mat,MPA_freqs,MPA_alloc,MPA_Xo -! + use stderr, ONLY:intc + use timing_m, ONLY:timing + use mpa_m, ONLY:MPA_E_mat,MPA_R_mat,MPA_freqs,MPA_alloc + ! #include -! -type(X_t) :: X -type(w_samp):: Xw -integer :: ID -! -!Work Space -! -integer :: sec_size,i1,iq,i_err,io_com_save,io_err,ID_frag -!MB adding ig1,ig2. -integer :: ig1,ig2 -logical :: different_db_RL_order -character(schlen) :: ch,db_desc -character(2) :: local_XC_KIND -real(SP), allocatable :: RL_vecs_disk(:,:) -complex(SP),allocatable :: X_on_disk(:,:) -! -integer, external :: variables_MPA -! -! checks & return -! -if (.not.io_MULTIPOLE) then - io_MPA=IO_NOT_ALLOWED - call io_disconnect(ID,FORCE=.TRUE.) - return -endif -! -call timing('io_MPA',OPR='start') -! -different_db_RL_order=.false. -! -ID_frag=0 -! -io_extension(ID)='mpa_ER' -! -iq=0 -do i1=1,size(io_sec(ID,:)) - if (io_sec(ID,i1)==0) cycle - iq=io_sec(ID,i1)/2 -enddo -! -io_MPA=io_connect(desc=trim(io_extension(ID)),type=2,ID=ID,FORCE_READ_MODE=iq>0.and.frag_RESPONSE) -if (io_MPA/=0) goto 1 -! -if (any((/io_sec(ID,:)==1/))) then - ! - ! Header - ! - io_MPA=io_header(ID,QPTS=.true.,R_LATT=.true.,WF=.false.,FRAG=frag_MULTIPOLE) - if (io_MPA/=0) goto 1 - ! - ! Global Descriptions - !===================== - ! - io_MPA=variables_MPA(ID,MPA_desc,X) - if (io_MPA/=0) goto 1 - ! - ! Close & Menu lower line - ! - if (.not.any((/io_sec(ID,:)==2/))) then - call io_elemental(ID,VAR="",VAR_SZ=0,MENU=1) - io_MPA=io_status(ID) - if (io_MPA/=0) goto 1 - else - call io_elemental(ID,VAR="",VAR_SZ=0,MENU=0) - endif -endif -! -if (iq==0) goto 1 -! -call io_fragment(ID,ID_frag,i_fragment=iq,ierr=io_err) -io_MPA=io_err -if (io_err/=0) goto 1 -! -! 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) - call def_variable_elemental(ID_frag,trim(ch),sec_size,SP,1) - ! - 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,"",0,0,1) - io_MPA=io_status(ID_frag) - ! - io_com(ID_frag)=io_com_save - ! - if (io_MPA/=0) goto 1 - ! -endif -! -if (any((/io_sec(ID,:)==2*iq+1/))) then - ! - ! Xw%p - ! - if (read_is_on(ID)) then - YAMBO_FREE(Xw%p) - YAMBO_ALLOC(Xw%p,(Xw%n_freqs)) - endif - ! - ! poles @iq - ! - ch="MPA_E_Q_"//trim(intc(iq)) - ! - ! - call def_variable_bulk(ID_frag,trim(ch),1,(/2,shape(MPA_E_mat)/),SP) - call io_variable_bulk(ID_frag,1,C3=MPA_E_mat,IPOS=(/1,1,1,1/)) - ! - ! residues @iq - ! - ch="MPA_R_Q_"//trim(intc(iq)) - ! - call def_variable_bulk(ID_frag,trim(ch),1,(/2,shape(MPA_R_mat)/),SP) - call io_variable_bulk(ID_frag,1,C3=MPA_R_mat,IPOS=(/1,1,1,1/)) - ! - if (read_is_on(ID) .and. different_db_RL_order) then - call error('[io_MPA] different_db_RL_order not implemented') - ! - YAMBO_ALLOC(X_on_disk,(X%ng,X%ng)) - do i1=1,Xw%n_freqs - X_on_disk=X_mat(:,:,i1) - X_mat(X_RLcomp_ig(:),X_RLcomp_ig(:),i1)=X_on_disk - enddo - YAMBO_FREE(X_on_disk) - endif - ! -endif -!MB: -allocate(MPA_Xo(Xw%n_freqs)) -do ig2=1,X%ng - do ig1=1,X%ng - MPA_Xo(1:Xw%n_freqs)=X_mat(ig1,ig2,1:Xw%n_freqs) - enddo -enddo -YAMBO_FREE(X_mat) -! -! Sections 1 & 2 are used in VERIFY mode. -! Now that the menu is closed I can return with io_MPA/=0 if there is a restart point -! -if (io_mode(ID)/=DUMP) then - io_MPA=IO_NO_DATABASE - if (io_err==0) io_MPA=iq -endif -! + ! + type(X_t) :: X + type(w_samp):: Xw + integer :: ID + ! + !Work Space + ! + integer :: sec_size,i1,iq,i_err,io_com_save,io_err,ID_frag + logical :: different_db_RL_order + character(schlen) :: ch,db_desc + character(2) :: local_XC_KIND + real(SP), allocatable :: RL_vecs_disk(:,:) + complex(SP),allocatable :: X_on_disk(:,:) + ! + integer, external :: variables_MPA + ! + ! checks & return + ! + if (.not.io_MULTIPOLE) then + io_MPA=IO_NOT_ALLOWED + call io_disconnect(ID,FORCE=.TRUE.) + return + endif + ! + call timing('io_MPA',OPR='start') + ! + different_db_RL_order=.false. + ! + ID_frag=0 + ! + io_extension(ID)='mpa_ER' + ! + iq=0 + do i1=1,size(io_sec(ID,:)) + if (io_sec(ID,i1)==0) cycle + iq=io_sec(ID,i1)/2 + enddo + ! + io_MPA=io_connect(desc=trim(io_extension(ID)),type=2,ID=ID,FORCE_READ_MODE=iq>0.and.frag_RESPONSE) + if (io_MPA/=0) goto 1 + ! + if (any((/io_sec(ID,:)==1/))) then + ! + ! Header + ! + io_MPA=io_header(ID,QPTS=.true.,R_LATT=.true.,WF=.false.,FRAG=frag_MULTIPOLE) + if (io_MPA/=0) goto 1 + ! + ! Global Descriptions + !===================== + ! + io_MPA=variables_MPA(ID,MPA_desc,X) + if (io_MPA/=0) goto 1 + ! + ! Close & Menu lower line + ! + if (.not.any((/io_sec(ID,:)==2/))) then + call io_elemental(ID,VAR="",VAR_SZ=0,MENU=1) + io_MPA=io_status(ID) + if (io_MPA/=0) goto 1 + else + call io_elemental(ID,VAR="",VAR_SZ=0,MENU=0) + endif + endif + ! + if (iq==0) goto 1 + ! + call io_fragment(ID,ID_frag,i_fragment=iq,ierr=io_err) + io_MPA=io_err + if (io_err/=0) goto 1 + ! + ! 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) + call def_variable_elemental(ID_frag,trim(ch),sec_size,SP,1) + ! + 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,"",0,0,1) + io_MPA=io_status(ID_frag) + ! + io_com(ID_frag)=io_com_save + ! + if (io_MPA/=0) goto 1 + ! + endif + ! + if (any((/io_sec(ID,:)==2*iq+1/))) then + ! + ! Xw%p + ! + if (read_is_on(ID)) then + YAMBO_FREE(Xw%p) + YAMBO_ALLOC(Xw%p,(Xw%n_freqs)) + endif + ! + ! poles @iq + ! + ch="MPA_E_Q_"//trim(intc(iq)) + ! + ! + call def_variable_bulk(ID_frag,trim(ch),1,(/2,shape(MPA_E_mat)/),SP) + call io_variable_bulk(ID_frag,1,C3=MPA_E_mat,IPOS=(/1,1,1,1/)) + ! + ! residues @iq + ! + ch="MPA_R_Q_"//trim(intc(iq)) + ! + call def_variable_bulk(ID_frag,trim(ch),1,(/2,shape(MPA_R_mat)/),SP) + call io_variable_bulk(ID_frag,1,C3=MPA_R_mat,IPOS=(/1,1,1,1/)) + ! + if (read_is_on(ID) .and. different_db_RL_order) then + call error('[io_MPA] different_db_RL_order not implemented') + ! + YAMBO_ALLOC(X_on_disk,(X%ng,X%ng)) + do i1=1,Xw%n_freqs + X_on_disk=X_mat(:,:,i1) + X_mat(X_RLcomp_ig(:),X_RLcomp_ig(:),i1)=X_on_disk + enddo + YAMBO_FREE(X_on_disk) + endif + ! + endif + ! + ! Sections 1 & 2 are used in VERIFY mode. + ! Now that the menu is closed I can return with io_MPA/=0 if there is a restart point + ! + if (io_mode(ID)/=DUMP) then + io_MPA=IO_NO_DATABASE + if (io_err==0) io_MPA=iq + endif + ! 1 call io_fragment_disconnect(ID,ID_frag) -call io_disconnect(ID) -! -call timing('io_MPA',OPR='stop') -! + call io_disconnect(ID) + ! + call timing('io_MPA',OPR='stop') + ! end function ! ! integer function variables_MPA(ID,local_desc,X) -! -use pars, ONLY:schlen,lchlen -use units, ONLY:HA2EV -use descriptors, ONLY:IO_desc,IO_desc_reset -use X_m, ONLY:X_t -use IO_int, ONLY:io_elemental,ver_is_gt_or_eq -use IO_m, ONLY:io_status,read_is_on -implicit none -! -integer ::ID -type(IO_desc) ::local_desc -type(X_t) ::X -! -! Work Space -! -integer ::i_local_desc,sec_size -character(schlen) ::X_label,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,& + ! + use pars, ONLY:schlen,lchlen + use units, ONLY:HA2EV + use descriptors, ONLY:IO_desc,IO_desc_reset + use X_m, ONLY:X_t + use IO_int, ONLY:io_elemental,ver_is_gt_or_eq + use IO_m, ONLY:io_status,read_is_on + implicit none + ! + integer ::ID + type(IO_desc) ::local_desc + type(X_t) ::X + ! + ! Work Space + ! + integer ::i_local_desc,sec_size + character(schlen) ::X_label,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,& + call io_elemental(ID,& & VAR="MPA npoles :",I0=X%mpa_npoles,MENU=0,DESCRIPTOR=local_desc) -! -variables_MPA=io_status(ID) -! + ! + variables_MPA=io_status(ID) + ! end function diff --git a/src/modules/mod_MPA.F b/src/modules/mod_MPA.F index 813ecb57df..eda6ba071d 100644 --- a/src/modules/mod_MPA.F +++ b/src/modules/mod_MPA.F @@ -42,8 +42,6 @@ module mpa_m ! complex(SP), allocatable DEV_ATTR, target :: MPA_E_mat_d(:,:,:) complex(SP), allocatable DEV_ATTR, target :: MPA_R_mat_d(:,:,:) - !MB MPA_Xo from QP_mpa to here. - complex(SP), allocatable :: MPA_Xo(:) public :: mpa_RE_solver,err_func_X public :: MPA_alloc,MPA_free @@ -67,8 +65,6 @@ subroutine MPA_free() YAMBO_FREE(MPA_E_mat) YAMBO_FREE(MPA_R_mat) YAMBO_FREE(MPA_freqs) - !MB: adding free MPA_Xo - YAMBO_FREE(MPA_Xo) #ifdef _CUDA YAMBO_FREE(MPA_E_mat_d) YAMBO_FREE(MPA_R_mat_d) diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index 39b837b81c..56febc1b11 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -39,7 +39,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) use matrix_operate,ONLY:mat_transpose use timing_m, ONLY:timing use mpa_m, ONLY:mpa_RE_solver,err_func_X,MPA_E_mat,MPA_R_mat,MPA_freqs,& -& MPA_alloc,MPA_free,MPA_E_mat_d,MPA_R_mat_d,MPA_Xo +& MPA_alloc,MPA_free,MPA_E_mat_d,MPA_R_mat_d use drivers, ONLY:Finite_Tel use D_lattice, ONLY:Bose_Temp use functions, ONLY:bose_E_cut @@ -86,6 +86,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) integer :: i_np,ID2 logical :: MPred real(SP) :: bose_PPA_E,MPred_rate,PPcond_rate,PPcond_Qrate,MP_err,MP_Qerr,cond_num(2),cond_numQ(2) + complex(SP), allocatable :: MPA_Xo(:) character(len=99):: str ! integer, external::io_X,io_MPA,QP_state_extract @@ -292,6 +293,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) !$omp parallel default(shared),private(ig1,ig2,MPred,PPcond_rate,MP_err,cond_num,i_np,MPA_Xo,l_RIM_W_g), & !$omp & reduction(+:MPred_rate,PPcond_Qrate,MP_Qerr,cond_numQ) ! + YAMBO_ALLOC(MPA_Xo,(Xw%n_freqs)) ! !$omp do collapse(2) do ig2=1,X%ng @@ -300,10 +302,9 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) l_RIM_W_g=(l_RIM_W.and.ig1<=RIM_W_ng.and.ig2<=RIM_W_ng) if(l_RIM_W_g) then MPA_Xo(1:Xw%n_freqs)=RIM_W(1:Xw%n_freqs,iqibz,ig1,ig2)/2._SP - !MB: the else now is no more needed. it is already done in io_MPA - !else + else !DALV: the multiplication by isc%gamp(ig1,ig2) is performed later - !MPA_Xo(1:Xw%n_freqs)=X_mat(ig1,ig2,1:Xw%n_freqs) + MPA_Xo(1:Xw%n_freqs)=X_mat(ig1,ig2,1:Xw%n_freqs) endif MPred=.false. PPcond_rate=0._SP @@ -321,6 +322,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) enddo !$omp end do ! + YAMBO_FREE(MPA_Xo) ! !$omp end parallel ! From 1a37b634bf40d65aa0ac6788b91aa136f654218c Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Sun, 15 Oct 2023 16:35:06 +0200 Subject: [PATCH 080/110] introduction of X_par in QP_mpa.F --- src/io/io_MPA.F | 3 ++- src/modules/mod_MPA.F | 7 +++++++ src/qp/QP_mpa.F | 18 +++++++++++++----- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/io/io_MPA.F b/src/io/io_MPA.F index cd1e98a335..d0ca077529 100644 --- a/src/io/io_MPA.F +++ b/src/io/io_MPA.F @@ -20,7 +20,8 @@ integer function io_MPA(X,Xw,ID) & IO_OUTDATED_DB,frag_MULTIPOLE,IO_NO_DATABASE,io_mode,DUMP,frag_RESPONSE use stderr, ONLY:intc use timing_m, ONLY:timing - use mpa_m, ONLY:MPA_E_mat,MPA_R_mat,MPA_freqs,MPA_alloc + use mpa_m, ONLY:MPA_E_mat,MPA_R_mat,MPA_freqs,MPA_alloc, & + & MPA_E_par,MPA_R_par ! #include ! diff --git a/src/modules/mod_MPA.F b/src/modules/mod_MPA.F index eda6ba071d..3d999bb13b 100644 --- a/src/modules/mod_MPA.F +++ b/src/modules/mod_MPA.F @@ -32,6 +32,7 @@ module mpa_m ! use pars, ONLY:SP,DP,cZERO,cONE,cI use functions, ONLY:NAN + use matrix, ONLY:PAR_matrix ! #include #include @@ -46,6 +47,12 @@ module mpa_m public :: mpa_RE_solver,err_func_X public :: MPA_alloc,MPA_free + ! MB: + ! PARALLEL distribution + ! + type(PAR_matrix), allocatable, target :: MPA_E_par(:,:,:) + type(PAR_matrix), allocatable, target :: MPA_R_par(:,:,:) + contains ! subroutine MPA_alloc(d) diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index 56febc1b11..d9c71a7703 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -30,7 +30,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) & io_RESPONSE,io_MULTIPOLE,deliver_IO_error_message use QP_m, ONLY:QP_t,QP_n_G_bands,QP_Sc_steps,QP_dSc_steps,QP_solver,& & QP_Sc,QP_n_states,QP_G_damp,QP_table,QP_dSc_delta - use X_m, ONLY:X_ALLOC_elemental,X_mat,X_t + use X_m, ONLY:X_ALLOC_elemental,X_mat,X_t,X_par use wave_func, ONLY:WF use R_lattice, ONLY:qindx_S,bz_samp,G_m_G,RIM_W_ng,RIM_W use D_lattice, ONLY:nsym,i_time_rev,i_space_inv,mag_syms @@ -210,7 +210,15 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) ! ALLOCATION !------------ ! - if (io_RESPONSE) call X_ALLOC_elemental('X',(/X%ng,X%ng,2*X%mpa_npoles/)) + !MB: we load X_par and not X_mat. refer to QP_ppa_cohsex. + ! deallocate X_mat + call X_ALLOC_elemental("X") + ! + if (.not.allocated(X_par).and.io_RESPONSE) then + allocate(X_par(1)) + endif + !if (io_RESPONSE) call X_ALLOC_elemental('X',(/X%ng,X%ng,2*X%mpa_npoles/)) + if (io_RESPONSE) call X_ALLOC_parallel('X',X_par(1),X%ng,2*X%mpa_npoles) YAMBO_ALLOC(W_,(QP_dSc_steps)) YAMBO_ALLOC(dc,(QP_dSc_steps)) ! @@ -296,15 +304,15 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) YAMBO_ALLOC(MPA_Xo,(Xw%n_freqs)) ! !$omp do collapse(2) - do ig2=1,X%ng - do ig1=1,X%ng + do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) + do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) ! l_RIM_W_g=(l_RIM_W.and.ig1<=RIM_W_ng.and.ig2<=RIM_W_ng) if(l_RIM_W_g) then MPA_Xo(1:Xw%n_freqs)=RIM_W(1:Xw%n_freqs,iqibz,ig1,ig2)/2._SP else !DALV: the multiplication by isc%gamp(ig1,ig2) is performed later - MPA_Xo(1:Xw%n_freqs)=X_mat(ig1,ig2,1:Xw%n_freqs) + MPA_Xo(1:Xw%n_freqs)=X_par(iq_mem)%blc(ig1,ig2,1:Xw%n_freqs) endif MPred=.false. PPcond_rate=0._SP From b1d73ad87f0236667465041f140ce40ff3886f9f Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Sun, 15 Oct 2023 16:46:03 +0200 Subject: [PATCH 081/110] bugfix in call X_ALLOC_parallel 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 d9c71a7703..ff93cb42f6 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -218,7 +218,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) allocate(X_par(1)) endif !if (io_RESPONSE) call X_ALLOC_elemental('X',(/X%ng,X%ng,2*X%mpa_npoles/)) - if (io_RESPONSE) call X_ALLOC_parallel('X',X_par(1),X%ng,2*X%mpa_npoles) + 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)) ! From 49eaafc78e14e76261c4f99caa2065cd76e7768a Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Sat, 21 Oct 2023 13:06:50 +0200 Subject: [PATCH 082/110] trying to add MPA_E_par and MPA_R_par. still not used in the Q loop in QP_mpa. So for now the QP should not work. --- src/allocations/MPA_ALLOC_parallel.F | 88 ++++++++++++++++++++++++++++ src/io/io_MPA.F | 8 ++- src/modules/mod_MPA.F | 73 +++++++++++++++++++++-- src/qp/QP_mpa.F | 9 ++- 4 files changed, 169 insertions(+), 9 deletions(-) create mode 100644 src/allocations/MPA_ALLOC_parallel.F diff --git a/src/allocations/MPA_ALLOC_parallel.F b/src/allocations/MPA_ALLOC_parallel.F new file mode 100644 index 0000000000..4b6d7d4603 --- /dev/null +++ b/src/allocations/MPA_ALLOC_parallel.F @@ -0,0 +1,88 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2023 The Yambo Team +! +! Authors (see AUTHORS file for details): MB +! +subroutine MPA_ALLOC_parallel(MPA_par,NG,NW,mode) + ! + use pars, ONLY:cZERO + use parallel_m, ONLY:COMM_copy,PAR_COM_RL_INDEX,PAR_COM_RL_A2A + use matrix, ONLY:MATRIX_reset,PAR_matrix + use X_m, ONLY:X_par_lower_triangle,X_rows,X_cols,& +& X_FILL_UP_matrix_only,X_lower_triangle_matrix_in_use + use parallel_int, ONLY:PARALLEL_live_message + use cuda_m, ONLY:have_cuda + ! +#include + ! + type(PAR_matrix) :: MPA_E_par, MPA_R_par + integer :: NG,NW + character(*) :: mode + ! + ! Work Space + ! + !logical :: l_XUP,l_PAR,l_CPU_ONLY + ! + ! Reset... + ! + call MATRIX_reset(MPA_E_par) + call MATRIX_reset(MPA_R_par) + ! + ! Type of allocation.... + ! + !l_XUP = index(mode,"XUP")>0 + !l_PAR = index(mode,"X")>0.and.index(mode,"XUP")==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( "MPA_E" , MPA_E_par , NG, NW ) + call MATRIX_init( "MPA_R" , MPA_R_par , NG, NW ) + !endif + ! + MPA_rows = MPA_E_par%rows + MPA_cols = MPA_E_par%cols + ! +! if (l_XUP.and..not.X_FILL_UP_matrix_only.and.X_par%INTER_comm%n_CPU>1) then +! ! +! call MATRIX_reset(X_par_lower_triangle) +! X_lower_triangle_matrix_in_use=.TRUE. +! X_par_lower_triangle%kind ="XDN" +! X_par_lower_triangle%rows =X_par%cols +! X_par_lower_triangle%cols =X_par%rows +! X_par_lower_triangle%nrows=X_par%ncols +! X_par_lower_triangle%ncols=X_par%nrows +! ! +! YAMBO_ALLOC(X_par_lower_triangle%blc,(X_par%cols(1):X_par%cols(2),X_par%rows(1):X_par%rows(2),NW)) +! X_par_lower_triangle%blc=cZERO +! if (have_cuda.and..not.l_CPU_ONLY) then +! YAMBO_ALLOC(X_par_lower_triangle%blc_d,(X_par%cols(1):X_par%cols(2),X_par%rows(1):X_par%rows(2),NW)) +! X_par_lower_triangle%blc_d=cZERO +! endif +! ! +! call COMM_copy(PAR_COM_RL_A2A, X_par_lower_triangle%INTRA_comm) +! call COMM_copy(PAR_COM_RL_INDEX, X_par_lower_triangle%INTER_comm) +! endif + ! + YAMBO_ALLOC(MPA_E_par%blc,(MPA_E_par%rows(1):MPA_E_par%rows(2),MPA_E_par%cols(1):MPA_E_par%cols(2),NW)) + MPA_E_par%blc=cZERO + if (have_cuda.and..not.l_CPU_ONLY) then + YAMBO_ALLOC(MPA_E_par%blc_d,(MPA_E_par%rows(1):MPA_E_par%rows(2),MPA_E_par%cols(1):MPA_E_par%cols(2),NW)) + MPA_E_par%blc_d=cZERO + endif + + YAMBO_ALLOC(MPA_R_par%blc,(MPA_R_par%rows(1):MPA_R_par%rows(2),MPA_R_par%cols(1):MPA_R_par%cols(2),NW)) + MPA_R_par%blc=cZERO + if (have_cuda.and..not.l_CPU_ONLY) then + YAMBO_ALLOC(MPA_R_par%blc_d,(MPA_R_par%rows(1):MPA_R_par%rows(2),MPA_R_par%cols(1):MPA_R_par%cols(2),NW)) + MPA_R_par%blc_d=cZERO + endif + ! + call PARALLEL_live_message("RL vectors(X)",LOADED=MPA_E_par%ncols*MPA_E_par%nrows,TOTAL=NG**2,NCPU=MPA_E_par%INTER_comm%n_CPU) + ! +end subroutine diff --git a/src/io/io_MPA.F b/src/io/io_MPA.F index d0ca077529..ad11d40065 100644 --- a/src/io/io_MPA.F +++ b/src/io/io_MPA.F @@ -107,7 +107,7 @@ integer function io_MPA(X,Xw,ID) ! must go through the definitions of the variables although only one is writing ! io_com_save=io_com(ID_frag) - call def_variable_elemental(ID_frag,trim(ch),sec_size,SP,1) + call def_variable_elemental(ID_frag,trim(ch),sec_size,SP,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=(/"=="/)) @@ -135,14 +135,16 @@ integer function io_MPA(X,Xw,ID) ch="MPA_E_Q_"//trim(intc(iq)) ! ! - call def_variable_bulk(ID_frag,trim(ch),1,(/2,shape(MPA_E_mat)/),SP) + !MB: here I let shape(MPA_E_mat), not sure about that, hope it works. + !MB: also, let's check the shapes also wrt #poles and Xfreqs. + call def_variable_bulk(ID_frag,trim(ch),1,(/2,shape(MPA_E_mat)/),SP,par_io_kind='independent') call io_variable_bulk(ID_frag,1,C3=MPA_E_mat,IPOS=(/1,1,1,1/)) ! ! residues @iq ! ch="MPA_R_Q_"//trim(intc(iq)) ! - call def_variable_bulk(ID_frag,trim(ch),1,(/2,shape(MPA_R_mat)/),SP) + call def_variable_bulk(ID_frag,trim(ch),1,(/2,shape(MPA_R_mat)/),SP,par_io_kind='independent') call io_variable_bulk(ID_frag,1,C3=MPA_R_mat,IPOS=(/1,1,1,1/)) ! if (read_is_on(ID) .and. different_db_RL_order) then diff --git a/src/modules/mod_MPA.F b/src/modules/mod_MPA.F index 3d999bb13b..c2ce97600b 100644 --- a/src/modules/mod_MPA.F +++ b/src/modules/mod_MPA.F @@ -32,7 +32,7 @@ module mpa_m ! use pars, ONLY:SP,DP,cZERO,cONE,cI use functions, ONLY:NAN - use matrix, ONLY:PAR_matrix + use matrix, ONLY:PAR_matrix ! #include #include @@ -50,9 +50,9 @@ module mpa_m ! MB: ! PARALLEL distribution ! - type(PAR_matrix), allocatable, target :: MPA_E_par(:,:,:) - type(PAR_matrix), allocatable, target :: MPA_R_par(:,:,:) - + type(PAR_matrix), allocatable, target :: MPA_E_par(:) + type(PAR_matrix), allocatable, target :: MPA_R_par(:) + ! contains ! subroutine MPA_alloc(d) @@ -742,5 +742,70 @@ subroutine mpa_RQ_3p_solver(w, x, r, q) ! end subroutine mpa_RQ_3p_solver ! +! + subroutine MPA_ALLOC_parallel(MPA_E_par,NG,NW,mode) + ! + use pars, ONLY:cZERO + use parallel_m, ONLY:COMM_copy,PAR_COM_RL_INDEX,PAR_COM_RL_A2A + use matrix, ONLY:MATRIX_reset,PAR_matrix + use X_m, ONLY:X_par_lower_triangle,X_rows,X_cols,& + & X_FILL_UP_matrix_only,X_lower_triangle_matrix_in_use + use parallel_int, ONLY:PARALLEL_live_message + use cuda_m, ONLY:have_cuda + ! + ! + type(PAR_matrix) :: MPA_E_par, MPA_R_par + integer :: NG,NW + character(*) :: mode + integer :: MPA_rows(2) = 0 + integer :: MPA_cols(2) = 0 + ! + ! Work Space + ! + logical :: l_XUP,l_PAR,l_CPU_ONLY + ! + ! Reset... + ! + call MATRIX_reset(MPA_E_par) + call MATRIX_reset(MPA_R_par) + ! + ! Type of allocation.... + ! + !l_XUP = index(mode,"XUP")>0 + !l_PAR = index(mode,"X")>0.and.index(mode,"XUP")==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( "MPA_E" , MPA_E_par , NG, NW ) + call MATRIX_init( "MPA_R" , MPA_R_par , NG, NW ) + !endif + ! + MPA_rows = MPA_E_par%rows + MPA_cols = MPA_E_par%cols + ! + ! + YAMBO_ALLOC(MPA_E_par%blc,(MPA_E_par%rows(1):MPA_E_par%rows(2),MPA_E_par%cols(1):MPA_E_par%cols(2),NW)) + MPA_E_par%blc=cZERO + if (have_cuda.and..not.l_CPU_ONLY) then + YAMBO_ALLOC(MPA_E_par%blc_d,(MPA_E_par%rows(1):MPA_E_par%rows(2),MPA_E_par%cols(1):MPA_E_par%cols(2),NW)) + MPA_E_par%blc_d=cZERO + endif + + YAMBO_ALLOC(MPA_R_par%blc,(MPA_R_par%rows(1):MPA_R_par%rows(2),MPA_R_par%cols(1):MPA_R_par%cols(2),NW)) + MPA_R_par%blc=cZERO + if (have_cuda.and..not.l_CPU_ONLY) then + YAMBO_ALLOC(MPA_R_par%blc_d,(MPA_R_par%rows(1):MPA_R_par%rows(2),MPA_R_par%cols(1):MPA_R_par%cols(2),NW)) + MPA_R_par%blc_d=cZERO + endif + ! + call PARALLEL_live_message("RL vectors(X)",LOADED=MPA_E_par%ncols*MPA_E_par%nrows,TOTAL=NG**2,NCPU=MPA_E_par%INTER_comm%n_CPU) + ! + end subroutine + ! end module mpa_m + diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index ff93cb42f6..3e7cdf0c97 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -39,7 +39,8 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) use matrix_operate,ONLY:mat_transpose use timing_m, ONLY:timing use mpa_m, ONLY:mpa_RE_solver,err_func_X,MPA_E_mat,MPA_R_mat,MPA_freqs,& -& MPA_alloc,MPA_free,MPA_E_mat_d,MPA_R_mat_d +& MPA_alloc,MPA_free,MPA_E_mat_d,MPA_R_mat_d, MPA_E_par,MPA_R_par,& +& MPA_ALLOC_parallel use drivers, ONLY:Finite_Tel use D_lattice, ONLY:Bose_Temp use functions, ONLY:bose_E_cut @@ -224,7 +225,11 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) ! ! MPA workspace ! - call MPA_alloc((/X%ng,X%ng,X%mpa_npoles,2*X%mpa_npoles/)) + !Instead of MPA_alloc, we try MPA_ALLOC_parallel + !call MPA_alloc((/X%ng,X%ng,X%mpa_npoles,2*X%mpa_npoles/)) + if (io_RESPONSE) call MPA_ALLOC_parallel(MPA_E_par(1),X%ng,2*X%mpa_npoles,"MPA") + ! todo: update mat=>par for MPA case. + ! ! ! AF: the following line needs to be moved elsewhere call parser('mpERdb',io_MULTIPOLE) From bf74f01a0c97c4e41cb68d8d2a7b9fd9f8485025 Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Sun, 19 Nov 2023 18:35:43 +0100 Subject: [PATCH 083/110] Added full MPA_par in the QP_mpa. Missing: the unload of the MPA_par matrix. MPA_free() for now only works with the MPA_mats. --- src/modules/mod_MPA.F | 3 ++ src/qp/QP_mpa.F | 68 ++++++++++++++++++++++++++++--------------- 2 files changed, 47 insertions(+), 24 deletions(-) diff --git a/src/modules/mod_MPA.F b/src/modules/mod_MPA.F index c2ce97600b..f45d915996 100644 --- a/src/modules/mod_MPA.F +++ b/src/modules/mod_MPA.F @@ -43,6 +43,9 @@ module mpa_m ! complex(SP), allocatable DEV_ATTR, target :: MPA_E_mat_d(:,:,:) complex(SP), allocatable DEV_ATTR, target :: MPA_R_mat_d(:,:,:) + !MB: + complex(SP), allocatable DEV_ATTR, target :: MPA_E_par_d(:,:,:) + complex(SP), allocatable DEV_ATTR, target :: MPA_R_par_d(:,:,:) public :: mpa_RE_solver,err_func_X public :: MPA_alloc,MPA_free diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index 3e7cdf0c97..f2da8ba343 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -40,7 +40,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) use timing_m, ONLY:timing use mpa_m, ONLY:mpa_RE_solver,err_func_X,MPA_E_mat,MPA_R_mat,MPA_freqs,& & MPA_alloc,MPA_free,MPA_E_mat_d,MPA_R_mat_d, MPA_E_par,MPA_R_par,& -& MPA_ALLOC_parallel +& MPA_ALLOC_parallel,MPA_E_par_d,MPA_R_par_d use drivers, ONLY:Finite_Tel use D_lattice, ONLY:Bose_Temp use functions, ONLY:bose_E_cut @@ -80,7 +80,10 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) complex(SP), pointer DEV_ATTR :: isc_gamp_p(:,:) complex(SP), pointer DEV_ATTR :: MPA_R_mat_p(:,:,:) complex(SP), pointer DEV_ATTR :: MPA_E_mat_p(:,:,:) - + ! + !MB: + complex(SP), pointer DEV_ATTR :: MPA_R_par_p(:,:,:) + complex(SP), pointer DEV_ATTR :: MPA_E_par_p(:,:,:) ! ! MPA variables ! @@ -324,7 +327,11 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) MP_err=0._SP cond_num(:)=0._SP ! - call mpa_RE_solver(X%mpa_npoles,MPA_freqs,MPA_Xo,MPA_R_mat(ig1,ig2,:),MPA_E_mat(ig1,ig2,:),& + !call mpa_RE_solver(X%mpa_npoles,MPA_freqs,MPA_Xo,MPA_R_mat(ig1,ig2,:),MPA_E_mat(ig1,ig2,:),& +!& Xw%mpa_solver,MPred,PPcond_rate,MP_err,cond_num) + !MB: in the following we introduce the MPA_E/R_par. should be same as X_par(iq_mem)%blc(ig1,ig2,X_range2), + ! where X_range2 -> : ... not sure if I have to introduce the iq_mem. + call mpa_RE_solver(X%mpa_npoles,MPA_freqs,MPA_Xo,MPA_R_par(iq_mem)%blc(ig1,ig2,:),MPA_E_par(iq_mem)%blc(ig1,ig2,:),& & Xw%mpa_solver,MPred,PPcond_rate,MP_err,cond_num) if(MPred) MPred_rate=MPred_rate+1._SP PPcond_Qrate=PPcond_Qrate+PPcond_rate @@ -351,6 +358,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) ! ! I/O MPA ! + ! MB: is this the "fake loading?" if (io_MULTIPOLE) then ! ! #if defined _PAR_IO @@ -387,20 +395,29 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) ! Note (AF) that $omp directives are inside mat_transpose ! do i_np=1,X%mpa_npoles - call mat_transpose(MPA_E_mat(:,:,i_np)) - call mat_transpose(MPA_R_mat(:,:,i_np)) + call mat_transpose(MPA_E_par(iq_mem)%blc(:,:,i_np)) + call mat_transpose(MPA_R_par(iq_mem)%blc(:,:,i_np)) enddo ! X_is_TR_rotated=.true. endif ! + !if (have_cuda) then + ! call dev_memcpy(MPA_E_mat_d,MPA_E_mat) + ! call dev_memcpy(MPA_R_mat_d,MPA_R_mat) + !endif + ! + !MPA_E_mat_p=>DEV_VAR(MPA_E_mat) + !MPA_R_mat_p=>DEV_VAR(MPA_R_mat) + ! + !MB: if (have_cuda) then - call dev_memcpy(MPA_E_mat_d,MPA_E_mat) - call dev_memcpy(MPA_R_mat_d,MPA_R_mat) + call dev_memcpy(MPA_E_par_d,MPA_E_par(iq_mem)%blc) + call dev_memcpy(MPA_R_par_d,MPA_R_par(iq_mem)%blc) endif - ! - MPA_E_mat_p=>DEV_VAR(MPA_E_mat) - MPA_R_mat_p=>DEV_VAR(MPA_R_mat) + ! + MPA_E_par_p=>DEV_VAR(MPA_E_par(iq_mem)%blc) + MPA_R_par_p=>DEV_VAR(MPA_E_par(iq_mem)%blc) ! call timing('GW(mpa)_qp_loop',OPR='start') ! @@ -461,20 +478,20 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) !DEV_CUF kernel do(3) ! do i_np=1,X_mpa_npoles - do ig2=1,X_ng - do ig1=1,X_ng + do ig2=X_par(iq_mem)%cols(1),X_par(iq_mem)%cols(2) + do ig1=X_par(iq_mem)%rows(1),X_par(iq_mem)%rows(2) ! ! DALV: inline bose_f function bose_PPA_E=0._SP ! - if (real(MPA_E_mat_p(ig1,ig2,i_np),SP)<0._SP) bose_PPA_E=-spin_occ + if (real(MPA_E_par_p(ig1,ig2,i_np),SP)<0._SP) bose_PPA_E=-spin_occ if (Finite_Tel) then - if (real(MPA_E_mat_p(ig1,ig2,i_np),SP)>epsilon(1._SP)) then - if (real(MPA_E_mat_p(ig1,ig2,i_np),SP)<=bose_E_cut*Bose_Temp) then - bose_PPA_E=spin_occ*Bose_Temp/real(MPA_E_mat_p(ig1,ig2,i_np),SP) + if (real(MPA_E_par_p(ig1,ig2,i_np),SP)>epsilon(1._SP)) then + if (real(MPA_E_par_p(ig1,ig2,i_np),SP)<=bose_E_cut*Bose_Temp) then + bose_PPA_E=spin_occ*Bose_Temp/real(MPA_E_par_p(ig1,ig2,i_np),SP) endif - if (real(MPA_E_mat_p(ig1,ig2,i_np),SP)> bose_E_cut*Bose_Temp) then - bose_PPA_E=spin_occ/(exp(real(MPA_E_mat_p(ig1,ig2,i_np),SP)/Bose_Temp)-1._SP) + if (real(MPA_E_par_p(ig1,ig2,i_np),SP)> bose_E_cut*Bose_Temp) then + bose_PPA_E=spin_occ/(exp(real(MPA_E_par_p(ig1,ig2,i_np),SP)/Bose_Temp)-1._SP) endif else bose_PPA_E=spin_occ*Bose_Temp/epsilon(1._SP) @@ -486,21 +503,21 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) if (l_RIM_W_g) then ! ctmp = -4._DP/spin_occ*pi*isc_rhotw_p(ig1)*conjg(iscp_rhotw_p(ig2)) *& -& (sign(1._SP,aimag(MPA_E_mat_p(ig1,ig2,i_np))) *MPA_R_mat_p(ig1,ig2,i_np))*& +& (sign(1._SP,aimag(MPA_E_par_p(ig1,ig2,i_np))) *MPA_R_par_p(ig1,ig2,i_np))*& & ( (spin_occ-f_kmq+bose_PPA_E)/(W_1-E_kmq & -& +sign(1._SP,aimag(MPA_E_mat_p(ig1,ig2,i_np)))*MPA_E_mat_p(ig1,ig2,i_np))+& +& +sign(1._SP,aimag(MPA_E_par_p(ig1,ig2,i_np)))*MPA_E_par_p(ig1,ig2,i_np))+& & (f_kmq+bose_PPA_E)/(conjg(W_1)-E_kmq & -& -sign(1._SP,aimag(MPA_E_mat_p(ig1,ig2,i_np)))*MPA_E_mat_p(ig1,ig2,i_np)) ) +& -sign(1._SP,aimag(MPA_E_par_p(ig1,ig2,i_np)))*MPA_E_par_p(ig1,ig2,i_np)) ) ! else ! ! DALV: the factor isc%gamp(ig1,ig2) is included here ctmp = -4._DP/spin_occ*pi*isc_rhotw_p(ig1)*conjg(iscp_rhotw_p(ig2)) *isc_gamp_p(ig1,ig2) *& -& (sign(1._SP,aimag(MPA_E_mat_p(ig1,ig2,i_np))) *MPA_R_mat_p(ig1,ig2,i_np))*& +& (sign(1._SP,aimag(MPA_E_par_p(ig1,ig2,i_np))) *MPA_R_par_p(ig1,ig2,i_np))*& & ( (spin_occ-f_kmq+bose_PPA_E)/(W_i-E_kmq & -& +sign(1._SP,aimag(MPA_E_mat_p(ig1,ig2,i_np)))*MPA_E_mat_p(ig1,ig2,i_np))+& +& +sign(1._SP,aimag(MPA_E_par_p(ig1,ig2,i_np)))*MPA_E_par_p(ig1,ig2,i_np))+& & (f_kmq+bose_PPA_E)/(conjg(W_i)-E_kmq & -& -sign(1._SP,aimag(MPA_E_mat_p(ig1,ig2,i_np)))*MPA_E_mat_p(ig1,ig2,i_np)) ) +& -sign(1._SP,aimag(MPA_E_par_p(ig1,ig2,i_np)))*MPA_E_par_p(ig1,ig2,i_np)) ) ! endif ! @@ -543,6 +560,9 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) YAMBO_FREE(dc) YAMBO_FREE(W_) call X_ALLOC_elemental('X') + ! + ! the following only free the MPA_mats + ! call MPA_free() ! call timing('GW(mpa)',OPR='stop') From 09ad9c3d0782445b2bad10cf251d2d5e79525abf Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Sun, 19 Nov 2023 19:23:19 +0100 Subject: [PATCH 084/110] Removing the reset in mod_mpa --- src/modules/mod_MPA.F | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/mod_MPA.F b/src/modules/mod_MPA.F index f45d915996..fc5a96a0c6 100644 --- a/src/modules/mod_MPA.F +++ b/src/modules/mod_MPA.F @@ -769,8 +769,9 @@ subroutine MPA_ALLOC_parallel(MPA_E_par,NG,NW,mode) ! ! Reset... ! - call MATRIX_reset(MPA_E_par) - call MATRIX_reset(MPA_R_par) + ! The reset is already done in the MPA_ALLOC_parallel + !call MATRIX_reset(MPA_E_par) + !call MATRIX_reset(MPA_R_par) ! ! Type of allocation.... ! From b75ed2901fc02af5fd0a105028998f2ba9f9eb06 Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Sun, 19 Nov 2023 20:01:34 +0100 Subject: [PATCH 085/110] MPA_alloc routine in X_alloc_parallel.F to be found. --- src/allocations/X_ALLOC_parallel.F | 63 ++++++++++++++++++++++++ src/modules/mod_MPA.F | 78 +++--------------------------- src/qp/QP_mpa.F | 8 +-- 3 files changed, 75 insertions(+), 74 deletions(-) diff --git a/src/allocations/X_ALLOC_parallel.F b/src/allocations/X_ALLOC_parallel.F index 99e36c5474..47a61b44bb 100644 --- a/src/allocations/X_ALLOC_parallel.F +++ b/src/allocations/X_ALLOC_parallel.F @@ -77,3 +77,66 @@ subroutine X_ALLOC_parallel(X_par,NG,NW,mode) call PARALLEL_live_message("RL vectors(X)",LOADED=X_par%ncols*X_par%nrows,TOTAL=NG**2,NCPU=X_par%INTER_comm%n_CPU) ! end subroutine + +! MB + ! +subroutine MPA_ALLOC_parallel(MPA_E_par,MPA_R_par,NG,NW,mode) + ! + use pars, ONLY:SP,DP,cZERO,cONE,cI + use functions, ONLY:NAN + use parallel_m, ONLY:COMM_copy,PAR_COM_RL_INDEX,PAR_COM_RL_A2A + use matrix, ONLY:MATRIX_reset,PAR_matrix + use X_m, ONLY:X_par_lower_triangle,X_rows,X_cols,& +& X_FILL_UP_matrix_only,X_lower_triangle_matrix_in_use + use parallel_int, ONLY:PARALLEL_live_message + use cuda_m, ONLY:have_cuda + ! +#include + ! + type(PAR_matrix) :: MPA_E_par, MPA_R_par + integer :: NG,NW + integer :: MPA_rows(2) = 0 + integer :: MPA_cols(2) = 0 + character(*) :: mode + ! + ! Work Space + ! + logical :: l_CPU_ONLY + ! + ! Reset... + ! + call MATRIX_reset(MPA_E_par) + call MATRIX_reset(MPA_R_par) + ! + ! Type of allocation.... + ! + !l_XUP = index(mode,"XUP")>0 + !l_PAR = index(mode,"X")>0.and.index(mode,"XUP")==0 + !l_CPU_ONLY = index(mode,"CPU_ONLY")>0 + ! + ! Initialization + ! + call MATRIX_init( "MPA_E" , MPA_E_par , NG, NW ) + call MATRIX_init( "MPA_R" , MPA_R_par , NG, NW ) + !endif + ! + MPA_rows = MPA_E_par%rows + MPA_cols = MPA_E_par%cols + ! + YAMBO_ALLOC(MPA_E_par%blc,(MPA_E_par%rows(1):MPA_E_par%rows(2),MPA_E_par%cols(1):MPA_E_par%cols(2),NW)) + MPA_E_par%blc=cZERO + if (have_cuda.and..not.l_CPU_ONLY) then + YAMBO_ALLOC(MPA_E_par%blc_d,(MPA_E_par%rows(1):MPA_E_par%rows(2),MPA_E_par%cols(1):MPA_E_par%cols(2),NW)) + MPA_E_par%blc_d=cZERO + endif + + YAMBO_ALLOC(MPA_R_par%blc,(MPA_R_par%rows(1):MPA_R_par%rows(2),MPA_R_par%cols(1):MPA_R_par%cols(2),NW)) + MPA_R_par%blc=cZERO + if (have_cuda.and..not.l_CPU_ONLY) then + YAMBO_ALLOC(MPA_R_par%blc_d,(MPA_R_par%rows(1):MPA_R_par%rows(2),MPA_R_par%cols(1):MPA_R_par%cols(2),NW)) + MPA_R_par%blc_d=cZERO + endif + ! + call PARALLEL_live_message("RL vectors(X)",LOADED=MPA_E_par%ncols*MPA_E_par%nrows,TOTAL=NG**2,NCPU=MPA_E_par%INTER_comm%n_CPU) + ! + end subroutine \ No newline at end of file diff --git a/src/modules/mod_MPA.F b/src/modules/mod_MPA.F index fc5a96a0c6..a149165d1d 100644 --- a/src/modules/mod_MPA.F +++ b/src/modules/mod_MPA.F @@ -32,7 +32,12 @@ module mpa_m ! use pars, ONLY:SP,DP,cZERO,cONE,cI use functions, ONLY:NAN - use matrix, ONLY:PAR_matrix + use parallel_m, ONLY:COMM_copy,PAR_COM_RL_INDEX,PAR_COM_RL_A2A + use matrix, ONLY:MATRIX_reset,PAR_matrix + use X_m, ONLY:X_par_lower_triangle,X_rows,X_cols,& + & X_FILL_UP_matrix_only,X_lower_triangle_matrix_in_use + use parallel_int, ONLY:PARALLEL_live_message + use cuda_m, ONLY:have_cuda ! #include #include @@ -44,17 +49,14 @@ module mpa_m complex(SP), allocatable DEV_ATTR, target :: MPA_E_mat_d(:,:,:) complex(SP), allocatable DEV_ATTR, target :: MPA_R_mat_d(:,:,:) !MB: + type(PAR_matrix), allocatable, target :: MPA_E_par(:) + type(PAR_matrix), allocatable, target :: MPA_R_par(:) complex(SP), allocatable DEV_ATTR, target :: MPA_E_par_d(:,:,:) complex(SP), allocatable DEV_ATTR, target :: MPA_R_par_d(:,:,:) public :: mpa_RE_solver,err_func_X public :: MPA_alloc,MPA_free - ! MB: - ! PARALLEL distribution - ! - type(PAR_matrix), allocatable, target :: MPA_E_par(:) - type(PAR_matrix), allocatable, target :: MPA_R_par(:) ! contains ! @@ -746,70 +748,6 @@ subroutine mpa_RQ_3p_solver(w, x, r, q) end subroutine mpa_RQ_3p_solver ! ! - subroutine MPA_ALLOC_parallel(MPA_E_par,NG,NW,mode) - ! - use pars, ONLY:cZERO - use parallel_m, ONLY:COMM_copy,PAR_COM_RL_INDEX,PAR_COM_RL_A2A - use matrix, ONLY:MATRIX_reset,PAR_matrix - use X_m, ONLY:X_par_lower_triangle,X_rows,X_cols,& - & X_FILL_UP_matrix_only,X_lower_triangle_matrix_in_use - use parallel_int, ONLY:PARALLEL_live_message - use cuda_m, ONLY:have_cuda - ! - ! - type(PAR_matrix) :: MPA_E_par, MPA_R_par - integer :: NG,NW - character(*) :: mode - integer :: MPA_rows(2) = 0 - integer :: MPA_cols(2) = 0 - ! - ! Work Space - ! - logical :: l_XUP,l_PAR,l_CPU_ONLY - ! - ! Reset... - ! - ! The reset is already done in the MPA_ALLOC_parallel - !call MATRIX_reset(MPA_E_par) - !call MATRIX_reset(MPA_R_par) - ! - ! Type of allocation.... - ! - !l_XUP = index(mode,"XUP")>0 - !l_PAR = index(mode,"X")>0.and.index(mode,"XUP")==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( "MPA_E" , MPA_E_par , NG, NW ) - call MATRIX_init( "MPA_R" , MPA_R_par , NG, NW ) - !endif - ! - MPA_rows = MPA_E_par%rows - MPA_cols = MPA_E_par%cols - ! - ! - YAMBO_ALLOC(MPA_E_par%blc,(MPA_E_par%rows(1):MPA_E_par%rows(2),MPA_E_par%cols(1):MPA_E_par%cols(2),NW)) - MPA_E_par%blc=cZERO - if (have_cuda.and..not.l_CPU_ONLY) then - YAMBO_ALLOC(MPA_E_par%blc_d,(MPA_E_par%rows(1):MPA_E_par%rows(2),MPA_E_par%cols(1):MPA_E_par%cols(2),NW)) - MPA_E_par%blc_d=cZERO - endif - - YAMBO_ALLOC(MPA_R_par%blc,(MPA_R_par%rows(1):MPA_R_par%rows(2),MPA_R_par%cols(1):MPA_R_par%cols(2),NW)) - MPA_R_par%blc=cZERO - if (have_cuda.and..not.l_CPU_ONLY) then - YAMBO_ALLOC(MPA_R_par%blc_d,(MPA_R_par%rows(1):MPA_R_par%rows(2),MPA_R_par%cols(1):MPA_R_par%cols(2),NW)) - MPA_R_par%blc_d=cZERO - endif - ! - call PARALLEL_live_message("RL vectors(X)",LOADED=MPA_E_par%ncols*MPA_E_par%nrows,TOTAL=NG**2,NCPU=MPA_E_par%INTER_comm%n_CPU) - ! - end subroutine - ! end module mpa_m diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index f2da8ba343..9dc698eca7 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -40,7 +40,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) use timing_m, ONLY:timing use mpa_m, ONLY:mpa_RE_solver,err_func_X,MPA_E_mat,MPA_R_mat,MPA_freqs,& & MPA_alloc,MPA_free,MPA_E_mat_d,MPA_R_mat_d, MPA_E_par,MPA_R_par,& -& MPA_ALLOC_parallel,MPA_E_par_d,MPA_R_par_d +& MPA_E_par_d,MPA_R_par_d use drivers, ONLY:Finite_Tel use D_lattice, ONLY:Bose_Temp use functions, ONLY:bose_E_cut @@ -88,7 +88,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) ! MPA variables ! integer :: i_np,ID2 - logical :: MPred + logical :: MPred,l_CPU_ONLY real(SP) :: bose_PPA_E,MPred_rate,PPcond_rate,PPcond_Qrate,MP_err,MP_Qerr,cond_num(2),cond_numQ(2) complex(SP), allocatable :: MPA_Xo(:) character(len=99):: str @@ -230,7 +230,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) ! !Instead of MPA_alloc, we try MPA_ALLOC_parallel !call MPA_alloc((/X%ng,X%ng,X%mpa_npoles,2*X%mpa_npoles/)) - if (io_RESPONSE) call MPA_ALLOC_parallel(MPA_E_par(1),X%ng,2*X%mpa_npoles,"MPA") + if (io_RESPONSE) call MPA_ALLOC_parallel(MPA_E_par(1),MPA_R_par(1),X%ng,2*X%mpa_npoles,"MPA") ! todo: update mat=>par for MPA case. ! ! @@ -561,7 +561,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) YAMBO_FREE(W_) call X_ALLOC_elemental('X') ! - ! the following only free the MPA_mats + ! the following only unload ! call MPA_free() ! From 23d58991c94120fcd5e3f5c8c80a483a82cadf82 Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Sun, 19 Nov 2023 20:08:59 +0100 Subject: [PATCH 086/110] no MPA reset in MPA_alloc_parallel --- src/allocations/X_ALLOC_parallel.F | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/allocations/X_ALLOC_parallel.F b/src/allocations/X_ALLOC_parallel.F index 47a61b44bb..d1a97c0b6d 100644 --- a/src/allocations/X_ALLOC_parallel.F +++ b/src/allocations/X_ALLOC_parallel.F @@ -105,8 +105,8 @@ subroutine MPA_ALLOC_parallel(MPA_E_par,MPA_R_par,NG,NW,mode) ! ! Reset... ! - call MATRIX_reset(MPA_E_par) - call MATRIX_reset(MPA_R_par) + !call MATRIX_reset(MPA_E_par) + !call MATRIX_reset(MPA_R_par) ! ! Type of allocation.... ! From cbb0529d8ab3716b548236ad86b4bf2e45fea162 Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Sun, 19 Nov 2023 20:15:43 +0100 Subject: [PATCH 087/110] adding "MPA" options for "what" parameter in MATRIX_init --- src/allocations/X_ALLOC_parallel.F | 4 ++-- src/matrices/MATRIX_init.F | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/allocations/X_ALLOC_parallel.F b/src/allocations/X_ALLOC_parallel.F index d1a97c0b6d..28b2880170 100644 --- a/src/allocations/X_ALLOC_parallel.F +++ b/src/allocations/X_ALLOC_parallel.F @@ -116,8 +116,8 @@ subroutine MPA_ALLOC_parallel(MPA_E_par,MPA_R_par,NG,NW,mode) ! ! Initialization ! - call MATRIX_init( "MPA_E" , MPA_E_par , NG, NW ) - call MATRIX_init( "MPA_R" , MPA_R_par , NG, NW ) + call MATRIX_init( "MPA" , MPA_E_par , NG, NW ) + call MATRIX_init( "MPA" , MPA_R_par , NG, NW ) !endif ! MPA_rows = MPA_E_par%rows diff --git a/src/matrices/MATRIX_init.F b/src/matrices/MATRIX_init.F index e0ecea6479..2a19dca94d 100644 --- a/src/matrices/MATRIX_init.F +++ b/src/matrices/MATRIX_init.F @@ -39,7 +39,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") then + else if (what=="XUP".or.what=="XDN".or.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 @@ -95,7 +95,7 @@ subroutine MATRIX_init( what, M_par, N, Nb) ! ! Entire Matrix ! - if (what=="X".or.what=="PAR") then + if (what=="X".or.what=="PAR".or.what=="MPA") then ! M_par%I = 1 M_par%Nb = Nb From 7da97b92454d0febcbf363941f50bf452ec16109 Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Sun, 19 Nov 2023 20:23:53 +0100 Subject: [PATCH 088/110] allocate MPA_E_par(1) and MPA_R_par(1) --- src/allocations/X_ALLOC_parallel.F | 4 ++-- src/qp/QP_mpa.F | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/allocations/X_ALLOC_parallel.F b/src/allocations/X_ALLOC_parallel.F index 28b2880170..4dddd1a276 100644 --- a/src/allocations/X_ALLOC_parallel.F +++ b/src/allocations/X_ALLOC_parallel.F @@ -105,8 +105,8 @@ subroutine MPA_ALLOC_parallel(MPA_E_par,MPA_R_par,NG,NW,mode) ! ! Reset... ! - !call MATRIX_reset(MPA_E_par) - !call MATRIX_reset(MPA_R_par) + call MATRIX_reset(MPA_E_par) + call MATRIX_reset(MPA_R_par) ! ! Type of allocation.... ! diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index 9dc698eca7..89cfa7a473 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -230,6 +230,12 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) ! !Instead of MPA_alloc, we try MPA_ALLOC_parallel !call MPA_alloc((/X%ng,X%ng,X%mpa_npoles,2*X%mpa_npoles/)) + if (.not.allocated(MPA_E_par).and.io_RESPONSE) then + allocate(MPA_E_par(1)) + endif + if (.not.allocated(MPA_R_par).and.io_RESPONSE) then + allocate(MPA_R_par(1)) + endif if (io_RESPONSE) call MPA_ALLOC_parallel(MPA_E_par(1),MPA_R_par(1),X%ng,2*X%mpa_npoles,"MPA") ! todo: update mat=>par for MPA case. ! From 02034c7310e8dcf13fc89d0402f66e1cd661bfcd Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Sun, 19 Nov 2023 20:34:01 +0100 Subject: [PATCH 089/110] mimicking YAMBO_ALLOC_SOURCE in QP_ppa for (MPA_E_par(iq_mem)%blc_d) --- src/qp/QP_mpa.F | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index 89cfa7a473..4a6aecdb6e 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -418,8 +418,10 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) ! !MB: if (have_cuda) then - call dev_memcpy(MPA_E_par_d,MPA_E_par(iq_mem)%blc) - call dev_memcpy(MPA_R_par_d,MPA_R_par(iq_mem)%blc) + !call dev_memcpy(MPA_E_par_d,MPA_E_par(iq_mem)%blc) + !call dev_memcpy(MPA_R_par_d,MPA_R_par(iq_mem)%blc) + YAMBO_ALLOC_SOURCE(MPA_E_par(iq_mem)%blc_d,MPA_E_par(iq_mem)%blc) + YAMBO_ALLOC_SOURCE(MPA_R_par(iq_mem)%blc_d,MPA_R_par(iq_mem)%blc) endif ! MPA_E_par_p=>DEV_VAR(MPA_E_par(iq_mem)%blc) From c96c66d5293036daa0ce64eb4aaf03b3e060cc2b Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Sun, 19 Nov 2023 20:48:18 +0100 Subject: [PATCH 090/110] trying to use only MPA_E_par(1), no iq_mem. if not working, be sure about the loading of the MPA matrices. --- src/qp/QP_mpa.F | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index 4a6aecdb6e..6be5962178 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -337,7 +337,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) !& Xw%mpa_solver,MPred,PPcond_rate,MP_err,cond_num) !MB: in the following we introduce the MPA_E/R_par. should be same as X_par(iq_mem)%blc(ig1,ig2,X_range2), ! where X_range2 -> : ... not sure if I have to introduce the iq_mem. - call mpa_RE_solver(X%mpa_npoles,MPA_freqs,MPA_Xo,MPA_R_par(iq_mem)%blc(ig1,ig2,:),MPA_E_par(iq_mem)%blc(ig1,ig2,:),& + call mpa_RE_solver(X%mpa_npoles,MPA_freqs,MPA_Xo,MPA_R_par(1)%blc(ig1,ig2,:),MPA_E_par(1)%blc(ig1,ig2,:),& & Xw%mpa_solver,MPred,PPcond_rate,MP_err,cond_num) if(MPred) MPred_rate=MPred_rate+1._SP PPcond_Qrate=PPcond_Qrate+PPcond_rate @@ -401,8 +401,8 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) ! Note (AF) that $omp directives are inside mat_transpose ! do i_np=1,X%mpa_npoles - call mat_transpose(MPA_E_par(iq_mem)%blc(:,:,i_np)) - call mat_transpose(MPA_R_par(iq_mem)%blc(:,:,i_np)) + call mat_transpose(MPA_E_par(1)%blc(:,:,i_np)) + call mat_transpose(MPA_R_par(1)%blc(:,:,i_np)) enddo ! X_is_TR_rotated=.true. @@ -418,14 +418,14 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) ! !MB: if (have_cuda) then - !call dev_memcpy(MPA_E_par_d,MPA_E_par(iq_mem)%blc) - !call dev_memcpy(MPA_R_par_d,MPA_R_par(iq_mem)%blc) - YAMBO_ALLOC_SOURCE(MPA_E_par(iq_mem)%blc_d,MPA_E_par(iq_mem)%blc) - YAMBO_ALLOC_SOURCE(MPA_R_par(iq_mem)%blc_d,MPA_R_par(iq_mem)%blc) + !call dev_memcpy(MPA_E_par_d,MPA_E_par(1)%blc) + !call dev_memcpy(MPA_R_par_d,MPA_R_par(1)%blc) + YAMBO_ALLOC_SOURCE(MPA_E_par(1)%blc_d,MPA_E_par(1)%blc) + YAMBO_ALLOC_SOURCE(MPA_R_par(1)%blc_d,MPA_R_par(1)%blc) endif ! - MPA_E_par_p=>DEV_VAR(MPA_E_par(iq_mem)%blc) - MPA_R_par_p=>DEV_VAR(MPA_E_par(iq_mem)%blc) + MPA_E_par_p=>DEV_VAR(MPA_E_par(1)%blc) + MPA_R_par_p=>DEV_VAR(MPA_E_par(1)%blc) ! call timing('GW(mpa)_qp_loop',OPR='start') ! From 44263ce16130a99926a992a8650d7112e71dcced Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Sun, 19 Nov 2023 22:09:01 +0100 Subject: [PATCH 091/110] trying to add parIO in io_MPA.F --- src/io/io_MPA.F | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/io/io_MPA.F b/src/io/io_MPA.F index ad11d40065..69b2ede7db 100644 --- a/src/io/io_MPA.F +++ b/src/io/io_MPA.F @@ -137,15 +137,25 @@ integer function io_MPA(X,Xw,ID) ! !MB: here I let shape(MPA_E_mat), not sure about that, hope it works. !MB: also, let's check the shapes also wrt #poles and Xfreqs. - call def_variable_bulk(ID_frag,trim(ch),1,(/2,shape(MPA_E_mat)/),SP,par_io_kind='independent') - call io_variable_bulk(ID_frag,1,C3=MPA_E_mat,IPOS=(/1,1,1,1/)) +#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') + 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 + call def_variable_bulk(ID_frag,trim(ch),1,(/2,shape(MPA_E_mat)/),SP,par_io_kind='independent') + call io_variable_bulk(ID_frag,1,C3=MPA_E_mat,IPOS=(/1,1,1,1/)) +#endif ! ! residues @iq ! ch="MPA_R_Q_"//trim(intc(iq)) ! - call def_variable_bulk(ID_frag,trim(ch),1,(/2,shape(MPA_R_mat)/),SP,par_io_kind='independent') - call io_variable_bulk(ID_frag,1,C3=MPA_R_mat,IPOS=(/1,1,1,1/)) +#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') + call io_variable_bulk(ID_frag,1,C3=MPA_R_par(1)%blc(:,:,:Xw%n_freqs),IPOS=(/1,MPA_E_par(1)%rows(1),MPA_E_par(1)%cols(1),1/)) +#else + call def_variable_bulk(ID_frag,trim(ch),1,(/2,shape(MPA_R_mat)/),SP,par_io_kind='independent') + call io_variable_bulk(ID_frag,1,C3=MPA_R_mat,IPOS=(/1,1,1,1/)) +#endif ! if (read_is_on(ID) .and. different_db_RL_order) then call error('[io_MPA] different_db_RL_order not implemented') From a3c369d786c4f5b89f0244f3ffeeb73ac1550a84 Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Sun, 19 Nov 2023 22:54:58 +0100 Subject: [PATCH 092/110] adding the same io logic in MPA as X. no reading of MPA_mat, however. --- src/io/io_MPA.F | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/io/io_MPA.F b/src/io/io_MPA.F index 69b2ede7db..9e717ca073 100644 --- a/src/io/io_MPA.F +++ b/src/io/io_MPA.F @@ -137,6 +137,8 @@ integer function io_MPA(X,Xw,ID) ! !MB: here I let shape(MPA_E_mat), not sure about that, hope it works. !MB: also, let's check the shapes also wrt #poles and Xfreqs. + ! for now, no support for reading MPA_mat. + 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') 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/)) @@ -144,18 +146,29 @@ integer function io_MPA(X,Xw,ID) call def_variable_bulk(ID_frag,trim(ch),1,(/2,shape(MPA_E_mat)/),SP,par_io_kind='independent') call io_variable_bulk(ID_frag,1,C3=MPA_E_mat,IPOS=(/1,1,1,1/)) #endif + ! + 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 ! ! 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') - call io_variable_bulk(ID_frag,1,C3=MPA_R_par(1)%blc(:,:,:Xw%n_freqs),IPOS=(/1,MPA_E_par(1)%rows(1),MPA_E_par(1)%cols(1),1/)) + call def_variable_bulk(ID_frag,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP,par_io_kind='collective') + 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 - call def_variable_bulk(ID_frag,trim(ch),1,(/2,shape(MPA_R_mat)/),SP,par_io_kind='independent') - call io_variable_bulk(ID_frag,1,C3=MPA_R_mat,IPOS=(/1,1,1,1/)) + call def_variable_bulk(ID_frag,trim(ch),1,(/2,shape(MPA_E_mat)/),SP,par_io_kind='independent') + call io_variable_bulk(ID_frag,1,C3=MPA_R_mat,IPOS=(/1,1,1,1/)) #endif + ! + 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 ! if (read_is_on(ID) .and. different_db_RL_order) then call error('[io_MPA] different_db_RL_order not implemented') From 7376804c3947e243cc4e552875a01003058eb97a Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Sun, 26 Nov 2023 11:57:36 +0100 Subject: [PATCH 093/110] -hardcoding iq_mem=1 in QP_mpa, otherwise X_par(iq_mem>1) will fail to find the address. TOBE understood and properly set, but for now we will take as it is. -small cleaning of a wrtie in X_dielectric_matrix --- src/pol_function/X_dielectric_matrix.F | 3 --- src/qp/QP_mpa.F | 8 ++++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/pol_function/X_dielectric_matrix.F b/src/pol_function/X_dielectric_matrix.F index 88509943bf..9a43ffba37 100644 --- a/src/pol_function/X_dielectric_matrix.F +++ b/src/pol_function/X_dielectric_matrix.F @@ -335,9 +335,6 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) #endif endif ! -! XXX -write(*,*) "upto before io_RESPONSE" -! XXX ! DS MERGE > ! ! X_par => X_mat diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index 6be5962178..327948e683 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -237,7 +237,6 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) allocate(MPA_R_par(1)) endif if (io_RESPONSE) call MPA_ALLOC_parallel(MPA_E_par(1),MPA_R_par(1),X%ng,2*X%mpa_npoles,"MPA") - ! todo: update mat=>par for MPA case. ! ! ! AF: the following line needs to be moved elsewhere @@ -281,6 +280,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) if (iqibz/=isc%iqref) then ! iq_mem=PAR_Q_ibz_index(iqibz) + iq_mem = 1 X_range=(/1,Xw%n_freqs/) if (.not.io_RESPONSE) X_range=(/Xw%n_freqs*(iq_mem-1)+1,iq_mem*Xw%n_freqs/) ! @@ -337,7 +337,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) !& Xw%mpa_solver,MPred,PPcond_rate,MP_err,cond_num) !MB: in the following we introduce the MPA_E/R_par. should be same as X_par(iq_mem)%blc(ig1,ig2,X_range2), ! where X_range2 -> : ... not sure if I have to introduce the iq_mem. - call mpa_RE_solver(X%mpa_npoles,MPA_freqs,MPA_Xo,MPA_R_par(1)%blc(ig1,ig2,:),MPA_E_par(1)%blc(ig1,ig2,:),& + call mpa_RE_solver(X%mpa_npoles,MPA_freqs,MPA_Xo,MPA_R_par(iq_mem)%blc(ig1,ig2,:),MPA_E_par(iq_mem)%blc(ig1,ig2,:),& & Xw%mpa_solver,MPred,PPcond_rate,MP_err,cond_num) if(MPred) MPred_rate=MPred_rate+1._SP PPcond_Qrate=PPcond_Qrate+PPcond_rate @@ -347,7 +347,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) enddo enddo !$omp end do - ! + ! YAMBO_FREE(MPA_Xo) ! !$omp end parallel @@ -425,7 +425,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) endif ! MPA_E_par_p=>DEV_VAR(MPA_E_par(1)%blc) - MPA_R_par_p=>DEV_VAR(MPA_E_par(1)%blc) + MPA_R_par_p=>DEV_VAR(MPA_R_par(1)%blc) ! call timing('GW(mpa)_qp_loop',OPR='start') ! From 8fed07b699a73c541a247f281e64033d80d90f4f Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Tue, 3 Sep 2024 14:28:54 +0200 Subject: [PATCH 094/110] compilation fixed --- src/io/io_MPA.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io/io_MPA.F b/src/io/io_MPA.F index 0a9524decf..2a47078105 100644 --- a/src/io/io_MPA.F +++ b/src/io/io_MPA.F @@ -12,7 +12,7 @@ integer function io_MPA(X,Xw,ID) use frequency, ONLY:w_samp use IO_int, ONLY:io_connect,io_disconnect,io_elemental,io_header,io_fragment,& & def_variable_bulk,io_variable_bulk,def_variable_elemental,io_variable_elemental - use IO_m, ONLY:io_sec,io_com,io_status,read_is_on,& + use IO_m, ONLY:io_sec,io_com,io_status,read_is_on,write_is_on,& & io_MULTIPOLE,IO_NOT_ALLOWED,io_extension,& & frag_MULTIPOLE,IO_NO_DATABASE,io_mode,DUMP,frag_RESPONSE use stderr, ONLY:intc From 2fa4adb2ec6a82ed671ac919a11917ad754a154f Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Tue, 3 Sep 2024 14:32:20 +0200 Subject: [PATCH 095/110] Ydriver-src removed --- 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 4a4da3883ddfbd36644479deca58fdcfb1eb99d2 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Mon, 7 Oct 2024 21:55:27 +0200 Subject: [PATCH 096/110] bug fix for RIM-W, no GPU --- src/qp/QP_ppa_cohsex.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index f60427e28f..9880d22ec6 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -674,7 +674,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) if (RIM_W_is_diagonal.and.l_RIM_W_g) l_RIM_W_g=(ig1==ig2) ! if (l_RIM_W_g) then - PPA_R=-cmplx(real(RIM_W_d(1,iqibz,ig1,ig2))/2._SP, & + PPA_R=-cmplx(real(DEV_VAR(RIM_W)(1,iqibz,ig1,ig2))/2._SP, & & aimag(X_blc_p(ig1,ig2,X_range1))*real(isc_gamp_p(ig1,ig2)),kind=SP)/2._SP*PPA_E else PPA_R=-X_blc_p(ig1,ig2,X_range1)/2._SP*PPA_E*isc_gamp_p(ig1,ig2) From 76e67cf64421729dbdc7719df4ca09a3b1708d75 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Tue, 8 Oct 2024 10:51:11 +0200 Subject: [PATCH 097/110] protecting the SC parallelism against "g" role in SE (not fully implemented). --- src/parallel/PARALLEL_global_Self_Energy.F | 32 ++++++++++++++++------ src/parallel/PARALLEL_global_defaults.F | 4 ++- src/qp/QP_ppa_cohsex.F | 27 +++++++++--------- 3 files changed, 40 insertions(+), 23 deletions(-) diff --git a/src/parallel/PARALLEL_global_Self_Energy.F b/src/parallel/PARALLEL_global_Self_Energy.F index 59f5a56a3b..ad73932c59 100644 --- a/src/parallel/PARALLEL_global_Self_Energy.F +++ b/src/parallel/PARALLEL_global_Self_Energy.F @@ -9,7 +9,7 @@ subroutine PARALLEL_global_Self_Energy(E,Xk,q) ! use electrons, ONLY:levels use R_lattice, ONLY:bz_samp,nqbz,nXkibz,nXkbz - use drivers, ONLY:l_eval_collisions,l_sc_electric + use drivers, ONLY:l_eval_collisions,l_sc_electric,l_sc_run,l_real_time use parallel_int, ONLY:PARALLEL_index,PARALLEL_assign_chains_and_COMMs,& & PARALLEL_live_message,PARALLEL_MATRIX_distribute use IO_m, ONLY:io_COLLs @@ -64,15 +64,29 @@ subroutine PARALLEL_global_Self_Energy(E,Xk,q) integer :: i_k,nb_mat #endif ! - CALL PARALLEL_structure(4,(/"q ","g ","qp","b "/)) + ! AF: here we disable the RL parallelism (g) for SC and RT, where + ! the parallel structure needs to be adapted to the SE g parallelism ! - call PARALLEL_assign_chains_and_COMMs(4,COMM_index_1=PAR_COM_Q_INDEX,& -& COMM_index_2=PAR_COM_RL_INDEX,& -& COMM_index_3=PAR_COM_QP_INDEX,& -& COMM_index_4=PAR_COM_G_b_INDEX,& -& COMM_A2A_1=PAR_COM_Q_A2A,& -& COMM_A2A_2=PAR_COM_RL_A2A,& -& COMM_A2A_3=PAR_COM_QP_A2A) + if (l_sc_run.or.l_real_time) then + ! + call PARALLEL_structure(3,(/"q ","qp","b "/)) + call PARALLEL_assign_chains_and_COMMs(3,COMM_index_1=PAR_COM_Q_INDEX,& +& COMM_index_2=PAR_COM_QP_INDEX,& +& COMM_index_3=PAR_COM_G_b_INDEX,& +& COMM_A2A_1=PAR_COM_Q_A2A,& +& COMM_A2A_2=PAR_COM_QP_A2A) + ! + else + ! + call PARALLEL_structure(4,(/"q ","g ","qp","b "/)) + call PARALLEL_assign_chains_and_COMMs(4,COMM_index_1=PAR_COM_Q_INDEX,& +& COMM_index_2=PAR_COM_RL_INDEX,& +& COMM_index_3=PAR_COM_QP_INDEX,& +& COMM_index_4=PAR_COM_G_b_INDEX,& +& COMM_A2A_1=PAR_COM_Q_A2A,& +& COMM_A2A_2=PAR_COM_RL_A2A,& +& COMM_A2A_3=PAR_COM_QP_A2A) + endif ! ! COMMs setup ! diff --git a/src/parallel/PARALLEL_global_defaults.F b/src/parallel/PARALLEL_global_defaults.F index bbfddb525e..ef80c2b84b 100644 --- a/src/parallel/PARALLEL_global_defaults.F +++ b/src/parallel/PARALLEL_global_defaults.F @@ -7,6 +7,7 @@ ! subroutine PARALLEL_global_defaults(ENVIRONMENT) ! + use drivers, ONLY:l_sc_run use parallel_m, ONLY:PARALLEL_n_structures_active,PARALLEL_CPU_used, & & ncpu,CPU_structure,i_PAR_structure,PARALLEL_ENV_uses_default,PARALLEL_CPU_role use parallel_int, ONLY:PARALLEL_live_message @@ -79,7 +80,8 @@ subroutine PARALLEL_global_defaults(ENVIRONMENT) CPU_structure(i_PAR_structure)%ROLE(2)="d" CPU_structure(i_PAR_structure)%CPU(2)=1 case("Self_Energy") - call GIMME_a_parallel_proposal(4,(/" b","qp"," g"," q"/)) + if ( l_sc_run) call GIMME_a_parallel_proposal(3,(/" b","qp"," q"/)) + if (.not.l_sc_run) call GIMME_a_parallel_proposal(4,(/" b","qp"," g"," q"/)) case("Response_T_space") call GIMME_a_parallel_proposal(2,(/"eh"," k"/)) case("BZ_Indexes") diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 9880d22ec6..c930221d21 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -34,8 +34,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) & PARALLEL_WF_distribute use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_IND_G_b,PAR_IND_QP,& & 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,& -& PAR_COM_SE_WORLD,PAR_COM_SE_WORLD_RL_resolved +& PAR_Q_ibz_index,n_WF_bands_to_load,HEAD_QP_cpu use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc use functions, ONLY:bose_f use IO_int, ONLY:io_control @@ -53,7 +52,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) use interfaces, ONLY:QP_state_print,WF_load,WF_free,MATRIX_transpose,MATRIX_duplicate use matrix, ONLY:PAR_matrix,MATRIX_reset use timing_m, ONLY:timing - use parallel_m, ONLY:PAR_COM_RL_A2A,PAR_COM_G_b_INDEX + use parallel_m, ONLY:PAR_COM_RL_A2A,PAR_COM_QP_A2A,PAR_COM_G_b_INDEX #if defined _SC use SC, ONLY:it_now,it_to_start #endif @@ -583,17 +582,19 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! AF,MB: After the inclusion of G-parallelism, the communicator to use ! here (both SC and ordinary runs) has become PAR_COM_G_b_INDEX ! -!#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 + ! AF: for the time being, the SC case is treated as if g-parallelism is + ! disabled ! - if (PAR_COM_G_b_INDEX%CPU_id==0) QP_Sc(i_qp,:)=QP_Sc(i_qp,:)+dc(1) +#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 ! dc=cZERO ! From 5fda426b9f102a9f7c141e4d34695a912ab3172e Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Tue, 8 Oct 2024 12:45:16 +0200 Subject: [PATCH 098/110] CUDAF compilation fixed --- src/qp/QP_ppa_cohsex.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index c930221d21..8c07b43802 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -721,7 +721,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) call M_by_V('N',X_nrows,X_ncols, cONE, X_blc_p(:,:,X_range1),X_nrows,& & conjg_iscp_rhotw(X_cols1:X_cols2),1,cZERO,local_rhotw(X_rows1:X_rows2),1) ! - pre_factor=V_dot_V(X_nrows,isc_rhotw_p(X_rows1:X_rows2),local_rhotw(X_rows1:X_rows2)) + pre_factor=V_dot_V(X_nrows,DEV_VAR(isc%rhotw)(X_rows1:X_rows2),local_rhotw(X_rows1:X_rows2)) ! ! SEX From 34f555c52c27ce198fa4b521e80b5eb617d01c8e Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Wed, 9 Oct 2024 14:55:12 +0200 Subject: [PATCH 099/110] cleanup and bug fixed in MPA when running with g-parallelism --- src/allocations/.objects | 2 +- src/allocations/MPA_ALLOC_parallel.F | 146 ++++++++++++--------------- src/allocations/X_ALLOC_parallel.F | 66 +----------- src/qp/QP_mpa.F | 86 +++++++--------- src/qp/QP_ppa_cohsex.F | 2 +- 5 files changed, 105 insertions(+), 197 deletions(-) diff --git a/src/allocations/.objects b/src/allocations/.objects index 98a2cb5c91..ed13be635a 100644 --- a/src/allocations/.objects +++ b/src/allocations/.objects @@ -1,4 +1,4 @@ #if defined _ELPH ELPH_objs = ELPH_alloc.o #endif -objs = $(ELPH_objs) X_ALLOC_parallel.o X_ALLOC_global.o X_ALLOC_elemental.o +objs = $(ELPH_objs) X_ALLOC_parallel.o X_ALLOC_global.o X_ALLOC_elemental.o MPA_ALLOC_parallel.o diff --git a/src/allocations/MPA_ALLOC_parallel.F b/src/allocations/MPA_ALLOC_parallel.F index 4b6d7d4603..19c70294a4 100644 --- a/src/allocations/MPA_ALLOC_parallel.F +++ b/src/allocations/MPA_ALLOC_parallel.F @@ -1,88 +1,70 @@ ! ! License-Identifier: GPL ! -! Copyright (C) 2023 The Yambo Team +! Copyright (C) 2017 The Yambo Team ! -! Authors (see AUTHORS file for details): MB +! Authors (see AUTHORS file for details): MB, AF ! -subroutine MPA_ALLOC_parallel(MPA_par,NG,NW,mode) - ! - use pars, ONLY:cZERO - use parallel_m, ONLY:COMM_copy,PAR_COM_RL_INDEX,PAR_COM_RL_A2A - use matrix, ONLY:MATRIX_reset,PAR_matrix - use X_m, ONLY:X_par_lower_triangle,X_rows,X_cols,& -& X_FILL_UP_matrix_only,X_lower_triangle_matrix_in_use - use parallel_int, ONLY:PARALLEL_live_message - use cuda_m, ONLY:have_cuda - ! -#include - ! - type(PAR_matrix) :: MPA_E_par, MPA_R_par - integer :: NG,NW - character(*) :: mode - ! - ! Work Space - ! - !logical :: l_XUP,l_PAR,l_CPU_ONLY - ! - ! Reset... - ! - call MATRIX_reset(MPA_E_par) - call MATRIX_reset(MPA_R_par) - ! - ! Type of allocation.... - ! - !l_XUP = index(mode,"XUP")>0 - !l_PAR = index(mode,"X")>0.and.index(mode,"XUP")==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( "MPA_E" , MPA_E_par , NG, NW ) - call MATRIX_init( "MPA_R" , MPA_R_par , NG, NW ) - !endif - ! - MPA_rows = MPA_E_par%rows - MPA_cols = MPA_E_par%cols - ! -! if (l_XUP.and..not.X_FILL_UP_matrix_only.and.X_par%INTER_comm%n_CPU>1) then -! ! -! call MATRIX_reset(X_par_lower_triangle) -! X_lower_triangle_matrix_in_use=.TRUE. -! X_par_lower_triangle%kind ="XDN" -! X_par_lower_triangle%rows =X_par%cols -! X_par_lower_triangle%cols =X_par%rows -! X_par_lower_triangle%nrows=X_par%ncols -! X_par_lower_triangle%ncols=X_par%nrows -! ! -! YAMBO_ALLOC(X_par_lower_triangle%blc,(X_par%cols(1):X_par%cols(2),X_par%rows(1):X_par%rows(2),NW)) -! X_par_lower_triangle%blc=cZERO -! if (have_cuda.and..not.l_CPU_ONLY) then -! YAMBO_ALLOC(X_par_lower_triangle%blc_d,(X_par%cols(1):X_par%cols(2),X_par%rows(1):X_par%rows(2),NW)) -! X_par_lower_triangle%blc_d=cZERO -! endif -! ! -! call COMM_copy(PAR_COM_RL_A2A, X_par_lower_triangle%INTRA_comm) -! call COMM_copy(PAR_COM_RL_INDEX, X_par_lower_triangle%INTER_comm) -! endif - ! - YAMBO_ALLOC(MPA_E_par%blc,(MPA_E_par%rows(1):MPA_E_par%rows(2),MPA_E_par%cols(1):MPA_E_par%cols(2),NW)) - MPA_E_par%blc=cZERO - if (have_cuda.and..not.l_CPU_ONLY) then - YAMBO_ALLOC(MPA_E_par%blc_d,(MPA_E_par%rows(1):MPA_E_par%rows(2),MPA_E_par%cols(1):MPA_E_par%cols(2),NW)) - MPA_E_par%blc_d=cZERO - endif +subroutine MPA_ALLOC_parallel(MPA_E_par,MPA_R_par,NG,NW,mode) + ! + use pars, ONLY:SP,DP,cZERO,cONE,cI + use functions, ONLY:NAN + use parallel_m, ONLY:COMM_copy,PAR_COM_RL_INDEX,PAR_COM_RL_A2A + use matrix, ONLY:MATRIX_reset,PAR_matrix + use X_m, ONLY:X_par_lower_triangle,X_rows,X_cols,& +& X_FILL_UP_matrix_only,X_lower_triangle_matrix_in_use + use parallel_int, ONLY:PARALLEL_live_message + use cuda_m, ONLY:have_cuda + ! +#include + ! + type(PAR_matrix) :: MPA_E_par,MPA_R_par + integer :: NG,NW + character(*) :: mode + ! + ! Work Space + ! + integer :: MPA_rows(2),MPA_cols(2) + logical :: l_CPU_ONLY + ! + ! Reset... + ! + call MATRIX_reset(MPA_E_par) + call MATRIX_reset(MPA_R_par) + ! + ! Type of allocation.... + ! + !l_XUP = index(mode,"XUP")>0 + !l_PAR = index(mode,"X")>0.and.index(mode,"XUP")==0 + l_CPU_ONLY = index(mode,"CPU_ONLY")>0 + ! + ! Initialization + ! + call MATRIX_init( "MPA", MPA_E_par, NG, NW ) + call MATRIX_init( "MPA", MPA_R_par, NG, NW ) + !endif + ! + MPA_rows = MPA_E_par%rows + MPA_cols = MPA_E_par%cols + ! + YAMBO_ALLOC(MPA_E_par%blc,(MPA_rows(1):MPA_rows(2),MPA_cols(1):MPA_cols(2),NW)) + MPA_E_par%blc=cZERO + ! + if (have_cuda.and..not.l_CPU_ONLY) then + YAMBO_ALLOC(MPA_E_par%blc_d,(MPA_rows(1):MPA_rows(2),MPA_cols(1):MPA_cols(2),NW)) + MPA_E_par%blc_d=cZERO + endif + ! + YAMBO_ALLOC(MPA_R_par%blc,(MPA_rows(1):MPA_rows(2),MPA_cols(1):MPA_cols(2),NW)) + MPA_R_par%blc=cZERO + ! + if (have_cuda.and..not.l_CPU_ONLY) then + YAMBO_ALLOC(MPA_R_par%blc_d,(MPA_rows(1):MPA_rows(2),MPA_cols(1):MPA_cols(2),NW)) + MPA_R_par%blc_d=cZERO + endif + ! + call PARALLEL_live_message("RL vectors(X)",LOADED=MPA_E_par%ncols*MPA_E_par%nrows,& +& TOTAL=NG**2,NCPU=MPA_E_par%INTER_comm%n_CPU) + ! + end subroutine - YAMBO_ALLOC(MPA_R_par%blc,(MPA_R_par%rows(1):MPA_R_par%rows(2),MPA_R_par%cols(1):MPA_R_par%cols(2),NW)) - MPA_R_par%blc=cZERO - if (have_cuda.and..not.l_CPU_ONLY) then - YAMBO_ALLOC(MPA_R_par%blc_d,(MPA_R_par%rows(1):MPA_R_par%rows(2),MPA_R_par%cols(1):MPA_R_par%cols(2),NW)) - MPA_R_par%blc_d=cZERO - endif - ! - call PARALLEL_live_message("RL vectors(X)",LOADED=MPA_E_par%ncols*MPA_E_par%nrows,TOTAL=NG**2,NCPU=MPA_E_par%INTER_comm%n_CPU) - ! -end subroutine diff --git a/src/allocations/X_ALLOC_parallel.F b/src/allocations/X_ALLOC_parallel.F index 4dddd1a276..eee1944a60 100644 --- a/src/allocations/X_ALLOC_parallel.F +++ b/src/allocations/X_ALLOC_parallel.F @@ -38,9 +38,9 @@ subroutine X_ALLOC_parallel(X_par,NG,NW,mode) ! Initialization ! if (l_XUP) then - call MATRIX_init( "XUP", X_par , NG, NW ) + call MATRIX_init( "XUP", X_par, NG, NW ) else if (l_PAR) then - call MATRIX_init( "X" , X_par , NG, NW ) + call MATRIX_init( "X" , X_par, NG, NW ) endif ! X_rows = X_par%rows @@ -78,65 +78,3 @@ subroutine X_ALLOC_parallel(X_par,NG,NW,mode) ! end subroutine -! MB - ! -subroutine MPA_ALLOC_parallel(MPA_E_par,MPA_R_par,NG,NW,mode) - ! - use pars, ONLY:SP,DP,cZERO,cONE,cI - use functions, ONLY:NAN - use parallel_m, ONLY:COMM_copy,PAR_COM_RL_INDEX,PAR_COM_RL_A2A - use matrix, ONLY:MATRIX_reset,PAR_matrix - use X_m, ONLY:X_par_lower_triangle,X_rows,X_cols,& -& X_FILL_UP_matrix_only,X_lower_triangle_matrix_in_use - use parallel_int, ONLY:PARALLEL_live_message - use cuda_m, ONLY:have_cuda - ! -#include - ! - type(PAR_matrix) :: MPA_E_par, MPA_R_par - integer :: NG,NW - integer :: MPA_rows(2) = 0 - integer :: MPA_cols(2) = 0 - character(*) :: mode - ! - ! Work Space - ! - logical :: l_CPU_ONLY - ! - ! Reset... - ! - call MATRIX_reset(MPA_E_par) - call MATRIX_reset(MPA_R_par) - ! - ! Type of allocation.... - ! - !l_XUP = index(mode,"XUP")>0 - !l_PAR = index(mode,"X")>0.and.index(mode,"XUP")==0 - !l_CPU_ONLY = index(mode,"CPU_ONLY")>0 - ! - ! Initialization - ! - call MATRIX_init( "MPA" , MPA_E_par , NG, NW ) - call MATRIX_init( "MPA" , MPA_R_par , NG, NW ) - !endif - ! - MPA_rows = MPA_E_par%rows - MPA_cols = MPA_E_par%cols - ! - YAMBO_ALLOC(MPA_E_par%blc,(MPA_E_par%rows(1):MPA_E_par%rows(2),MPA_E_par%cols(1):MPA_E_par%cols(2),NW)) - MPA_E_par%blc=cZERO - if (have_cuda.and..not.l_CPU_ONLY) then - YAMBO_ALLOC(MPA_E_par%blc_d,(MPA_E_par%rows(1):MPA_E_par%rows(2),MPA_E_par%cols(1):MPA_E_par%cols(2),NW)) - MPA_E_par%blc_d=cZERO - endif - - YAMBO_ALLOC(MPA_R_par%blc,(MPA_R_par%rows(1):MPA_R_par%rows(2),MPA_R_par%cols(1):MPA_R_par%cols(2),NW)) - MPA_R_par%blc=cZERO - if (have_cuda.and..not.l_CPU_ONLY) then - YAMBO_ALLOC(MPA_R_par%blc_d,(MPA_R_par%rows(1):MPA_R_par%rows(2),MPA_R_par%cols(1):MPA_R_par%cols(2),NW)) - MPA_R_par%blc_d=cZERO - endif - ! - call PARALLEL_live_message("RL vectors(X)",LOADED=MPA_E_par%ncols*MPA_E_par%nrows,TOTAL=NG**2,NCPU=MPA_E_par%INTER_comm%n_CPU) - ! - end subroutine \ No newline at end of file diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index 47a6e81c1b..ff4070de98 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -22,7 +22,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) use parser_m, ONLY:parser use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_IND_G_b,PAR_IND_QP,PAR_COM_Q_A2A,& & PAR_IND_Q_ibz,PAR_IND_Q_ibz_ID,PAR_IND_QP_ID,& -& PAR_Q_ibz_index,n_WF_bands_to_load +& PAR_Q_ibz_index,n_WF_bands_to_load,myid use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc use IO_int, ONLY:io_control,IO_and_Messaging_switch use IO_m, ONLY:manage_action,OP_RD_CL,OP_WR_CL,OP_APP_CL,REP,VERIFY,NONE,RD_CL,OP_RD,RD_CL_IF_END,& @@ -33,11 +33,9 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) use wave_func, ONLY:WF use R_lattice, ONLY:qindx_S,bz_samp,RIM_W_ng,RIM_W use D_lattice, ONLY:nsym,i_time_rev,i_space_inv,mag_syms - use interfaces, ONLY:QP_state_print,WF_load,WF_free - use matrix_operate,ONLY:mat_transpose + use interfaces, ONLY:QP_state_print,WF_load,WF_free,MATRIX_transpose use timing_m, ONLY:timing - use mpa_m, ONLY:mpa_RE_solver,err_func_X,MPA_E_mat,MPA_R_mat,MPA_freqs,& -& MPA_alloc,MPA_free,MPA_E_mat_d,MPA_R_mat_d, MPA_E_par,MPA_R_par,& + use mpa_m, ONLY:mpa_RE_solver,err_func_X,MPA_freqs,MPA_alloc,MPA_free,MPA_E_par,MPA_R_par,& & MPA_E_par_d,MPA_R_par_d use drivers, ONLY:Finite_Tel use D_lattice, ONLY:Bose_Temp @@ -75,22 +73,22 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) complex(SP), pointer DEV_ATTR :: isc_rhotw_p(:) complex(SP), pointer DEV_ATTR :: iscp_rhotw_p(:) complex(SP), pointer DEV_ATTR :: isc_gamp_p(:,:) + ! complex(SP), pointer DEV_ATTR :: MPA_R_mat_p(:,:,:) complex(SP), pointer DEV_ATTR :: MPA_E_mat_p(:,:,:) - ! - !MB: complex(SP), pointer DEV_ATTR :: MPA_R_par_p(:,:,:) complex(SP), pointer DEV_ATTR :: MPA_E_par_p(:,:,:) ! ! MPA variables ! - integer :: i_np,ID2 - logical :: MPred,l_CPU_ONLY - real(SP) :: bose_PPA_E,MPred_rate,PPcond_rate,PPcond_Qrate,MP_err,MP_Qerr,cond_num(2),cond_numQ(2) + integer :: i_np,ID2 + logical :: MPred,l_CPU_ONLY + real(SP) :: bose_PPA_E,MPred_rate,PPcond_rate,PPcond_Qrate,& +& MP_err,MP_Qerr,cond_num(2),cond_numQ(2) complex(SP), allocatable :: MPA_Xo(:) - character(len=99):: str + character(len=99) :: str ! - integer, external::io_X,io_MPA + integer, external ::io_X,io_MPA ! ! Reset & checks @@ -202,7 +200,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) ! 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.and.io_RESPONSE) call error('Incomplete and/or broken MPA/Static diel. fun. database') + if (io_err<0.and.io_RESPONSE) call error('[MPA] Incomplete and/or broken MPA/Static diel. fun. database') ! ! Test the spatial Inversion ! @@ -211,29 +209,29 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) ! ALLOCATION !------------ ! - !MB: we load X_par and not X_mat. refer to QP_ppa_cohsex. - ! deallocate X_mat + ! MB: we load X_par and not X_mat (refer to QP_ppa_cohsex) + ! Here deallocate X_mat + ! call X_ALLOC_elemental("X") ! + if (.not.io_RESPONSE) call error("[MPA] .not. io_RESPONSE untested with MPA") + ! if (.not.allocated(X_par).and.io_RESPONSE) then allocate(X_par(1)) endif - !if (io_RESPONSE) call X_ALLOC_elemental('X',(/X%ng,X%ng,2*X%mpa_npoles/)) 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 ! - !Instead of MPA_alloc, we try MPA_ALLOC_parallel - !call MPA_alloc((/X%ng,X%ng,X%mpa_npoles,2*X%mpa_npoles/)) - if (.not.allocated(MPA_E_par).and.io_RESPONSE) then - allocate(MPA_E_par(1)) - endif - if (.not.allocated(MPA_R_par).and.io_RESPONSE) then - allocate(MPA_R_par(1)) + if (.not.allocated(MPA_E_par).and.io_RESPONSE) allocate(MPA_E_par(1)) + if (.not.allocated(MPA_R_par).and.io_RESPONSE) allocate(MPA_R_par(1)) + if (io_RESPONSE) then + ! AF: GPU allocation is performed separately below + call MPA_ALLOC_parallel(MPA_E_par(1),MPA_R_par(1),X%ng,2*X%mpa_npoles,"CPU_ONLY") endif - if (io_RESPONSE) call MPA_ALLOC_parallel(MPA_E_par(1),MPA_R_par(1),X%ng,2*X%mpa_npoles,"MPA") ! ! ! AF: the following line needs to be moved elsewhere @@ -308,6 +306,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) PPcond_Qrate=0._SP MP_Qerr=0._SP cond_numQ(:)=0._SP + ! !$omp parallel default(shared),private(ig1,ig2,MPred,PPcond_rate,MP_err,cond_num,i_np,MPA_Xo,l_RIM_W_g), & !$omp & reduction(+:MPred_rate,PPcond_Qrate,MP_Qerr,cond_numQ) @@ -325,17 +324,16 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) !DALV: the multiplication by isc%gamp(ig1,ig2) is performed later MPA_Xo(1:Xw%n_freqs)=X_par(iq_mem)%blc(ig1,ig2,1:Xw%n_freqs) endif + ! MPred=.false. PPcond_rate=0._SP MP_err=0._SP cond_num(:)=0._SP ! - !call mpa_RE_solver(X%mpa_npoles,MPA_freqs,MPA_Xo,MPA_R_mat(ig1,ig2,:),MPA_E_mat(ig1,ig2,:),& -!& Xw%mpa_solver,MPred,PPcond_rate,MP_err,cond_num) - !MB: in the following we introduce the MPA_E/R_par. should be same as X_par(iq_mem)%blc(ig1,ig2,X_range2), - ! where X_range2 -> : ... not sure if I have to introduce the iq_mem. - call mpa_RE_solver(X%mpa_npoles,MPA_freqs,MPA_Xo,MPA_R_par(iq_mem)%blc(ig1,ig2,:),MPA_E_par(iq_mem)%blc(ig1,ig2,:),& -& Xw%mpa_solver,MPred,PPcond_rate,MP_err,cond_num) + call mpa_RE_solver(X%mpa_npoles,MPA_freqs,MPA_Xo, & +& MPA_R_par(1)%blc(ig1,ig2,:),MPA_E_par(1)%blc(ig1,ig2,:), & +& Xw%mpa_solver, MPred,PPcond_rate,MP_err,cond_num) + ! if(MPred) MPred_rate=MPred_rate+1._SP PPcond_Qrate=PPcond_Qrate+PPcond_rate MP_Qerr=MP_Qerr+MP_err @@ -361,7 +359,6 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) ! ! I/O MPA ! - ! MB: is this the "fake loading?" if (io_MULTIPOLE) then ! call io_control(ACTION=OP_APP_CL,COM=REP,SEC=(/2*iqibz,2*iqibz+1/),ID=ID2) @@ -388,35 +385,26 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) ! if (iqs>nsym/(i_time_rev+1) .and. (i_space_inv==0.or.mag_syms) .and..not.X_is_TR_rotated) then ! - ! Note (AF) that $omp directives are inside mat_transpose + ! AF: note that X_par is nott transpose, so, when + ! the ig1,ig2 indexes are distributed, only MPA_E_par/MPA_R_par + ! have the right ranges for cols and rows ! - do i_np=1,X%mpa_npoles - call mat_transpose(MPA_E_par(1)%blc(:,:,i_np)) - call mat_transpose(MPA_R_par(1)%blc(:,:,i_np)) - enddo + call MATRIX_transpose("T",M_out=MPA_E_par(1)) + call MATRIX_transpose("T",M_out=MPA_R_par(1)) + call MATRIX_transpose("T",M_out=X_par(iq_mem)) ! X_is_TR_rotated=.true. endif ! - !if (have_cuda) then - ! call dev_memcpy(MPA_E_mat_d,MPA_E_mat) - ! call dev_memcpy(MPA_R_mat_d,MPA_R_mat) - !endif - ! - !MPA_E_mat_p=>DEV_VAR(MPA_E_mat) - !MPA_R_mat_p=>DEV_VAR(MPA_R_mat) - ! - !MB: if (have_cuda) then - !call dev_memcpy(MPA_E_par_d,MPA_E_par(1)%blc) - !call dev_memcpy(MPA_R_par_d,MPA_R_par(1)%blc) - YAMBO_ALLOC_SOURCE(MPA_E_par(1)%blc_d,MPA_E_par(1)%blc) - YAMBO_ALLOC_SOURCE(MPA_R_par(1)%blc_d,MPA_R_par(1)%blc) + YAMBO_ALLOC_SOURCE( DEV_VAR(MPA_E_par(1)%blc), MPA_E_par(1)%blc ) + YAMBO_ALLOC_SOURCE( DEV_VAR(MPA_R_par(1)%blc), MPA_R_par(1)%blc ) endif ! MPA_E_par_p=>DEV_VAR(MPA_E_par(1)%blc) MPA_R_par_p=>DEV_VAR(MPA_R_par(1)%blc) ! + ! call timing('GW(mpa)_qp_loop',OPR='start') ! QP_loop: do i_qp=i_qp_to_start,QP_n_states diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 8c07b43802..a6a9283e47 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -49,7 +49,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) & RIM_W_is_diagonal,RIM_W_ng,RIM_W,RIM_W_d use D_lattice, ONLY:nsym,i_time_rev,i_space_inv,mag_syms use wrapper, ONLY:M_by_V,V_dot_V - use interfaces, ONLY:QP_state_print,WF_load,WF_free,MATRIX_transpose,MATRIX_duplicate + use interfaces, ONLY:QP_state_print,WF_load,WF_free,MATRIX_transpose use matrix, ONLY:PAR_matrix,MATRIX_reset use timing_m, ONLY:timing use parallel_m, ONLY:PAR_COM_RL_A2A,PAR_COM_QP_A2A,PAR_COM_G_b_INDEX From 6b62c83f9df04ac1dcab51042ae27d654a787336 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Thu, 10 Oct 2024 21:34:40 +0200 Subject: [PATCH 100/110] more compilation fixes and cleanup --- src/allocations/MPA_ALLOC_parallel.F | 5 ---- src/collisions/LSEX_potential.F | 2 +- src/common/eval_G_minus_G.F | 9 +++++-- src/io/io_MPA.F | 31 ++++++++++-------------- src/modules/mod_MPA.F | 35 +++++++--------------------- src/qp/QP_mpa.F | 3 --- 6 files changed, 28 insertions(+), 57 deletions(-) diff --git a/src/allocations/MPA_ALLOC_parallel.F b/src/allocations/MPA_ALLOC_parallel.F index 19c70294a4..cb289a5539 100644 --- a/src/allocations/MPA_ALLOC_parallel.F +++ b/src/allocations/MPA_ALLOC_parallel.F @@ -8,11 +8,7 @@ subroutine MPA_ALLOC_parallel(MPA_E_par,MPA_R_par,NG,NW,mode) ! use pars, ONLY:SP,DP,cZERO,cONE,cI - use functions, ONLY:NAN - use parallel_m, ONLY:COMM_copy,PAR_COM_RL_INDEX,PAR_COM_RL_A2A use matrix, ONLY:MATRIX_reset,PAR_matrix - use X_m, ONLY:X_par_lower_triangle,X_rows,X_cols,& -& X_FILL_UP_matrix_only,X_lower_triangle_matrix_in_use use parallel_int, ONLY:PARALLEL_live_message use cuda_m, ONLY:have_cuda ! @@ -35,7 +31,6 @@ subroutine MPA_ALLOC_parallel(MPA_E_par,MPA_R_par,NG,NW,mode) ! Type of allocation.... ! !l_XUP = index(mode,"XUP")>0 - !l_PAR = index(mode,"X")>0.and.index(mode,"XUP")==0 l_CPU_ONLY = index(mode,"CPU_ONLY")>0 ! ! Initialization diff --git a/src/collisions/LSEX_potential.F b/src/collisions/LSEX_potential.F index f04f1fc512..948de60da6 100644 --- a/src/collisions/LSEX_potential.F +++ b/src/collisions/LSEX_potential.F @@ -50,7 +50,7 @@ subroutine LSEX_potential(q,X,Xw) 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 elemental_collision_alloc(isc,NG=X%ng,GAMP_NG=(/X%ng,X%ng/),TITLE="Wlr") ! call X_ALLOC_elemental('X',(/X%ng,X%ng,1/)) ! diff --git a/src/common/eval_G_minus_G.F b/src/common/eval_G_minus_G.F index 42827593a3..c61f81e953 100644 --- a/src/common/eval_G_minus_G.F +++ b/src/common/eval_G_minus_G.F @@ -149,11 +149,17 @@ integer function eval_G_minus_G(iG,iGo,COMM) ! YAMBO_ALLOC(G_m_G,(iG_,iGo_)) G_m_G=0 + ! ! AF: replaced !AMBO_ALLOC(G_m_G_maxval_tmp,(iGo_)) !G_m_G_maxval_tmp=0 + ! G_m_G_maxval=0 ! +!-------------------- +! Algorithmic logic: +!-------------------- +! ! * convert to g_vec to integer coords ! relative/crystal coords ! * alloc alternative g_vec array @@ -176,7 +182,7 @@ integer function eval_G_minus_G(iG,iGo,COMM) ! imap(g_vec_i(1,ig),g_vec_i(2,ig),g_vec_i(3,ig)) = ig ! enddo ! -! * v1 becomes an integert triplet +! * v1 becomes an integer triplet ! * G_m_G(i1,i2) = imap(v1(1),v1(2),v1(3)) ! ! * beware index ordering g_vec(ng,3)... @@ -204,7 +210,6 @@ integer function eval_G_minus_G(iG,iGo,COMM) do i1 = 1, size(g_vec,1) imap(ig_vec_rlu(i1,1),ig_vec_rlu(i1,2),ig_vec_rlu(i1,3)) = i1 enddo - ! !$omp end parallel do ! !$omp parallel do default(shared), private(i2,i1,iv1_rlu), schedule(dynamic) diff --git a/src/io/io_MPA.F b/src/io/io_MPA.F index 2a47078105..199bdb07b4 100644 --- a/src/io/io_MPA.F +++ b/src/io/io_MPA.F @@ -17,8 +17,7 @@ integer function io_MPA(X,Xw,ID) & frag_MULTIPOLE,IO_NO_DATABASE,io_mode,DUMP,frag_RESPONSE use stderr, ONLY:intc use timing_m, ONLY:timing - use mpa_m, ONLY:MPA_E_mat,MPA_R_mat,MPA_freqs,MPA_alloc, & - & MPA_E_par,MPA_R_par + use mpa_m, ONLY:MPA_freqs,MPA_alloc,MPA_E_par,MPA_R_par ! #include ! @@ -129,22 +128,17 @@ integer function io_MPA(X,Xw,ID) ! ch="MPA_E_Q_"//trim(intc(iq)) ! - ! - !MB: here I let shape(MPA_E_mat), not sure about that, hope it works. - !MB: also, let's check the shapes also wrt #poles and Xfreqs. - ! for now, no support for reading MPA_mat. 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') - 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 - call def_variable_bulk(ID_frag,trim(ch),1,(/2,shape(MPA_E_mat)/),SP,par_io_kind='independent') - call io_variable_bulk(ID_frag,1,C3=MPA_E_mat,IPOS=(/1,1,1,1/)) + 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/)) + 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 ! ! residues @iq @@ -153,16 +147,15 @@ integer function io_MPA(X,Xw,ID) ! 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') - 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/)) + 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,shape(MPA_E_mat)/),SP,par_io_kind='independent') - call io_variable_bulk(ID_frag,1,C3=MPA_R_mat,IPOS=(/1,1,1,1/)) + 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/)) + 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 ! if (read_is_on(ID) .and. different_db_RL_order) then diff --git a/src/modules/mod_MPA.F b/src/modules/mod_MPA.F index a149165d1d..ff151325c0 100644 --- a/src/modules/mod_MPA.F +++ b/src/modules/mod_MPA.F @@ -32,31 +32,24 @@ module mpa_m ! use pars, ONLY:SP,DP,cZERO,cONE,cI use functions, ONLY:NAN - use parallel_m, ONLY:COMM_copy,PAR_COM_RL_INDEX,PAR_COM_RL_A2A - use matrix, ONLY:MATRIX_reset,PAR_matrix - use X_m, ONLY:X_par_lower_triangle,X_rows,X_cols,& - & X_FILL_UP_matrix_only,X_lower_triangle_matrix_in_use - use parallel_int, ONLY:PARALLEL_live_message - use cuda_m, ONLY:have_cuda + use parallel_m, ONLY:COMM_copy,PAR_COM_RL_INDEX,PAR_COM_RL_A2A + use matrix, ONLY:MATRIX_reset,PAR_matrix + use X_m, ONLY:X_par_lower_triangle,X_rows,X_cols,& + & X_FILL_UP_matrix_only,X_lower_triangle_matrix_in_use + use parallel_int, ONLY:PARALLEL_live_message + use cuda_m, ONLY:have_cuda ! #include #include - complex(SP), allocatable, target :: MPA_E_mat(:,:,:) - complex(SP), allocatable, target :: MPA_R_mat(:,:,:) - complex(SP), allocatable, target :: MPA_freqs(:) - ! - complex(SP), allocatable DEV_ATTR, target :: MPA_E_mat_d(:,:,:) - complex(SP), allocatable DEV_ATTR, target :: MPA_R_mat_d(:,:,:) - !MB: + complex(SP), allocatable, target :: MPA_freqs(:) type(PAR_matrix), allocatable, target :: MPA_E_par(:) type(PAR_matrix), allocatable, target :: MPA_R_par(:) complex(SP), allocatable DEV_ATTR, target :: MPA_E_par_d(:,:,:) complex(SP), allocatable DEV_ATTR, target :: MPA_R_par_d(:,:,:) - + ! public :: mpa_RE_solver,err_func_X public :: MPA_alloc,MPA_free - ! contains ! @@ -64,23 +57,11 @@ subroutine MPA_alloc(d) implicit none integer :: d(4) call MPA_free() - YAMBO_ALLOC(MPA_E_mat,(d(1),d(2),d(3))) - YAMBO_ALLOC(MPA_R_mat,(d(1),d(2),d(3))) YAMBO_ALLOC(MPA_freqs,(d(4))) -#ifdef _CUDA - YAMBO_ALLOC(MPA_E_mat_d,(d(1),d(2),d(3))) - YAMBO_ALLOC(MPA_R_mat_d,(d(1),d(2),d(3))) -#endif end subroutine subroutine MPA_free() - YAMBO_FREE(MPA_E_mat) - YAMBO_FREE(MPA_R_mat) YAMBO_FREE(MPA_freqs) -#ifdef _CUDA - YAMBO_FREE(MPA_E_mat_d) - YAMBO_FREE(MPA_R_mat_d) -#endif end subroutine ! subroutine mpa_cond1(z, E, PPcond_rate) diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index ff4070de98..8ac87a6100 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -73,9 +73,6 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) complex(SP), pointer DEV_ATTR :: isc_rhotw_p(:) complex(SP), pointer DEV_ATTR :: iscp_rhotw_p(:) complex(SP), pointer DEV_ATTR :: isc_gamp_p(:,:) - ! - complex(SP), pointer DEV_ATTR :: MPA_R_mat_p(:,:,:) - complex(SP), pointer DEV_ATTR :: MPA_E_mat_p(:,:,:) complex(SP), pointer DEV_ATTR :: MPA_R_par_p(:,:,:) complex(SP), pointer DEV_ATTR :: MPA_E_par_p(:,:,:) ! From 523f3ec55d82914e77ec16734f50b7abb4be6fa2 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Fri, 11 Oct 2024 09:30:06 +0200 Subject: [PATCH 101/110] fix to make G_m_G_maxval consisten across processors --- src/common/eval_G_minus_G.F | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/common/eval_G_minus_G.F b/src/common/eval_G_minus_G.F index c61f81e953..952ba954a2 100644 --- a/src/common/eval_G_minus_G.F +++ b/src/common/eval_G_minus_G.F @@ -16,7 +16,7 @@ integer function eval_G_minus_G(iG,iGo,COMM) ! use pars, ONLY:SP use vec_operate, ONLY:iku_v_norm, c2a - use parallel_m, ONLY:yMPI_comm,PP_indexes,PP_indexes_reset,myid + use parallel_m, ONLY:yMPI_comm,PP_indexes,PP_indexes_reset,ncpu,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,G_m_G_maxval #ifdef _CUDA @@ -37,7 +37,7 @@ integer function eval_G_minus_G(iG,iGo,COMM) 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(:) + integer, allocatable :: G_m_G_maxval_tmp(:) type(PP_indexes) :: PAR_IND_G ! integer, external :: G_index @@ -150,10 +150,8 @@ integer function eval_G_minus_G(iG,iGo,COMM) YAMBO_ALLOC(G_m_G,(iG_,iGo_)) G_m_G=0 ! - ! AF: replaced - !AMBO_ALLOC(G_m_G_maxval_tmp,(iGo_)) - !G_m_G_maxval_tmp=0 - ! + YAMBO_ALLOC(G_m_G_maxval_tmp,(iGo_)) + G_m_G_maxval_tmp=0 G_m_G_maxval=0 ! !-------------------- @@ -225,27 +223,28 @@ integer function eval_G_minus_G(iG,iGo,COMM) 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)) ! - ! AF: replaced below by maxval(G_m_G) - !G_m_G_maxval_tmp(i2)=max(G_m_G_maxval_tmp(i2),G_m_G(i1,i2)) - ! enddo + ! + G_m_G_maxval_tmp(i2)=maxval(G_m_G(:,i2)) + ! enddo !$omp end parallel do ! - G_m_G_maxval=maxval(G_m_G) - ! - !G_m_G_maxval=maxval(G_m_G_maxval_tmp) - !AMBO_FREE(G_m_G_maxval_tmp) + if (present(COMM)) call PP_redux_wait(G_m_G_maxval_tmp,COMM=COMM%COMM) + G_m_G_maxval=maxval(G_m_G_maxval_tmp) ! if (present(COMM)) call PP_redux_wait(G_m_G,COMM=COMM%COMM) if (any(G_m_G(:,:)==0)) call error("[G-vec] unexpected invalid G_index in G_m_G") ! + ! cleanup + ! YAMBO_FREE(g_vec_rlu) YAMBO_FREE(ig_vec_rlu) YAMBO_FREE(imap) + YAMBO_FREE(G_m_G_maxval_tmp) + YAMBO_FREE(E_G_m_G) ! call PP_indexes_reset(PAR_IND_G) - YAMBO_FREE(E_G_m_G) ! #ifdef _CUDA YAMBO_FREE(G_m_G_d) From 37c28f15b8b2189108c17098e8fede7c0ff096c2 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Fri, 11 Oct 2024 16:49:10 +0200 Subject: [PATCH 102/110] cleanup of debugging comments --- src/pol_function/X_mat_filling.F | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/pol_function/X_mat_filling.F b/src/pol_function/X_mat_filling.F index 8b291667d7..919120e959 100644 --- a/src/pol_function/X_mat_filling.F +++ b/src/pol_function/X_mat_filling.F @@ -38,21 +38,14 @@ subroutine X_mat_filling(iq_mem,X,Xw,X_MEM_n_freqs,X_MEM_n_tot_freqs,X_mat) if ( io_RESPONSE) iw_X_mat=iw if (.not.io_RESPONSE) iw_X_mat=(iq_mem-1)*X_MEM_n_freqs+iw ! - ! XXX - write(*,*) "before zeroing X_mat",iw X_mat(:,:,iw_X_mat)=cZERO ! - write(*,*) "before if PAR_COM_X_WORLD",iw if (PAR_COM_X_WORLD_RL_resolved%CPU_id==0) then - write(*,*) "inside if PAR_COM_X_WORLD",iw X_mat(X_par(iq_mem)%rows(1):X_par(iq_mem)%rows(2),& & X_par(iq_mem)%cols(1):X_par(iq_mem)%cols(2),iw_X_mat)=X_par(iq_mem)%blc(:,:,iw) endif ! - write(*,*) "before PP_redux_wait", iw - !call PP_redux_wait(X_mat(:,:,iw_X_mat),COMM=PAR_COM_X_WORLD%COMM) call PP_redux_wait(X_mat(:,:,iw_X_mat),IN_PLACE=.true.,COMM=PAR_COM_X_WORLD%COMM) - write(*,*) "after PP_redux_wait", iw ! enddo ! From a2d407fb844f9fb4e6f0db5b93988c23a6bf907c Mon Sep 17 00:00:00 2001 From: Nicola Spallanzani Date: Fri, 11 Oct 2024 16:00:52 +0200 Subject: [PATCH 103/110] The two variables, COLL_full and COLL_compr, were not protected from use without _PAR_IO. --- src/collisions/COLLISIONS_load.F | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/collisions/COLLISIONS_load.F b/src/collisions/COLLISIONS_load.F index 0d039f513e..a8976160a1 100644 --- a/src/collisions/COLLISIONS_load.F +++ b/src/collisions/COLLISIONS_load.F @@ -229,9 +229,11 @@ subroutine local_IO( COLL ) IO_ACT=RD #endif ! +#if defined _PAR_IO #if defined _NL COLL_full =rZERO cOLL_compr=rZERO +#endif #endif do i_coll=1,COLL%N ! From e6b7609e65bbeff04a6e631fd2ebe6d0c3165bcc Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Fri, 11 Oct 2024 22:22:01 +0200 Subject: [PATCH 104/110] Importing fix from tech-gpu by Nicola Spallanzani: Each occurrence of the macro YAMBO_ALLOC_GPU_SOURCE has been protected with a precompiler directive that activates the statement only when compiling with GPU acceleration. This is because the Intel compiler encountered an error when allocating a variable with the same name as the source. --- src/qp/QP_mpa.F | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index 8ac87a6100..1241bbe13f 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -393,10 +393,12 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) X_is_TR_rotated=.true. endif ! +#ifdef _CUDA if (have_cuda) then YAMBO_ALLOC_SOURCE( DEV_VAR(MPA_E_par(1)%blc), MPA_E_par(1)%blc ) YAMBO_ALLOC_SOURCE( DEV_VAR(MPA_R_par(1)%blc), MPA_R_par(1)%blc ) endif +#endif ! MPA_E_par_p=>DEV_VAR(MPA_E_par(1)%blc) MPA_R_par_p=>DEV_VAR(MPA_R_par(1)%blc) From 7a46c47445bbb10fcfeb944b1cf6cd899e5e622a Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Fri, 11 Oct 2024 22:24:08 +0200 Subject: [PATCH 105/110] Importing fix from tech-gpu by Nicola Spallanzani: Updated PETSc and SLEPc versions to resolve some compilation issues. Fixed issues with MPI path recognition when compiling with NVHPC compilers. --- config/m4/mpi.m4 | 4 + configure | 7818 ++++++++++++++++++++-------------------------- 2 files changed, 3477 insertions(+), 4345 deletions(-) diff --git a/config/m4/mpi.m4 b/config/m4/mpi.m4 index e64efbfc4a..a95a757fbe 100644 --- a/config/m4/mpi.m4 +++ b/config/m4/mpi.m4 @@ -52,6 +52,10 @@ if test "$mpibuild" = "yes"; then def_mpi="-D_MPI" ACX_GET_MPI_KIND() 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 # diff --git a/configure b/configure index 117b95129a..d56228235f 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.23298 h.a65667c3c5. +# Generated by GNU Autoconf 2.69 for Yambo 5.2.0 r.23298 h.a65667c3c5. # # 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 @@ -834,7 +808,6 @@ FFLAGS F77 FPP CPPFLAGS_yambo -CPP IFLAG FCLIBS OPENMPLIBS @@ -864,9 +837,6 @@ AR MAKE ifGNUmake hostname -SIZEOF_INT_P -SET_MAKE -LIBOBJS host_os host_vendor host_cpu @@ -875,9 +845,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 +898,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -1046,10 +1021,10 @@ CFLAGS LDFLAGS LIBS CPPFLAGS +CPP FC FCFLAGS UFLAGS -CPP FPP F77 FFLAGS @@ -1094,7 +1069,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 +1098,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 +1140,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 +1166,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 +1321,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 +1370,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 +1386,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 +1432,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 +1450,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 +1458,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 +1514,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 @@ -1644,7 +1611,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] @@ -1804,10 +1770,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 +1800,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 +1830,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 +1838,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 @@ -1883,9 +1848,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF Yambo configure 5.2.0 r.23298 h.a65667c3c5 -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 @@ -1902,14 +1867,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 +1882,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 +1899,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 +2076,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 +2107,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 +2125,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 +2141,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 +2164,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 +2182,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 +2195,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 +2217,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 +2232,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 +2257,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 +2368,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 +2383,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 +2408,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 +2429,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 +2452,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 +2467,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 +2492,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.23298 h.a65667c3c5, 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 @@ -2547,12 +2562,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 +2598,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 +2633,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 +2648,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 +2673,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 +2681,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 +2696,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 +2712,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 +2727,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 +2793,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="2" -SPATCHLEVEL="0" -SREVISION="23298" -SHASH="a65667c3c5" +SVERSION="5" +SSUBVERSION="2" +SPATCHLEVEL="0" +SREVISION="23298" +SHASH="a65667c3c5" @@ -3289,6 +2897,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 +2987,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 +3000,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 +3011,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 +3022,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 +3040,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 +3059,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 +3075,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 +3092,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 +3108,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 +3125,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 +3135,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 +3147,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 +3162,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 +3181,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 +3196,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 +3204,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 +3216,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 +3231,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 +3244,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 +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_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 +3271,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 +3283,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 +3297,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 +3309,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 +3324,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 +3337,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 +3350,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 +3374,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 +3396,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 +3408,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 +3423,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 +3440,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 +3452,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 +3467,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 +3483,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 +3520,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 +3528,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4063,9 +3540,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 +3563,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 +3584,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 +3600,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 @@ -4177,15 +3651,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 +3668,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 +3680,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 +3689,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 +3700,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 +3746,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 +3759,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 +3793,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 +3824,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 +3889,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 -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" + done + ac_cv_prog_CPP=$CPP + fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 + 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 @@ -4572,51 +4124,280 @@ 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 + # 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 -done +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 -if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes -then : +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 -printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h +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 -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 : + +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 $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 @@ -4878,12 +4659,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 +4671,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 +4686,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 @@ -4927,61 +4703,43 @@ 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 +4747,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 +4800,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 +4823,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 +4895,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 +4905,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 +4936,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 +4964,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 +4980,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 +5037,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 \ @@ -5364,15 +5083,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 +5099,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 +5150,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 +5166,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 +5197,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 +5214,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 +5233,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 +5253,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 +5263,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 +5273,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 +5301,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 +5340,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 +5361,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 +5373,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 +5388,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 +5401,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 +5413,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 +5428,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 +5440,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 +5454,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 +5466,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 +5481,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 +5494,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 +5507,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 +5531,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 +5553,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 +5565,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 +5580,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 +5597,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 +5609,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 +5624,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 +5640,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 +5677,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 +5700,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,212 +5731,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 -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 - 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 +rm -f core conftest.err conftest.$ac_objext 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 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 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 core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag 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}: 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. */ -$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 @@ -6371,18 +5893,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 ; @@ -6393,14 +5984,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 @@ -6422,12 +6013,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 +6025,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 +6040,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 +6053,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 +6065,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 +6080,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 +6092,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 +6111,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 +6135,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 +6147,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 +6162,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 +6179,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 +6191,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 +6206,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 +6222,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 +6232,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 +6242,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 +6252,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 +6261,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 +6274,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 +6344,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 @@ -6815,31 +6379,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 +6419,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 +6431,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 +6451,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 +6487,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 +6507,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 @@ -7049,10 +6608,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 +6628,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 @@ -7462,35 +7020,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 +7059,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; } # @@ -7527,8 +7085,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 @@ -7550,19 +7107,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 +7135,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 +7208,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 +7243,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 +7326,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 +7341,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 +7358,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 +7378,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 +7387,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 +7404,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 +7424,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 +7439,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 +7455,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 +7482,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 +7511,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 +7534,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 +7567,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 +7580,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 +7601,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 +7614,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 +7659,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 +7672,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 +7712,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 +7745,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 +7760,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 +7774,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 +7782,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 +7797,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 +7811,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 +7824,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 +7924,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 +7943,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 +7978,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 +8005,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 @@ -8492,166 +8018,23 @@ for ax_flag in "-I" "-M" "-p"; do 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 + 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' @@ -8659,6 +8042,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 @@ -8710,8 +8102,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 #======= @@ -8728,8 +8120,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 +8133,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; @@ -8797,8 +8188,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 +8198,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 +8226,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 +8256,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 +8268,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 +8283,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 +8300,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 +8312,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 +8327,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 +8343,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 +8353,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 +8363,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 +8373,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 +8382,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 +8395,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 +8457,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 +8509,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 +8539,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 +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_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 +8566,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 +8579,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 +8594,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 +8615,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 +8630,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 +8650,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 +8685,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 +8699,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 +8724,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 +8748,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 +8767,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 +8803,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 +8818,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 +8839,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 +8854,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 +8869,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 +8884,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 +8905,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 +8920,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 +8939,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 +8951,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 +8966,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 +8984,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 +9035,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 +9076,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 +9088,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 +9103,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 +9116,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 +9131,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 +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_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 +9171,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 +9192,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 +9207,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 +9221,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 +9260,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 +9304,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 +9333,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 +9427,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 +9442,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 @@ -10295,10 +9613,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 @@ -10320,8 +9637,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 @@ -10335,12 +9651,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 +9663,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 +9678,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 +9691,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 +9703,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 +9718,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 +9730,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 +9743,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 +9760,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 +9775,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 +9803,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 +9876,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 +9911,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 +9994,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 +10009,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 +10026,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 +10046,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 +10055,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 +10072,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 +10092,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 +10107,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 +10124,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 +10142,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 +10167,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 +10191,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 +10202,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 +10214,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 +10239,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 +10264,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 +10288,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 +10301,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 +10327,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 +10353,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 +10377,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 +10390,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 +10410,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 +10423,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 +10444,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 +10456,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 +10481,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 +10505,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 +10518,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 +10538,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 +10551,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 +10571,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 +10584,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 +10610,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 +10638,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 +10651,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 +10682,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 +10706,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 +10719,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 +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="-L${mkl_libdir} -lmkl_intel -lmkl_sequential -lmkl_core -lpthread" fi @@ -11550,13 +10773,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 +10786,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 +10809,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 +10819,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 +10889,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 +10924,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 +10961,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 +10984,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 +11016,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 +11029,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 +11050,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 +11071,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 +11116,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 +11137,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 +11177,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 +11201,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 +11227,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 +11252,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 +11265,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 +11278,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 +11322,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 +11345,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 +11355,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 +11412,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 +11482,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 +11501,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 +11573,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 +11600,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 +11626,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 +11637,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 +11648,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 +11683,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 +11693,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 +11731,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 +11758,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 +11780,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 +11795,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 +11845,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 +11867,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 +11969,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 +11982,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 +12003,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 +12058,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 +12106,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 +12135,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 +12156,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 +12206,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 +12250,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 +12281,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 +12300,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 +12349,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 @@ -13259,23 +12443,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 +12473,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 @@ -13380,29 +12562,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 +12588,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 +12596,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 +12606,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 +12637,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 +12651,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 +12672,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 +12710,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 +12731,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 +12768,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 +12789,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 +12826,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 +12847,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 +12884,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 +12905,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 +12954,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 +13002,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 +13068,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 +13082,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 +13125,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 +13144,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 +13159,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"; @@ -14010,8 +13182,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 # @@ -14019,8 +13191,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 # @@ -14029,8 +13201,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 +13259,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 +13310,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 +13318,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 +13326,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 +13334,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 +13342,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 +13378,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 +13426,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 +13459,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 +13486,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 +13513,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 +13563,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 +13576,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 +13585,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"; @@ -14451,8 +13608,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 # @@ -14462,8 +13619,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 # @@ -14472,8 +13629,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,37 +13712,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 @@ -14594,29 +13746,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 @@ -14639,10 +13787,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 +13809,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 +13881,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 +13903,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 @@ -14829,38 +13977,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 @@ -14881,10 +14024,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 @@ -14904,38 +14047,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/" @@ -14943,14 +14086,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 # @@ -14966,10 +14109,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 +14132,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 +14185,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 +14207,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 # @@ -15130,29 +14268,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 @@ -15164,8 +14298,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 @@ -15185,11 +14319,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,11 +14352,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 @@ -15233,11 +14365,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 @@ -15315,71 +14446,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 @@ -15387,7 +14513,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 @@ -15399,12 +14525,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 @@ -15420,15 +14546,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 @@ -15454,41 +14578,41 @@ CUDA_LIBS="-cudalib=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="-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; } + { $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="-cuda -gpu=$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 # @@ -16134,8 +15258,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 +15289,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 +15311,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 +15329,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 +15345,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 +15369,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 +15386,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 +15434,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 +15449,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 +15462,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 +15498,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 +15531,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 +15554,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 +15590,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 +15612,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 +15625,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 +15666,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 +15675,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 @@ -16607,7 +15738,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by Yambo $as_me 5.2.0 r.23298 h.a65667c3c5, 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 @@ -16665,16 +15796,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.23298 h.a65667c3c5 -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." @@ -16711,15 +15840,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 +15856,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 +15865,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 +15893,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 +15907,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 +15947,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 +16284,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 +16292,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 +16319,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 +16343,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 +16398,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 +16441,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 +16459,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 +16513,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 +16656,3 @@ cat config/report if test "x$enable_ydb" = "xyes"; then cat config/msg_ydb fi - From f6b76ed239d1a2a32ad100455391badd4fd7623c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 12 Oct 2024 20:50:09 +0200 Subject: [PATCH 106/110] Version 5.2.0, Revision 23432, Hash 523f3ec55d MODIFIED * configure include/version/version.m4 DELETED * modules/pgipar164Jk4g modules/pgipar1ZyGlEf modules/pgipar2A2EZGu modules/pgipar2bwSQPS Bugs: - [yambo] deleted pgipar modules Patch sent by: Davide Sangalli --- configure | 7826 ++++++++++++++++++++---------------- include/version/version.m4 | 6 +- src/modules/pgipar164Jk4g | 0 src/modules/pgipar1ZyGlEf | 0 src/modules/pgipar2A2EZGu | 0 src/modules/pgipar2bwSQPS | 0 6 files changed, 4352 insertions(+), 3480 deletions(-) delete mode 100644 src/modules/pgipar164Jk4g delete mode 100644 src/modules/pgipar1ZyGlEf delete mode 100644 src/modules/pgipar2A2EZGu delete mode 100644 src/modules/pgipar2bwSQPS diff --git a/configure b/configure index d56228235f..dfe9e83289 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.2.0 r.23298 h.a65667c3c5. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23432 h.523f3ec55d. # # 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.2.0 r.23298 h.a65667c3c5' -PACKAGE_STRING='Yambo 5.2.0 r.23298 h.a65667c3c5' +PACKAGE_VERSION='5.2.0 r.23432 h.523f3ec55d' +PACKAGE_STRING='Yambo 5.2.0 r.23432 h.523f3ec55d' 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 @@ -808,6 +834,7 @@ FFLAGS F77 FPP CPPFLAGS_yambo +CPP IFLAG FCLIBS OPENMPLIBS @@ -837,6 +864,9 @@ AR MAKE ifGNUmake hostname +SIZEOF_INT_P +SET_MAKE +LIBOBJS host_os host_vendor host_cpu @@ -845,15 +875,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 @@ -898,6 +922,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -1021,10 +1046,10 @@ CFLAGS LDFLAGS LIBS CPPFLAGS -CPP FC FCFLAGS UFLAGS +CPP FPP F77 FFLAGS @@ -1069,6 +1094,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}' @@ -1098,8 +1124,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 ;; @@ -1140,9 +1164,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" @@ -1166,9 +1190,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" @@ -1321,6 +1345,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=* \ @@ -1370,9 +1403,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" @@ -1386,9 +1419,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" @@ -1432,9 +1465,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}" ;; @@ -1450,7 +1483,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 @@ -1458,7 +1491,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. @@ -1514,7 +1547,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 @@ -1571,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.a65667c3c5 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23432 h.523f3ec55d to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1611,6 +1644,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] @@ -1636,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.a65667c3c5:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23432 h.523f3ec55d:";; esac cat <<\_ACEOF @@ -1770,10 +1804,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 @@ -1800,9 +1834,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/ ;; @@ -1830,7 +1864,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 @@ -1838,7 +1873,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 @@ -1847,10 +1882,10 @@ 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 -generated by GNU Autoconf 2.69 +Yambo configure 5.2.0 r.23432 h.523f3ec55d +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 @@ -1867,14 +1902,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 @@ -1882,14 +1917,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 @@ -1899,176 +1935,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 @@ -2076,26 +1942,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 @@ -2107,16 +1975,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) @@ -2125,14 +1994,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) @@ -2141,18 +2011,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 @@ -2164,17 +2035,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; @@ -2182,12 +2054,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; @@ -2195,18 +2068,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 @@ -2217,14 +2091,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 @@ -2232,17 +2106,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 @@ -2257,72 +2132,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 # --------------------------- @@ -2330,14 +2181,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 @@ -2345,14 +2196,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 @@ -2368,14 +2220,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 @@ -2383,17 +2235,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 @@ -2408,20 +2261,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 @@ -2429,14 +2320,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 @@ -2452,14 +2344,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 @@ -2467,17 +2359,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 @@ -2492,44 +2385,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.2.0 r.23298 h.a65667c3c5, which was -generated by GNU Autoconf 2.69. Invocation command line was +It was created by Yambo $as_me 5.2.0 r.23432 h.523f3ec55d, which was +generated by GNU Autoconf 2.71. Invocation command line was - $ $0 $@ + $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log @@ -2562,8 +2547,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 @@ -2598,7 +2587,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'" ;; @@ -2633,11 +2622,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 @@ -2648,8 +2639,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) ;; #( @@ -2673,7 +2664,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2681,14 +2672,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 @@ -2696,15 +2687,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 @@ -2712,8 +2703,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 && @@ -2727,63 +2718,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 @@ -2793,154 +2769,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="2" -SPATCHLEVEL="0" -SREVISION="23298" -SHASH="a65667c3c5" +/* 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="2" +SPATCHLEVEL="0" +SREVISION="23432" +SHASH="523f3ec55d" + + + + + + +# +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 @@ -2987,9 +3351,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 @@ -3000,7 +3365,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 @@ -3011,7 +3377,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 @@ -3022,7 +3389,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 @@ -3040,7 +3408,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 @@ -3059,7 +3428,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 @@ -3075,7 +3445,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 @@ -3092,7 +3463,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 @@ -3108,7 +3480,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 @@ -3125,9 +3498,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 @@ -3135,11 +3509,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 @@ -3147,11 +3522,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 @@ -3162,11 +3541,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 @@ -3181,9 +3560,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 @@ -3196,6 +3576,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' @@ -3204,11 +3593,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 @@ -3216,11 +3606,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 @@ -3231,11 +3625,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 @@ -3244,11 +3638,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 @@ -3256,11 +3651,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 @@ -3271,11 +3670,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 @@ -3283,8 +3682,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 @@ -3297,11 +3696,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 @@ -3309,11 +3709,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 @@ -3324,11 +3728,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 @@ -3337,11 +3741,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 @@ -3350,15 +3755,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 @@ -3374,18 +3783,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 @@ -3396,11 +3805,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 @@ -3408,11 +3818,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 @@ -3423,11 +3837,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 @@ -3440,11 +3854,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 @@ -3452,11 +3867,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 @@ -3467,11 +3886,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 @@ -3483,34 +3902,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 @@ -3520,7 +4043,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 @@ -3528,7 +4051,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -3540,9 +4063,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.*" @@ -3563,11 +4086,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, @@ -3584,7 +4108,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 @@ -3600,44 +4124,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 @@ -3651,15 +4177,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 @@ -3668,7 +4194,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; @@ -3680,8 +4206,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 @@ -3689,10 +4215,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 @@ -3700,39 +4226,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) { ; @@ -3746,11 +4273,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 @@ -3759,31 +4287,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 @@ -3793,29 +4322,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 @@ -3824,57 +4357,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 @@ -3889,515 +4425,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; -} +$ac_c_conftest_c89_program _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no +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 @@ -4659,11 +4878,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 @@ -4671,11 +4891,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 @@ -4686,11 +4910,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 @@ -4704,42 +4928,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; @@ -4747,52 +4989,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; @@ -4800,20 +5042,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 @@ -4823,58 +5067,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 @@ -4895,9 +5100,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 \ @@ -4905,25 +5111,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 @@ -4936,7 +5141,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 */ @@ -4964,7 +5169,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; @@ -4980,47 +5185,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) ;; @@ -5037,45 +5245,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 \ @@ -5083,14 +5364,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 "* ) ;; @@ -5099,50 +5381,47 @@ else esac -$as_echo "#define malloc rpl_malloc" >>confdefs.h +printf "%s\n" "#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 - -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 \ @@ -5150,14 +5429,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 "* ) ;; @@ -5166,27 +5446,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. @@ -5197,9 +5484,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 \ @@ -5214,14 +5502,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 @@ -5233,19 +5519,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; @@ -5253,9 +5541,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 \ @@ -5263,8 +5552,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 "* ) ;; @@ -5273,19 +5562,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: @@ -5301,20 +5589,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 @@ -5340,12 +5628,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 @@ -5361,11 +5647,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 @@ -5373,11 +5660,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 @@ -5388,11 +5679,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 @@ -5401,11 +5692,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 @@ -5413,11 +5705,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 @@ -5428,11 +5724,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 @@ -5440,8 +5736,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 @@ -5454,11 +5750,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 @@ -5466,11 +5763,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 @@ -5481,11 +5782,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 @@ -5494,11 +5795,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 @@ -5507,15 +5809,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 @@ -5531,18 +5837,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 @@ -5553,11 +5859,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 @@ -5565,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_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 @@ -5580,11 +5891,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 @@ -5597,11 +5908,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 @@ -5609,11 +5921,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 @@ -5624,11 +5940,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 @@ -5640,34 +5956,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 @@ -5677,20 +6097,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 @@ -5700,29 +6121,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 @@ -5731,57 +6156,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 @@ -5796,94 +6224,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 @@ -5893,87 +6371,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 ; @@ -5984,14 +6393,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 @@ -6013,11 +6422,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 @@ -6025,11 +6435,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 @@ -6040,11 +6454,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 @@ -6053,11 +6467,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 @@ -6065,11 +6480,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 @@ -6080,11 +6499,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 @@ -6092,8 +6511,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 @@ -6111,7 +6530,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 @@ -6135,11 +6555,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 @@ -6147,11 +6568,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 @@ -6162,11 +6587,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 @@ -6179,11 +6604,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 @@ -6191,11 +6617,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 @@ -6206,11 +6636,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 @@ -6222,8 +6652,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 @@ -6232,7 +6662,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 @@ -6242,7 +6672,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 @@ -6252,7 +6682,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 @@ -6261,11 +6691,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__ @@ -6274,43 +6705,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 @@ -6344,8 +6780,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 @@ -6379,31 +6815,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;} @@ -6419,7 +6855,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 @@ -6431,11 +6868,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= @@ -6451,17 +6889,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 @@ -6487,11 +6926,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= @@ -6507,17 +6947,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 @@ -6608,10 +7049,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; } @@ -6628,7 +7069,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 @@ -7020,35 +7462,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 @@ -7059,10 +7501,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; } # @@ -7085,7 +7527,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 @@ -7107,17 +7550,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 @@ -7135,13 +7580,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* @@ -7208,23 +7653,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 @@ -7243,13 +7689,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* @@ -7326,9 +7772,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 ;; @@ -7341,9 +7788,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" @@ -7358,9 +7806,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 ;; @@ -7378,7 +7841,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 @@ -7387,9 +7850,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 @@ -7404,15 +7868,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 @@ -7424,7 +7890,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 @@ -7439,8 +7905,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" @@ -7455,11 +7921,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 @@ -7482,19 +7949,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 @@ -7511,17 +7979,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 @@ -7534,25 +8003,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 @@ -7567,11 +8035,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 @@ -7580,7 +8049,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 @@ -7601,9 +8071,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 @@ -7614,17 +8081,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 @@ -7659,9 +8127,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 @@ -7672,17 +8137,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} @@ -7712,17 +8178,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' @@ -7745,7 +8211,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} @@ -7760,10 +8227,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 @@ -7774,7 +8242,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. */ @@ -7782,7 +8250,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} @@ -7797,10 +8266,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 @@ -7811,12 +8281,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' @@ -7824,48 +8294,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 @@ -7924,11 +8394,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 \ @@ -7943,17 +8414,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 @@ -7978,11 +8450,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' @@ -8005,10 +8478,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 @@ -8024,17 +8498,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' @@ -8042,15 +8659,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 @@ -8102,8 +8710,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 #======= @@ -8120,8 +8728,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. */ @@ -8133,14 +8741,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; @@ -8188,8 +8797,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 #======= @@ -8198,8 +8807,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 @@ -8226,8 +8835,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; @@ -8256,11 +8865,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 @@ -8268,11 +8878,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 @@ -8283,11 +8897,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 @@ -8300,11 +8914,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 @@ -8312,11 +8927,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 @@ -8327,11 +8946,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 @@ -8343,8 +8962,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 @@ -8353,7 +8972,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 @@ -8363,7 +8982,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 @@ -8373,7 +8992,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 @@ -8382,11 +9001,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__ @@ -8395,43 +9015,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 @@ -8457,23 +9082,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' @@ -8509,7 +9135,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 @@ -8539,11 +9166,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 @@ -8551,11 +9179,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 @@ -8566,11 +9198,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 @@ -8579,12 +9211,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 @@ -8594,20 +9227,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 @@ -8615,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_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 @@ -8630,11 +9269,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 @@ -8650,22 +9289,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 @@ -8685,10 +9325,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 @@ -8699,21 +9340,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 @@ -8724,20 +9367,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 @@ -8748,14 +9393,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 # # @@ -8767,12 +9413,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 @@ -8803,12 +9449,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 @@ -8818,20 +9465,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 @@ -8839,11 +9488,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 @@ -8854,11 +9507,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 @@ -8869,12 +9522,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 @@ -8884,20 +9538,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 @@ -8905,11 +9561,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 @@ -8920,11 +9580,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 @@ -8939,11 +9599,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 @@ -8951,11 +9612,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 @@ -8966,11 +9631,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 @@ -8984,22 +9649,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 @@ -9035,12 +9701,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 @@ -9076,11 +9742,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 @@ -9088,11 +9755,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 @@ -9103,11 +9774,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 @@ -9116,12 +9787,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 @@ -9131,24 +9803,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 @@ -9156,11 +9830,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 @@ -9171,11 +9849,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 @@ -9192,7 +9870,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 @@ -9207,8 +9886,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. */ @@ -9221,21 +9900,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" @@ -9260,12 +9940,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 @@ -9304,17 +9984,13 @@ 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"` - 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 # @@ -9333,25 +10009,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 @@ -9427,12 +10107,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 @@ -9442,11 +10123,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 @@ -9613,9 +10295,10 @@ DRIVER_INCS="-I$PWD/lib/yambo/Ydriver/include/ -I$PWD/include/driver" # # Check whether --with-ydriver-branch was given. -if test "${with_ydriver_branch+set}" = set; then : +if test ${with_ydriver_branch+y} +then : withval=$with_ydriver_branch; -else +else $as_nop with_ydriver_branch=none fi @@ -9637,7 +10320,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 @@ -9651,11 +10335,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 @@ -9663,11 +10348,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 @@ -9678,11 +10367,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 @@ -9691,11 +10380,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 @@ -9703,11 +10393,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 @@ -9718,11 +10412,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 @@ -9730,8 +10424,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 @@ -9743,14 +10437,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 # @@ -9760,8 +10454,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 # @@ -9775,17 +10469,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 @@ -9803,13 +10499,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* @@ -9876,23 +10572,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 @@ -9911,13 +10608,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* @@ -9994,9 +10691,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 ;; @@ -10009,9 +10707,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" @@ -10026,9 +10725,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 ;; @@ -10046,7 +10760,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 @@ -10055,9 +10769,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 @@ -10072,15 +10787,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 @@ -10092,7 +10809,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 @@ -10107,8 +10824,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" @@ -10124,17 +10841,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 @@ -10142,7 +10862,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 @@ -10167,22 +10888,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 @@ -10191,9 +10913,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 @@ -10202,11 +10925,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 @@ -10214,24 +10938,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 @@ -10239,24 +10966,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 @@ -10264,18 +10994,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 @@ -10288,12 +11020,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 @@ -10301,25 +11034,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 @@ -10327,25 +11063,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 @@ -10353,19 +11092,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 @@ -10377,12 +11118,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 @@ -10390,19 +11132,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 @@ -10410,12 +11154,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 @@ -10423,19 +11168,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 @@ -10444,11 +11191,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 @@ -10456,24 +11204,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 @@ -10481,19 +11232,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 @@ -10505,12 +11258,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 @@ -10518,19 +11272,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 @@ -10538,12 +11294,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 @@ -10551,19 +11308,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 @@ -10571,12 +11330,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 @@ -10584,25 +11344,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 @@ -10610,19 +11373,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 @@ -10638,12 +11403,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 @@ -10651,30 +11417,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 @@ -10682,19 +11451,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 @@ -10706,12 +11477,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 @@ -10719,30 +11491,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 @@ -10750,19 +11525,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 @@ -10773,12 +11550,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 @@ -10786,19 +11564,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 @@ -10809,7 +11589,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 @@ -10819,12 +11599,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 @@ -10889,11 +11669,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 @@ -10924,19 +11705,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 @@ -10961,17 +11743,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 @@ -10984,25 +11767,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 @@ -11016,11 +11798,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 @@ -11029,7 +11812,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 @@ -11050,9 +11834,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 @@ -11071,17 +11852,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 @@ -11116,9 +11898,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 @@ -11137,17 +11916,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 @@ -11177,17 +11957,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' @@ -11201,7 +11981,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 @@ -11227,22 +12008,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="" @@ -11252,9 +12034,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 @@ -11265,12 +12048,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 @@ -11278,19 +12062,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 @@ -11322,22 +12108,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 @@ -11345,7 +12132,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 @@ -11355,12 +12142,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 @@ -11412,52 +12199,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 @@ -11482,10 +12277,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 @@ -11501,16 +12296,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 @@ -11573,22 +12368,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 @@ -11600,18 +12397,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="" @@ -11626,8 +12423,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 @@ -11637,8 +12434,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 # @@ -11648,30 +12445,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)"; @@ -11683,8 +12481,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 # @@ -11693,8 +12491,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 @@ -11731,8 +12529,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 @@ -11758,8 +12556,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 @@ -11780,8 +12578,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 @@ -11795,48 +12593,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 @@ -11845,7 +12643,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" @@ -11867,86 +12665,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 @@ -11969,11 +12780,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 @@ -11982,9 +12794,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 @@ -12003,27 +12812,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 @@ -12058,12 +12869,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 @@ -12106,23 +12917,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 # @@ -12135,8 +12947,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" # @@ -12156,30 +12968,30 @@ $as_echo_n "checking for internal Petsc library... " >&6; } 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 @@ -12206,12 +13018,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 @@ -12250,24 +13062,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 # @@ -12281,8 +13094,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"; # @@ -12300,30 +13113,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"; # @@ -12349,19 +13162,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 @@ -12443,22 +13259,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 @@ -12473,22 +13290,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 @@ -12562,25 +13380,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 @@ -12588,7 +13410,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 @@ -12596,9 +13419,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 @@ -12606,7 +13430,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 @@ -12637,12 +13462,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 @@ -12651,9 +13477,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 @@ -12672,36 +13495,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 @@ -12710,9 +13536,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 @@ -12731,35 +13554,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 @@ -12768,9 +13594,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 @@ -12789,35 +13612,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 @@ -12826,9 +13652,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 @@ -12847,35 +13670,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 @@ -12884,9 +13710,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 @@ -12905,27 +13728,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 @@ -12954,14 +13779,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} @@ -13002,25 +13827,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 @@ -13068,12 +13894,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" ; @@ -13082,10 +13909,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 # @@ -13125,12 +13952,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" ; @@ -13144,13 +13972,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]) ; @@ -13159,12 +13987,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"; @@ -13182,8 +14010,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 # @@ -13191,8 +14019,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 # @@ -13201,8 +14029,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 # @@ -13259,50 +14087,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 @@ -13310,7 +14146,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 @@ -13318,7 +14155,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 @@ -13326,7 +14164,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 @@ -13334,7 +14173,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 @@ -13342,7 +14182,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 @@ -13378,10 +14219,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 @@ -13426,15 +14267,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 # @@ -13459,23 +14300,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" ; @@ -13486,8 +14328,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" # @@ -13513,22 +14355,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 # @@ -13563,12 +14405,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 @@ -13576,8 +14419,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 # @@ -13585,11 +14428,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"; @@ -13608,8 +14451,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 # @@ -13619,8 +14462,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 # @@ -13629,8 +14472,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 # @@ -13712,32 +14555,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 @@ -13746,25 +14594,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 @@ -13787,10 +14639,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 @@ -13809,55 +14661,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 @@ -13881,10 +14733,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 @@ -13903,55 +14755,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 @@ -13977,33 +14829,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 @@ -14024,10 +14881,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 @@ -14047,38 +14904,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/" @@ -14086,14 +14943,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 # @@ -14109,10 +14966,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 # # @@ -14132,33 +14989,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 @@ -14185,10 +15047,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 @@ -14207,50 +15069,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 # @@ -14268,25 +15130,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 @@ -14298,8 +15164,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 @@ -14319,10 +15185,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 @@ -14352,10 +15219,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 @@ -14365,10 +15233,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 @@ -14446,66 +15315,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 @@ -14513,7 +15387,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 @@ -14525,12 +15399,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 @@ -14546,13 +15420,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 @@ -14578,41 +15454,41 @@ CUDA_LIBS="-cudalib=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="-cuda -gpu=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="-cuda -gpu=$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 # @@ -15258,8 +16134,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) ;; #( @@ -15289,15 +16165,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 @@ -15311,8 +16187,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 @@ -15329,7 +16205,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" @@ -15345,8 +16221,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 @@ -15369,14 +16245,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 ;; #( @@ -15386,46 +16264,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 || @@ -15434,13 +16312,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 #(( @@ -15449,8 +16320,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 @@ -15462,30 +16337,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] @@ -15498,13 +16353,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. @@ -15531,18 +16387,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 @@ -15554,12 +16412,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` @@ -15590,7 +16449,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 @@ -15612,6 +16471,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*) @@ -15625,6 +16488,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 @@ -15666,7 +16535,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" @@ -15675,7 +16544,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 @@ -15737,8 +16606,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.23298 h.a65667c3c5, which was -generated by GNU Autoconf 2.69. Invocation command line was +This file was extended by Yambo $as_me 5.2.0 r.23432 h.523f3ec55d, which was +generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -15796,14 +16665,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.2.0 r.23298 h.a65667c3c5 -configured by $0, generated by GNU Autoconf 2.69, +Yambo config.status 5.2.0 r.23432 h.523f3ec55d +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." @@ -15840,15 +16711,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'" @@ -15856,7 +16727,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;; @@ -15865,7 +16736,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=: ;; @@ -15893,7 +16764,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 "\$@" @@ -15907,7 +16778,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 @@ -15947,8 +16818,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 @@ -16284,7 +17155,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 @@ -16292,17 +17163,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 @@ -16319,7 +17190,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 @@ -16343,9 +17214,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/ ;; @@ -16398,8 +17269,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=' @@ -16441,9 +17312,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" @@ -16459,20 +17330,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 @@ -16513,8 +17384,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 # @@ -16656,3 +17527,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 0e30a6db51..e45634694c 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.23432 h.523f3ec55d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23298" -SHASH="a65667c3c5" +SREVISION="23432" +SHASH="523f3ec55d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/modules/pgipar164Jk4g b/src/modules/pgipar164Jk4g deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/modules/pgipar1ZyGlEf b/src/modules/pgipar1ZyGlEf deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/modules/pgipar2A2EZGu b/src/modules/pgipar2A2EZGu deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/modules/pgipar2bwSQPS b/src/modules/pgipar2bwSQPS deleted file mode 100644 index e69de29bb2..0000000000 From 2afbee7435078857a10d29cf50d5fe37e6bd30ab Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 13 Oct 2024 11:02:33 +0200 Subject: [PATCH 107/110] Version 5.2.0, Revision 23437, Hash f6b76ed239 MODIFIED * configure include/version/version.m4 allocations/DOUBLE_project.dep bse/DOUBLE_project.dep matrices/DOUBLE_project.dep Changes: - [configure] DOUBLE_project.dep files updated Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/allocations/DOUBLE_project.dep | 1 + src/bse/DOUBLE_project.dep | 4 ---- src/matrices/DOUBLE_project.dep | 1 + 5 files changed, 16 insertions(+), 18 deletions(-) diff --git a/configure b/configure index dfe9e83289..b94815ddff 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.23432 h.523f3ec55d. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23437 h.f6b76ed239. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23432 h.523f3ec55d' -PACKAGE_STRING='Yambo 5.2.0 r.23432 h.523f3ec55d' +PACKAGE_VERSION='5.2.0 r.23437 h.f6b76ed239' +PACKAGE_STRING='Yambo 5.2.0 r.23437 h.f6b76ed239' 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.23432 h.523f3ec55d to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23437 h.f6b76ed239 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.23432 h.523f3ec55d:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23437 h.f6b76ed239:";; 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.23432 h.523f3ec55d +Yambo configure 5.2.0 r.23437 h.f6b76ed239 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.23432 h.523f3ec55d, which was +It was created by Yambo $as_me 5.2.0 r.23437 h.f6b76ed239, 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="23432" -SHASH="523f3ec55d" +SREVISION="23437" +SHASH="f6b76ed239" @@ -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.23432 h.523f3ec55d, which was +This file was extended by Yambo $as_me 5.2.0 r.23437 h.f6b76ed239, 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.23432 h.523f3ec55d +Yambo config.status 5.2.0 r.23437 h.f6b76ed239 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 e45634694c..35b8c1896b 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23432 h.523f3ec55d, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23437 h.f6b76ed239, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23432" -SHASH="523f3ec55d" +SREVISION="23437" +SHASH="f6b76ed239" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/allocations/DOUBLE_project.dep b/src/allocations/DOUBLE_project.dep index afdda058a6..3be675e3fc 100644 --- a/src/allocations/DOUBLE_project.dep +++ b/src/allocations/DOUBLE_project.dep @@ -1,4 +1,5 @@ ELPH_alloc.o + MPA_ALLOC_parallel.o X_ALLOC_elemental.o X_ALLOC_global.o X_ALLOC_parallel.o 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/matrices/DOUBLE_project.dep b/src/matrices/DOUBLE_project.dep index acd4cc6ff7..4318aba840 100644 --- a/src/matrices/DOUBLE_project.dep +++ b/src/matrices/DOUBLE_project.dep @@ -4,5 +4,6 @@ MATRIX_init.o MATRIX_transfer.o MATRIX_transfer_side_crop.o + MATRIX_transpose.o SLK_matrix_init.o From 40318eb92ccccafa0f4b4589789933266739a654 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 13 Oct 2024 18:52:37 +0200 Subject: [PATCH 108/110] Version 5.2.0, Revision 23299, Hash 4ac9a16be2 MODIFIED * configure include/version/version.m4 modules/mod_global_XC.F qp_control/QP_apply.F real_time_control/RT_apply.F Bugs: - [yambo] Fix imported from maintenance-master Patch sent by: Davide Sangalli --- configure | 22 +++++++------- include/version/version.m4 | 6 ++-- src/modules/mod_global_XC.F | 51 ++++++++++++++------------------ src/qp_control/QP_apply.F | 4 +-- src/real_time_control/RT_apply.F | 4 +-- 5 files changed, 41 insertions(+), 46 deletions(-) diff --git a/configure b/configure index 117b95129a..992bbec9c4 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.23299 h.4ac9a16be2. # # 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.23299 h.4ac9a16be2' +PACKAGE_STRING='Yambo 5.2.0 r.23299 h.4ac9a16be2' 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.23298 h.a65667c3c5 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23299 h.4ac9a16be2 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.23298 h.a65667c3c5:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23299 h.4ac9a16be2:";; 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.23298 h.a65667c3c5 +Yambo configure 5.2.0 r.23299 h.4ac9a16be2 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.23298 h.a65667c3c5, which was +It was created by Yambo $as_me 5.2.0 r.23299 h.4ac9a16be2, 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="23298" -SHASH="a65667c3c5" +SREVISION="23299" +SHASH="4ac9a16be2" @@ -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.23298 h.a65667c3c5, which was +This file was extended by Yambo $as_me 5.2.0 r.23299 h.4ac9a16be2, 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.23298 h.a65667c3c5 +Yambo config.status 5.2.0 r.23299 h.4ac9a16be2 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..9d3ca46fb0 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.23299 h.4ac9a16be2, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23298" -SHASH="a65667c3c5" +SREVISION="23299" +SHASH="4ac9a16be2" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/modules/mod_global_XC.F b/src/modules/mod_global_XC.F index 8bb40f39e2..f6f65f7241 100644 --- a/src/modules/mod_global_XC.F +++ b/src/modules/mod_global_XC.F @@ -111,14 +111,13 @@ module global_XC ! contains ! - subroutine setup_global_XC(what,kind,xc_functional,perturbation,exx_fraction,exx_screening,STRING) + subroutine setup_global_XC(what,kind,xc_functional,perturbation,exx_fraction,exx_screening) character(*) :: what integer :: kind integer, optional :: xc_functional integer, optional :: perturbation real(SP), optional :: exx_fraction real(SP), optional :: exx_screening - character(*), optional :: STRING ! ! Work Space ! @@ -138,33 +137,21 @@ subroutine setup_global_XC(what,kind,xc_functional,perturbation,exx_fraction,ex G_kind=kind G_xc_functional=local_xc_functional G_perturbation=local_perturbation - if (present(STRING)) then - G_E_xc_string=global_XC_string(kind,local_xc_functional,local_perturbation,STRING) - else - G_E_xc_string=global_XC_string(kind,local_xc_functional,local_perturbation) - endif + G_E_xc_string=global_XC_string(kind,local_xc_functional,local_perturbation) endif ! if (what=='X'.or.what=='preset') then X_kind=kind X_xc_functional=local_xc_functional X_perturbation=local_perturbation - if (present(STRING)) then - X_E_xc_string=global_XC_string(kind,local_xc_functional,local_perturbation,STRING) - else - X_E_xc_string=global_XC_string(kind,local_xc_functional,local_perturbation) - endif + X_E_xc_string=global_XC_string(kind,local_xc_functional,local_perturbation) endif ! if (what=='K'.or.what=='preset') then K_kind=kind K_xc_functional=local_xc_functional K_perturbation=local_perturbation - if (present(STRING)) then - K_E_xc_string=global_XC_string(kind,local_xc_functional,local_perturbation,STRING) - else - K_E_xc_string=global_XC_string(kind,local_xc_functional,local_perturbation) - endif + K_E_xc_string=global_XC_string(kind,local_xc_functional,local_perturbation) endif ! if (what=='WF'.or.what=='preset') then @@ -176,11 +163,7 @@ subroutine setup_global_XC(what,kind,xc_functional,perturbation,exx_fraction,ex ! loaded_WF_xc_string represents the xc kind of the WF that are loaded trough wf_load. ! G/X/K/Dipole_WF_xc_string, instead, may be overwritten by the value written in the databases. ! - if (present(STRING)) then - loaded_WF_xc_string=global_XC_string(kind,local_xc_functional,local_perturbation,STRING) - else - loaded_WF_xc_string=global_XC_string(kind,local_xc_functional,local_perturbation) - endif + loaded_WF_xc_string=global_XC_string(kind,local_xc_functional,local_perturbation) ! if (what=='preset') G_WF_xc_string =loaded_WF_xc_string if (what=='preset') X_WF_xc_string =loaded_WF_xc_string @@ -193,14 +176,30 @@ subroutine setup_global_XC(what,kind,xc_functional,perturbation,exx_fraction,ex ! end subroutine ! - character(lchlen) function global_XC_string(kind,xc_functional,perturbation,STRING) + subroutine correct_global_XC(what,STRING) + character(*), intent(in) :: what + character(*), intent(in) :: STRING + ! + ! Work Space + ! + integer :: i_X + ! + 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 + 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 + ! + end subroutine + ! + character(lchlen) function global_XC_string(kind,xc_functional,perturbation) ! use xc_functionals, ONLY:xc_string,XC_CORRELATION ! integer :: kind ! <300 (LDA's GGA's ...) >300 See above integer :: xc_functional ! In case kind < 300 gives DFT functional integer :: perturbation - character(*), optional :: STRING ! Additional string ! integer :: local_kind character(1) :: ch_plus @@ -256,10 +255,6 @@ character(lchlen) function global_XC_string(kind,xc_functional,perturbation,STRI ch_plus='+' if (kind==0.or.len_trim(global_XC_string)==0) ch_plus=' ' ! - if (present(STRING)) then - global_XC_string=trim(global_XC_string)//trim(ch_plus)//STRING - endif - ! if (perturbation/=EXT_NONE) then ch=global_XC_string select case (perturbation) diff --git a/src/qp_control/QP_apply.F b/src/qp_control/QP_apply.F index 72edeab47d..e618015067 100644 --- a/src/qp_control/QP_apply.F +++ b/src/qp_control/QP_apply.F @@ -36,7 +36,7 @@ subroutine QP_apply(bands,en,k,object,msg_fmt,qp_impose,QP_ctl_impose,main_secti use QP_CTL_m, ONLY:QP_actions_reset,n_QP_actions,QP_action,QP_CTL_copy,& & 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:QP_SE_NONE,setup_global_XC + use global_XC, ONLY:correct_global_XC ! #include ! @@ -142,7 +142,7 @@ subroutine QP_apply(bands,en,k,object,msg_fmt,qp_impose,QP_ctl_impose,main_secti ! endif ! - call setup_global_XC(trim(QP_ctl_what),QP_SE_NONE,STRING=QP_ctl_xc_STRING) + call correct_global_XC(trim(QP_ctl_what),QP_ctl_xc_STRING) ! ! Energy corrected? ! diff --git a/src/real_time_control/RT_apply.F b/src/real_time_control/RT_apply.F index 07a9ec47fb..db6d95b7e8 100644 --- a/src/real_time_control/RT_apply.F +++ b/src/real_time_control/RT_apply.F @@ -19,7 +19,7 @@ subroutine RT_apply(bands,E,K,what,VERBOSE,IO_COM,Time,keep_RT_carriers,TIMES_ON use real_time, ONLY:RT_carriers,NE_i_time,RT_step,RT_obj_free use RT_control, ONLY:CARR_RT_IO_t,RT_ctl_db,RT_ctl_interp_neigh use com, ONLY:msg,jobstr,alt_jobstr,n_alt_jobstr,depth,alt_jobdir,jobdir - use global_XC, ONLY:QP_SE_NONE,setup_global_XC + use global_XC, ONLY:correct_global_XC ! implicit none ! @@ -248,6 +248,6 @@ subroutine RT_apply(bands,E,K,what,VERBOSE,IO_COM,Time,keep_RT_carriers,TIMES_ON if (l_E) what_="E" if (l_f) what_="Occ" if (l_W) what_="Widths" - call setup_global_XC(what,QP_SE_NONE,STRING=trim(what_)//"@"//trim(real2ch(local_Time*AUT2FS))//" fs") + call correct_global_XC(what,trim(what_)//"@"//trim(real2ch(local_Time*AUT2FS))//" fs") ! end subroutine From c1e926e11f9417fd31a42e49dd960ec8484957b8 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 13 Oct 2024 19:12:13 +0200 Subject: [PATCH 109/110] Version 5.2.0, Revision 23300, Hash 40318eb92c MODIFIED * configure include/version/version.m4 real_time_initialize/RT_start_and_restart.F Changes: - [yambo_rt] added missing initializations Patch sent by: Davide Sangalli --- configure | 22 +++++++++---------- include/version/version.m4 | 6 ++--- .../RT_start_and_restart.F | 5 ++++- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 992bbec9c4..ad16867007 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.23299 h.4ac9a16be2. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23300 h.40318eb92c. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23299 h.4ac9a16be2' -PACKAGE_STRING='Yambo 5.2.0 r.23299 h.4ac9a16be2' +PACKAGE_VERSION='5.2.0 r.23300 h.40318eb92c' +PACKAGE_STRING='Yambo 5.2.0 r.23300 h.40318eb92c' 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.23299 h.4ac9a16be2 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23300 h.40318eb92c 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.23299 h.4ac9a16be2:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23300 h.40318eb92c:";; 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.23299 h.4ac9a16be2 +Yambo configure 5.2.0 r.23300 h.40318eb92c 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.23299 h.4ac9a16be2, which was +It was created by Yambo $as_me 5.2.0 r.23300 h.40318eb92c, 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="23299" -SHASH="4ac9a16be2" +SREVISION="23300" +SHASH="40318eb92c" @@ -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.23299 h.4ac9a16be2, which was +This file was extended by Yambo $as_me 5.2.0 r.23300 h.40318eb92c, 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.23299 h.4ac9a16be2 +Yambo config.status 5.2.0 r.23300 h.40318eb92c 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 9d3ca46fb0..ddff63c844 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23299 h.4ac9a16be2, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23300 h.40318eb92c, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23299" -SHASH="4ac9a16be2" +SREVISION="23300" +SHASH="40318eb92c" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/real_time_initialize/RT_start_and_restart.F b/src/real_time_initialize/RT_start_and_restart.F index 53ccd06e63..a830e3f636 100644 --- a/src/real_time_initialize/RT_start_and_restart.F +++ b/src/real_time_initialize/RT_start_and_restart.F @@ -35,7 +35,8 @@ subroutine RT_start_and_restart(E,k,q) & RT_P,RT_step,dG_lesser,NE_i_time,RT_dyn_step,& & Gr_kind,l_RT_is_WFfree,RT_TIME_status,RTibz,& & RT_nk,G_lesser,RT_eh_en,G_MEM_steps,RT_bands,& -& NE_time_step_update_jump,l_velocity_gauge_corr +& NE_time_step_update_jump,l_velocity_gauge_corr,& +& RT_P_prev,RT_ind_J_prev use RT_lifetimes, ONLY:RT_life_extrap_times,l_RT_iterative_ELPH_lifetimes use fields, ONLY:A_tot use hamiltonian, ONLY:H_nl_sc,V_hartree_sc,V_xc_sc,E_reference @@ -321,6 +322,8 @@ subroutine RT_local_init() ! RT_P =cZERO RT_ind_J =cZERO + RT_P_prev =cZERO + RT_ind_J_prev =cZERO ! end subroutine ! From 329a2f9ee8b5ef7b227d233d80070b92937eea1b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 13 Oct 2024 19:15:33 +0200 Subject: [PATCH 110/110] Version 5.2.0, Revision 23441, Hash 8e49ace8b0 MODIFIED * configure include/version/version.m4 DELETED * common/pgipar1XQrolt common/pgipar2Yy1LOK Bugs: - [yambo] deleted files not part of the source Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/common/pgipar1XQrolt | 0 src/common/pgipar2Yy1LOK | 0 4 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 src/common/pgipar1XQrolt delete mode 100644 src/common/pgipar2Yy1LOK diff --git a/configure b/configure index ad16867007..2684439414 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.23300 h.40318eb92c. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23441 h.8e49ace8b0. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23300 h.40318eb92c' -PACKAGE_STRING='Yambo 5.2.0 r.23300 h.40318eb92c' +PACKAGE_VERSION='5.2.0 r.23441 h.8e49ace8b0' +PACKAGE_STRING='Yambo 5.2.0 r.23441 h.8e49ace8b0' 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.23300 h.40318eb92c to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23441 h.8e49ace8b0 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.23300 h.40318eb92c:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23441 h.8e49ace8b0:";; 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.23300 h.40318eb92c +Yambo configure 5.2.0 r.23441 h.8e49ace8b0 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.23300 h.40318eb92c, which was +It was created by Yambo $as_me 5.2.0 r.23441 h.8e49ace8b0, 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="23300" -SHASH="40318eb92c" +SREVISION="23441" +SHASH="8e49ace8b0" @@ -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.23300 h.40318eb92c, which was +This file was extended by Yambo $as_me 5.2.0 r.23441 h.8e49ace8b0, 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.23300 h.40318eb92c +Yambo config.status 5.2.0 r.23441 h.8e49ace8b0 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 ddff63c844..7ebd0f43c7 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23300 h.40318eb92c, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23441 h.8e49ace8b0, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23300" -SHASH="40318eb92c" +SREVISION="23441" +SHASH="8e49ace8b0" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/common/pgipar1XQrolt b/src/common/pgipar1XQrolt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/common/pgipar2Yy1LOK b/src/common/pgipar2Yy1LOK deleted file mode 100644 index e69de29bb2..0000000000