Skip to content

Commit afe76ae

Browse files
committed
Routines updated to QE 7.1.
1 parent b629f07 commit afe76ae

32 files changed

+719
-581
lines changed

Doc/user_guide.tex

+1
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@
237237
\hline
238238
\thermo\ & \qe & release date \\
239239
\hline
240+
1.7.0 & 7.1 & 05/07/2022 \\
240241
1.7.0 & 7.0 & 05/07/2022 \\
241242
1.6.1 & 7.0 & 10/01/2022 \\
242243
1.6.0 & 6.8 & 27/12/2021 \\

main_CMakeLists.txt

+68-167
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1313
set(CMAKE_POLICY_DEFAULT_CMP0048 NEW)
1414

1515
project(qe
16-
VERSION 7.0
16+
VERSION 7.1
1717
DESCRIPTION "ESPRESSO: opEn-Source Package for Research in Electronic Structure, Simulation, and Optimization"
1818
LANGUAGES Fortran C)
1919

@@ -68,8 +68,6 @@ option(QE_ENABLE_CUDA
6868
"enable CUDA acceleration on NVIDIA GPUs" OFF)
6969
if(QE_ENABLE_CUDA)
7070
option(QE_ENABLE_OPENACC "enable OpenACC acceleration" ON)
71-
option(QE_ENABLE_LAXLIB_CUSOLVER
72-
"enable CUDA solver acceleration for LAXLib on NVIDIA GPUs" ON)
7371
# OpenMP enabled by default if CUDA is enable
7472
option(QE_ENABLE_OPENMP
7573
"enable distributed execution support via OpenMP" ON)
@@ -100,6 +98,9 @@ option(QE_LAPACK_INTERNAL
10098
"enable internal reference LAPACK" OFF)
10199
option(QE_ENABLE_SCALAPACK
102100
"enable SCALAPACK execution units" OFF)
101+
cmake_dependent_option(QE_ENABLE_SCALAPACK_QRCP
102+
"enable SCALAPACK QRCP in pw2wannier90 (requires SCALAPACK>=2.1.0 or Intel MKL>=2020)"
103+
OFF "QE_ENABLE_SCALAPACK" OFF)
103104
option(QE_ENABLE_ELPA
104105
"enable ELPA execution units" OFF)
105106
option(QE_ENABLE_LIBXC
@@ -113,6 +114,34 @@ option(QE_ENABLE_DOC
113114
set(QE_FFTW_VENDOR "AUTO" CACHE
114115
STRING "select a specific FFTW library [Intel_DFTI, Intel_FFTW3, ArmPL, IBMESSL, FFTW3, Internal]")
115116
set(QE_ENABLE_SANITIZER "none" CACHE STRING "none,asan,ubsan,tsan,msan")
117+
set(QE_ENABLE_PLUGINS "" CACHE STRING "Semicolon-separated list of plugins")
118+
if(FOX_ROOT)
119+
set(QE_FOX_INTERNAL OFF)
120+
endif()
121+
option(QE_FOX_INTERNAL
122+
"enable FoX intenal library" ON)
123+
if(WANNIER90_ROOT)
124+
set(QE_WANNIER90_INTERNAL OFF)
125+
endif()
126+
option(QE_WANNIER90_INTERNAL
127+
"enable Wannier90 intenal library" ON)
128+
if(MBD_ROOT)
129+
set(QE_MBD_INTERNAL OFF)
130+
endif()
131+
option(QE_MBD_INTERNAL
132+
"enable LibMBD intenal library" ON)
133+
if(DEVICEXLIB_ROOT)
134+
set(QE_DEVICEXLIB_INTERNAL OFF)
135+
endif()
136+
option(QE_DEVICEXLIB_INTERNAL
137+
"enable DeviceXlib intenal library" ON)
138+
if(ENVIRON_ROOT)
139+
set(ENVIRON_DEFAULT "EXTERNAL")
140+
else()
141+
set(ENVIRON_DEFAULT "NO")
142+
endif()
143+
set(QE_ENABLE_ENVIRON "${ENVIRON_DEFAULT}" CACHE
144+
STRING "select a specific Environ library [NO, EXTERNAL, INTERNAL]")
116145

117146
# TODO change all ifdefs throughout code base to match
118147
# cmake options
@@ -156,6 +185,9 @@ endif()
156185
if(QE_ENABLE_HDF5)
157186
qe_add_global_compile_definitions(__HDF5)
158187
endif()
188+
if(QE_ENABLE_ENVIRON)
189+
qe_add_global_compile_definitions(__ENVIRON)
190+
endif()
159191

160192
# Feature checks
161193
check_function_exists(mallinfo HAVE_MALLINFO)
@@ -182,9 +214,6 @@ endif()
182214
if(QE_ENABLE_MPI_GPU_AWARE AND NOT (QE_ENABLE_CUDA AND QE_ENABLE_MPI))
183215
message(FATAL_ERROR "GPU aware MPI requires both MPI and CUDA features enabled")
184216
endif()
185-
if(QE_ENABLE_LAXLIB_CUSOLVER AND (NOT QE_ENABLE_CUDA))
186-
message(FATAL_ERROR "CUDA Solver for LAXLib requires CUDA support, enable it with '-DQE_ENABLE_CUDA=ON' or disable CUDA Solver for LAXLib with '-DQE_ENABLE_LAXLIB_CUSOLVER=OFF'")
187-
endif()
188217
# if(QE_ENABLE_HDF5 AND NOT QE_ENABLE_MPI)
189218
# message(FATAL_ERROR "HDF5 requires MPI support, enable it with '-DQE_ENABLE_MPI=ON' or disable HDF5 with '-DQE_ENABLE_HDF5=OFF'")
190219
# endif()
@@ -202,6 +231,16 @@ if(NOT QE_ENABLE_SANITIZER STREQUAL "none" AND NOT CMAKE_Fortran_COMPILER_ID MAT
202231
message(FATAL_ERROR "-DQE_ENABLE_SANITIZER=${QE_ENABLE_SANITIZER} only works with the GNU compiler")
203232
endif()
204233

234+
# valid plugins checks
235+
set(VALID_QE_PLUGINS "d3q" "pw2qmcpack")
236+
# Perform sanitizer option check, only works in debug mode
237+
foreach(PLUGIN IN LISTS QE_ENABLE_PLUGINS)
238+
if(NOT PLUGIN IN_LIST VALID_QE_PLUGINS)
239+
message(FATAL_ERROR "Invalid QE plugin ${PLUGIN}, value must be one of \"${VALID_QE_PLUGINS}\".")
240+
else()
241+
message(STATUS "Enable QE plugin ${PLUGIN}")
242+
endif()
243+
endforeach()
205244

206245
############################################################
207246
# C preprocessor
@@ -315,8 +354,8 @@ if(QE_ENABLE_OPENACC)
315354
target_link_libraries(qe_openacc_fortran INTERFACE OpenACC::OpenACC_Fortran)
316355
target_link_libraries(qe_openacc_c INTERFACE OpenACC::OpenACC_C)
317356
if(GPU_TARGET_COMPILE_OPTIONS)
318-
target_compile_options(qe_openacc_fortran INTERFACE "${GPU_TARGET_COMPILE_OPTIONS}")
319-
target_compile_options(qe_openacc_c INTERFACE "${GPU_TARGET_COMPILE_OPTIONS}")
357+
target_compile_options(qe_openacc_fortran INTERFACE "$<$<COMPILE_LANGUAGE:Fortran>:${GPU_TARGET_COMPILE_OPTIONS}>")
358+
target_compile_options(qe_openacc_c INTERFACE "$<$<COMPILE_LANGUAGE:C>:${GPU_TARGET_COMPILE_OPTIONS}>")
320359
endif()
321360
endif(QE_ENABLE_OPENACC)
322361

@@ -448,6 +487,18 @@ if(QE_ENABLE_SCALAPACK)
448487
INTERFACE
449488
${SCALAPACK_LIBRARIES}
450489
${SCALAPACK_LINKER_FLAGS})
490+
if(QE_ENABLE_SCALAPACK_QRCP)
491+
include(CheckFortranFunctionExists)
492+
set(CMAKE_REQUIRED_LIBRARIES "${SCALAPACK_LIBRARIES}")
493+
check_fortran_function_exists("pzgeqpf" SCALAPACK_PZGEQPF_WORKS)
494+
unset(CMAKE_REQUIRED_LIBRARIES)
495+
if(SCALAPACK_PZGEQPF_WORKS)
496+
message(STATUS "Found pzgeqpf, add ScaLAPACK pzgeqpf macro")
497+
qe_add_global_compile_definitions(__SCALAPACK_QRCP)
498+
else()
499+
message(FATAL_ERROR "QE_ENABLE_SCALAPACK_QRCP requested but the current ScaLAPACK installation doesn't contain pzgeqpf!")
500+
endif()
501+
endif()
451502
endif(QE_ENABLE_SCALAPACK)
452503

453504
###########################################################
@@ -544,8 +595,7 @@ if(QE_ENABLE_HDF5)
544595

545596
target_link_libraries(qe_hdf5_fortran
546597
INTERFACE
547-
${HDF5_Fortran_LIBRARIES}
548-
${HDF5_Fortran_HL_LIBRARIES})
598+
${HDF5_Fortran_LIBRARIES})
549599
target_include_directories(qe_hdf5_fortran
550600
INTERFACE
551601
${HDF5_Fortran_INCLUDE_DIRS})
@@ -555,8 +605,7 @@ if(QE_ENABLE_HDF5)
555605

556606
target_link_libraries(qe_hdf5_c
557607
INTERFACE
558-
${HDF5_C_LIBRARIES}
559-
${HDF5_C_HL_LIBRARIES})
608+
${HDF5_C_LIBRARIES})
560609
target_include_directories(qe_hdf5_c
561610
INTERFACE
562611
${HDF5_C_INCLUDE_DIRS})
@@ -616,6 +665,8 @@ add_subdirectory(PWCOND)
616665
add_subdirectory(TDDFPT)
617666
add_subdirectory(XSpectra)
618667
add_subdirectory(QEHeat)
668+
add_subdirectory(KCW)
669+
add_subdirectory(GUI)
619670
add_subdirectory(thermo_pw)
620671
if(QE_ENABLE_DOC)
621672
add_subdirectory(Doc)
@@ -674,86 +725,10 @@ add_custom_target(depgraph
674725
###########################################################
675726
# Custom make targets
676727
###########################################################
677-
add_custom_target(pw
678-
DEPENDS
679-
qe_pw_exe
680-
qe_pw_tools_ibrav2cell_exe
681-
qe_pw_tools_cell2ibrav_exe
682-
qe_pw_tools_ev_exe
683-
qe_pw_tools_kpoints_exe
684-
qe_pw_tools_pwi2xsf_exe
685-
COMMENT
686-
"basic code for scf, structure optimization, MD")
687-
688-
add_custom_target(ph
689-
DEPENDS
690-
qe_phonon_ph_exe
691-
qe_phonon_dynmat_exe
692-
qe_phonon_q2r_exe
693-
qe_phonon_dvscf_q2r_exe
694-
qe_phonon_matdyn_exe
695-
qe_phonon_q2qstar_exe
696-
qe_phonon_lambda_exe
697-
qe_phonon_alpha2f_exe
698-
qe_phonon_epa_exe
699-
qe_phonon_fqha_exe
700-
qe_phonon_fd_exe
701-
qe_phonon_fdef_exe
702-
qe_phonon_fdifc_exe
703-
qe_phonon_postahc_exe
704-
COMMENT
705-
"phonon code, Gamma-only and third-order derivatives")
706-
707-
add_custom_target(hp
708-
DEPENDS
709-
qe_hp_exe
710-
COMMENT
711-
"calculation of the Hubbard parameters from DFPT")
712-
713-
add_custom_target(pwcond
714-
DEPENDS
715-
qe_pwcond_exe
716-
COMMENT
717-
"ballistic conductance")
718-
719-
add_custom_target(neb
720-
DEPENDS
721-
qe_neb_exe
722-
qe_neb_pathinterpolation_exe
723-
COMMENT
724-
"code for Nudged Elastic Band method")
725-
726-
add_custom_target(pp
727-
DEPENDS
728-
qe_pp_exe
729-
qe_pp_opengrid_exe
730-
qe_pp_average_exe
731-
qe_pp_bands_exe
732-
qe_pp_dos_exe
733-
qe_pp_pawplot_exe
734-
qe_pp_planavg_exe
735-
qe_pp_plotband_exe
736-
qe_pp_plotproj_exe
737-
qe_pp_plotrho_exe
738-
qe_pp_pmw_exe
739-
qe_pp_projwfc_exe
740-
qe_pp_pw2wannier90_exe
741-
qe_pp_pw2critic_exe
742-
qe_pp_wfck2r_exe
743-
qe_pp_initial_state_exe
744-
qe_pp_pw2gw_exe
745-
qe_pp_sumpdos_exe
746-
qe_pp_epsilon_exe
747-
qe_pp_wannierham_exe
748-
qe_pp_wannierplot_exe
749-
qe_pp_molecularpdos_exe
750-
qe_pp_pw2bgw_exe
751-
qe_pp_fermivelocity_exe
752-
qe_pp_fermisurface_exe
753-
qe_pp_fermiproj_exe
754-
qe_pp_ppacf_exe
755-
COMMENT
756-
"postprocessing programs")
728+
# The collection 'pwall' is defined here
729+
# Each of the followings is defined inside its subdirectory
730+
# pw ph pp hp pwcond neb cp tddfpt gwl ld1 upf epw
731+
# xspectra couple all_currents
757732

758733
add_custom_target(thermo_pw
759734
DEPENDS
@@ -810,78 +785,4 @@ add_custom_target(pwall
810785
thermo_pw
811786
tpw_tools
812787
COMMENT
813-
"same as \"make pw ph pp pwcond neb\"")
814-
815-
add_custom_target(cp
816-
DEPENDS
817-
qe_cpv_exe
818-
qe_cpv_manycp_exe
819-
qe_cpv_cppp_exe
820-
qe_cpv_wfdd_exe
821-
COMMENT
822-
"CP code: Car-Parrinello molecular dynamics")
823-
824-
add_custom_target(tddfpt
825-
DEPENDS
826-
qe_tddfpt_turbolanczos_exe
827-
qe_tddfpt_turbodavidson_exe
828-
qe_tddfpt_turboeels_exe
829-
qe_tddfpt_turbospectrum_exe
830-
qe_tddfpt_turbomagnons_exe
831-
COMMENT
832-
"time dependent dft code")
833-
834-
add_custom_target(gwl
835-
DEPENDS
836-
qe_gww_util_grap_exe
837-
qe_gww_util_abcoefftoeps_exe
838-
qe_gww_util_memorypw4gww_exe
839-
qe_gww_bse_bse_main_exe
840-
qe_gww_gww_exe
841-
qe_gww_gww_fit_exe
842-
qe_gww_head_exe
843-
qe_gww_simple_bse_exe
844-
qe_gww_simple_ip_exe
845-
COMMENT
846-
"GW with Lanczos chains")
847-
848-
add_custom_target(ld1
849-
DEPENDS
850-
qe_atomic_exe
851-
COMMENT
852-
"utilities for pseudopotential generation")
853-
854-
add_custom_target(upf
855-
DEPENDS
856-
#Library
857-
qe_upflib
858-
#Executables
859-
qe_upflib_virtual_v2_exe
860-
qe_upflib_upfconv_exe
861-
COMMENT
862-
"utilities for pseudopotential conversion")
863-
864-
add_custom_target(xspectra
865-
DEPENDS
866-
qe_xspectra_exe
867-
qe_xspectra_spectracorrection_exe
868-
qe_xspectra_molecularnexafs_exe
869-
COMMENT
870-
"X-ray core-hole spectroscopy calculations")
871-
872-
add_custom_target(couple
873-
DEPENDS
874-
qe_couple
875-
COMMENT
876-
"library interface for coupling to external codes")
877-
878-
add_custom_target(epw
879-
DEPENDS
880-
qe_epw_exe
881-
COMMENT
882-
"electron-Phonon Coupling with wannier functions")
883-
add_custom_target(all_currents
884-
DEPENDS
885-
qe_qeheat_exe
886-
COMMENT
887-
"QEHeat code to compute energy and electronic density currents")
788+
"same as \"make pw ph pp pwcond neb thermo_pw\"")

qe/c_bands_tpw.f90

+10-5
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ SUBROUTINE c_bands_nscf_tpw( )
3737
iverbosity, use_gpu
3838
USE save_ph, ONLY : tmp_dir_save
3939
USE io_files, ONLY : tmp_dir, prefix
40-
USE ldaU, ONLY : lda_plus_u, lda_plus_u_kind, U_projection, &
41-
wfcU
40+
USE ldaU, ONLY : lda_plus_u, lda_plus_u_kind, &
41+
hubbard_projectors, wfcU
4242
USE lsda_mod, ONLY : current_spin, lsda, isk
4343
USE wavefunctions, ONLY : evc
4444
USE control_lr, ONLY : lgamma
@@ -102,6 +102,8 @@ SUBROUTINE c_bands_nscf_tpw( )
102102
WRITE( stdout, '(5X,"PPCG style diagonalization")' )
103103
ELSEIF ( isolve == 3 ) THEN
104104
WRITE( stdout, '(5X,"ParO style diagonalization")')
105+
ELSEIF ( isolve == 4 ) THEN
106+
WRITE( stdout, '(5X,"RMM-DIIS diagonalization")')
105107
ELSE
106108
CALL errore ( 'c_bands', 'invalid type of diagonalization', isolve )
107109
ENDIF
@@ -141,9 +143,10 @@ SUBROUTINE c_bands_nscf_tpw( )
141143
!
142144
IF ( nkb > 0 ) CALL init_us_2( ngk(ik), igk_k(1,ik), xk(1,ik), vkb, .TRUE. )
143145
!
144-
! ... Needed for LDA+U
146+
! ... Needed for DFT+Hubbard
145147
!
146-
IF ( nks > 1 .AND. lda_plus_u .AND. (U_projection .NE. 'pseudo') ) &
148+
IF ( nks > 1 .AND. lda_plus_u .AND. &
149+
(hubbard_projectors .NE. 'pseudo') ) &
147150
CALL get_buffer ( wfcU, nwordwfcU, iunhub, ik )
148151
!
149152
! ... calculate starting wavefunctions
@@ -192,7 +195,7 @@ SUBROUTINE c_bands_nscf_tpw( )
192195
IF ( io_level > -1 ) CALL save_buffer ( evc, nwordwfc, iunwfc, ik )
193196
!
194197
!
195-
IF (ik_diago .LE. nkdum) THEN
198+
IF (ik_diago <= nkdum) THEN
196199
!
197200
! ... stop requested by user: save restart information,
198201
! ... save wavefunctions to file
@@ -527,7 +530,9 @@ SUBROUTINE compute_gk(xk, xk_orig, s, t_rev, gk)
527530
RETURN
528531
END SUBROUTINE compute_gk
529532

533+
!---------------------------------------------------------------------
530534
SUBROUTINE rotate_and_save_psic(psic, evcr, aux_xk, ik, ikk, iko)
535+
!---------------------------------------------------------------------
531536
!
532537
! Input variables: psic with the wavefunction to rotate in real space
533538
! evcr : where the rotated function is written in reciprocal space

0 commit comments

Comments
 (0)