diff --git a/cmake/CompilerConfiguration.cmake b/cmake/CompilerConfiguration.cmake index 86d5fb0efb..c6c22850f4 100644 --- a/cmake/CompilerConfiguration.cmake +++ b/cmake/CompilerConfiguration.cmake @@ -141,6 +141,7 @@ add_link_options("$<$:-fsanitize=address>") # Baseline add_compile_options( + "$<$:-g;-traceback>" "$<$:-free;-stand;f08;-fpp;-qopenmp;-heap-arrays;-D__MAX_CONTR=4>" "$<$:-fp-model;consistent;-fpscomp;logicals>" "$<$:-free;-stand;f08;-fpp;-qopenmp;-D__MAX_CONTR=4>" @@ -149,11 +150,10 @@ add_compile_options( # Release add_compile_options( - "$<$,$>:-O3;-xHOST;-g;-D__HAS_IEEE_EXCEPTIONS>" - "$<$,$>:-O2;-xHOST;-g;-D__HAS_IEEE_EXCEPTIONS>" - "$<$,$>:-O3;-xHOST;-g>" - "$<$,$>:-O3;-xHOST;-g>" -) + "$<$,$>:-O3;-xHOST;-D__HAS_IEEE_EXCEPTIONS>" + "$<$,$>:-O2;-xHOST;-D__HAS_IEEE_EXCEPTIONS>" + "$<$,$>:-O3;-xHOST>" + "$<$,$>:-O3;-xHOST>") # Debug add_compile_options( diff --git a/src/core_ppl.F b/src/core_ppl.F index f251882a71..c1041e16d2 100644 --- a/src/core_ppl.F +++ b/src/core_ppl.F @@ -189,7 +189,11 @@ CONTAINS dokp = (nimages > 1) IF (dokp) THEN - CPASSERT(PRESENT(cell_to_index) .AND. ASSOCIATED(cell_to_index)) + IF (PRESENT(cell_to_index)) THEN + CPASSERT(ASSOCIATED(cell_to_index)) + ELSE + CPABORT("Missing cell_to_index for k-point calculation") + END IF END IF IF (calculate_forces .OR. doat) THEN diff --git a/src/core_ppnl.F b/src/core_ppnl.F index e400cc8454..1dc860126e 100644 --- a/src/core_ppnl.F +++ b/src/core_ppnl.F @@ -184,7 +184,11 @@ CONTAINS do_kp = (nimages > 1) IF (do_kp) THEN - CPASSERT(PRESENT(cell_to_index) .AND. ASSOCIATED(cell_to_index)) + IF (PRESENT(cell_to_index)) THEN + CPASSERT(ASSOCIATED(cell_to_index)) + ELSE + CPABORT("Missing cell_to_index for k-point calculation") + END IF END IF IF (calculate_forces .OR. doat) THEN diff --git a/src/emd/rt_bse.F b/src/emd/rt_bse.F index edf0e77fb9..c3df81dd4b 100644 --- a/src/emd/rt_bse.F +++ b/src/emd/rt_bse.F @@ -1398,11 +1398,13 @@ CONTAINS END IF NULLIFY (work) - IF (PRESENT(work_opt) .AND. SIZE(work_opt) >= 4) THEN - deallocate_work = .FALSE. + deallocate_work = .TRUE. + IF (PRESENT(work_opt)) THEN + deallocate_work = SIZE(work_opt) < 4 + END IF + IF (.NOT. deallocate_work) THEN work => work_opt ELSE - deallocate_work = .TRUE. ALLOCATE (work(4)) ! Allocate the work storage on the fly DO i = 1, 4 diff --git a/src/motion/cp_lbfgs.F b/src/motion/cp_lbfgs.F index ac43876087..8d245095e5 100644 --- a/src/motion/cp_lbfgs.F +++ b/src/motion/cp_lbfgs.F @@ -224,7 +224,9 @@ CONTAINS ! * * * wunit = default_output_unit - IF (PRESENT(iwunit) .AND. iwunit > 0) wunit = iwunit + IF (PRESENT(iwunit)) THEN + IF (iwunit > 0) wunit = iwunit + END IF IF (task == 'START') THEN CALL cite_reference(Byrd1995) @@ -450,7 +452,9 @@ CONTAINS ! * * * wunit = default_output_unit - IF (PRESENT(iwunit) .AND. iwunit > 0) wunit = iwunit + IF (PRESENT(iwunit)) THEN + IF (iwunit > 0) wunit = iwunit + END IF keep_space_group = .FALSE. IF (PRESENT(spgr)) THEN @@ -1047,7 +1051,9 @@ CONTAINS INTEGER :: i, nbdd, wunit wunit = default_output_unit - IF (PRESENT(iwunit) .AND. iwunit > 0) wunit = iwunit + IF (PRESENT(iwunit)) THEN + IF (iwunit > 0) wunit = iwunit + END IF ! ************ ! Initialize nbdd, x_projected, constrained and boxed. @@ -1307,7 +1313,9 @@ CONTAINS tu, wmc, wmp, wmw, zibp wunit = default_output_unit - IF (PRESENT(iwunit) .AND. iwunit > 0) wunit = iwunit + IF (PRESENT(iwunit)) THEN + IF (iwunit > 0) wunit = iwunit + END IF ! References: ! @@ -2155,7 +2163,9 @@ CONTAINS INTEGER :: i, iact, k, wunit wunit = default_output_unit - IF (PRESENT(iwunit) .AND. iwunit > 0) wunit = iwunit + IF (PRESENT(iwunit)) THEN + IF (iwunit > 0) wunit = iwunit + END IF nenter = 0 ileave = n + 1 @@ -2373,7 +2383,9 @@ CONTAINS REAL(KIND=dp) :: a1, a2, ddot wunit = default_output_unit - IF (PRESENT(iwunit) .AND. iwunit > 0) wunit = iwunit + IF (PRESENT(iwunit)) THEN + IF (iwunit > 0) wunit = iwunit + END IF IF (.NOT. (task(1:5) == 'FG_LN')) THEN @@ -2583,7 +2595,9 @@ CONTAINS INTEGER :: i, wunit wunit = default_output_unit - IF (PRESENT(iwunit) .AND. iwunit > 0) wunit = iwunit + IF (PRESENT(iwunit)) THEN + IF (iwunit > 0) wunit = iwunit + END IF IF (iprint >= 0) THEN WRITE (wunit, 7001) epsmch @@ -2670,7 +2684,9 @@ CONTAINS INTEGER :: i, imod, wunit wunit = default_output_unit - IF (PRESENT(iwunit) .AND. iwunit > 0) wunit = iwunit + IF (PRESENT(iwunit)) THEN + IF (iwunit > 0) wunit = iwunit + END IF ! 'word' records the status of subspace solutions. @@ -2768,7 +2784,9 @@ CONTAINS INTEGER :: i, wunit wunit = default_output_unit - IF (PRESENT(iwunit) .AND. iwunit > 0) wunit = iwunit + IF (PRESENT(iwunit)) THEN + IF (iwunit > 0) wunit = iwunit + END IF IF (iprint >= 0 .AND. .NOT. (task(1:5) == 'ERROR')) THEN WRITE (wunit, 3003) @@ -3059,7 +3077,9 @@ CONTAINS ! wunit = default_output_unit - IF (PRESENT(iwunit) .AND. iwunit > 0) wunit = iwunit + IF (PRESENT(iwunit)) THEN + IF (iwunit > 0) wunit = iwunit + END IF IF (nsub <= 0) RETURN IF (iprint >= 99) WRITE (wunit, 4001) diff --git a/src/motion/dimer_types.F b/src/motion/dimer_types.F index f43eb8aca9..840a3acc4a 100644 --- a/src/motion/dimer_types.F +++ b/src/motion/dimer_types.F @@ -309,9 +309,11 @@ CONTAINS nfixd=nfixed_atoms, & fixd_list=fixd_list) IF (ASSOCIATED(fixd_list)) THEN - IF (PRESENT(unit) .AND. unit > 0) THEN - WRITE (unit, "(/,T2,A,T9,A,T71,I10)") & - "DIMER|", "Number of fixed atoms to adjust dimer vector", nfixed_atoms + IF (PRESENT(unit)) THEN + IF (unit > 0) THEN + WRITE (unit, "(/,T2,A,T9,A,T71,I10)") & + "DIMER|", "Number of fixed atoms to adjust dimer vector", nfixed_atoms + END IF END IF DO ii = 1, nfixed_atoms IF (.NOT. fixd_list(ii)%restraint%active) THEN diff --git a/src/negf_io.F b/src/negf_io.F index 88061d2ccf..b85cbc7331 100644 --- a/src/negf_io.F +++ b/src/negf_io.F @@ -91,84 +91,110 @@ CONTAINS exist = .FALSE. - WRITE (string1, *) icontact - WRITE (string2, *) ispin - - ! try to read from the filename that is generated automatically from the printkey - contact_section => section_vals_get_subs_vals(negf_section, "CONTACT") - print_key => section_vals_get_subs_vals(contact_section, "RESTART", i_rep_section=icontact) - - IF (my_h00) THEN - IF (ispin == 0) THEN - middle_name = "N"//TRIM(string1)//"-H00" - ELSE - middle_name = "N"//TRIM(string1)//"-H00-S"//TRIM(string2) + IF (my_h00 .OR. my_h01 .OR. my_s00 .OR. my_s01) THEN + IF (.NOT. PRESENT(icontact)) THEN + CPABORT("Missing contact index for NEGF restart filename") END IF - filename = negf_generate_filename(logger, print_key, middle_name=middle_name, & - extension=".hs", my_local=.FALSE.) - END IF + WRITE (string1, *) icontact - IF (my_h01) THEN - IF (ispin == 0) THEN - middle_name = "N"//TRIM(string1)//"-H01" - ELSE - middle_name = "N"//TRIM(string1)//"-H01-S"//TRIM(string2) + IF (my_h00 .OR. my_h01) THEN + IF (.NOT. PRESENT(ispin)) THEN + CPABORT("Missing spin index for NEGF restart filename") + END IF + WRITE (string2, *) ispin END IF - filename = negf_generate_filename(logger, print_key, middle_name=middle_name, & - extension=".hs", my_local=.FALSE.) - END IF - IF (my_s00) THEN - middle_name = "N"//TRIM(string1)//"-S00" - filename = negf_generate_filename(logger, print_key, middle_name=middle_name, & - extension=".hs", my_local=.FALSE.) - END IF + ! Try to read from the filename that is generated automatically from the print key. + contact_section => section_vals_get_subs_vals(negf_section, "CONTACT") + print_key => section_vals_get_subs_vals(contact_section, "RESTART", i_rep_section=icontact) - IF (my_s01) THEN - middle_name = "N"//TRIM(string1)//"-S01" - filename = negf_generate_filename(logger, print_key, middle_name=middle_name, & - extension=".hs", my_local=.FALSE.) - END IF - - ! try to read from the filename that is generated automatically from the printkey - print_key => section_vals_get_subs_vals(negf_section, "SCATTERING_REGION%RESTART") - - IF (my_h) THEN - IF (ispin == 0) THEN - middle_name = "Hs" - ELSE - middle_name = "Hs-S"//TRIM(string2) + IF (my_h00) THEN + IF (ispin == 0) THEN + middle_name = "N"//TRIM(string1)//"-H00" + ELSE + middle_name = "N"//TRIM(string1)//"-H00-S"//TRIM(string2) + END IF + filename = negf_generate_filename(logger, print_key, middle_name=middle_name, & + extension=".hs", my_local=.FALSE.) END IF - filename = negf_generate_filename(logger, print_key, middle_name=middle_name, & - extension=".hs", my_local=.FALSE.) - END IF - IF (my_s) THEN - middle_name = "Ss" - filename = negf_generate_filename(logger, print_key, middle_name=middle_name, & - extension=".hs", my_local=.FALSE.) - END IF - - IF (my_hc) THEN - IF (ispin == 0) THEN - middle_name = "Hsc-N"//TRIM(string1) - ELSE - middle_name = "Hsc-N"//TRIM(string1)//"-S"//TRIM(string2) + IF (my_h01) THEN + IF (ispin == 0) THEN + middle_name = "N"//TRIM(string1)//"-H01" + ELSE + middle_name = "N"//TRIM(string1)//"-H01-S"//TRIM(string2) + END IF + filename = negf_generate_filename(logger, print_key, middle_name=middle_name, & + extension=".hs", my_local=.FALSE.) + END IF + + IF (my_s00) THEN + middle_name = "N"//TRIM(string1)//"-S00" + filename = negf_generate_filename(logger, print_key, middle_name=middle_name, & + extension=".hs", my_local=.FALSE.) + END IF + + IF (my_s01) THEN + middle_name = "N"//TRIM(string1)//"-S01" + filename = negf_generate_filename(logger, print_key, middle_name=middle_name, & + extension=".hs", my_local=.FALSE.) END IF - filename = negf_generate_filename(logger, print_key, middle_name=middle_name, & - extension=".hs", my_local=.FALSE.) END IF - IF (my_sc) THEN - middle_name = "Ssc-N"//TRIM(string1) - filename = negf_generate_filename(logger, print_key, middle_name=middle_name, & - extension=".hs", my_local=.FALSE.) - END IF + IF (my_h .OR. my_s .OR. my_hc .OR. my_sc) THEN + IF (my_h .OR. my_hc) THEN + IF (.NOT. PRESENT(ispin)) THEN + CPABORT("Missing spin index for NEGF restart filename") + END IF + WRITE (string2, *) ispin + END IF - ! try to read from the filename that is generated automatically from the printkey - print_key => section_vals_get_subs_vals(negf_section, "PRINT%RESTART") + IF (my_hc .OR. my_sc) THEN + IF (.NOT. PRESENT(icontact)) THEN + CPABORT("Missing contact index for NEGF restart filename") + END IF + WRITE (string1, *) icontact + END IF + + ! Try to read from the filename that is generated automatically from the print key. + print_key => section_vals_get_subs_vals(negf_section, "SCATTERING_REGION%RESTART") + + IF (my_h) THEN + IF (ispin == 0) THEN + middle_name = "Hs" + ELSE + middle_name = "Hs-S"//TRIM(string2) + END IF + filename = negf_generate_filename(logger, print_key, middle_name=middle_name, & + extension=".hs", my_local=.FALSE.) + END IF + + IF (my_s) THEN + middle_name = "Ss" + filename = negf_generate_filename(logger, print_key, middle_name=middle_name, & + extension=".hs", my_local=.FALSE.) + END IF + + IF (my_hc) THEN + IF (ispin == 0) THEN + middle_name = "Hsc-N"//TRIM(string1) + ELSE + middle_name = "Hsc-N"//TRIM(string1)//"-S"//TRIM(string2) + END IF + filename = negf_generate_filename(logger, print_key, middle_name=middle_name, & + extension=".hs", my_local=.FALSE.) + END IF + + IF (my_sc) THEN + middle_name = "Ssc-N"//TRIM(string1) + filename = negf_generate_filename(logger, print_key, middle_name=middle_name, & + extension=".hs", my_local=.FALSE.) + END IF + END IF IF (my_h_scf) THEN + ! Try to read from the filename that is generated automatically from the print key. + print_key => section_vals_get_subs_vals(negf_section, "PRINT%RESTART") filename = negf_generate_filename(logger, print_key, & extension="", my_local=.FALSE., iter_string=.TRUE.) END IF @@ -252,14 +278,15 @@ CONTAINS root = outPath(1:my_ind1)//my_middle_name(2:LEN_TRIM(my_middle_name)) END IF - IF (PRESENT(iter_string) .AND. iter_string) THEN - ! use the cp_iter_string as a postfix - postfix = "-"//TRIM(cp_iter_string(logger%iter_info, print_key=print_key, for_file=.TRUE.)) - IF (TRIM(postfix) == "-") postfix = "" - ! and add the extension - postfix = TRIM(postfix)//extension - ELSE - postfix = extension + postfix = extension + IF (PRESENT(iter_string)) THEN + IF (iter_string) THEN + ! use the cp_iter_string as a postfix + postfix = "-"//TRIM(cp_iter_string(logger%iter_info, print_key=print_key, for_file=.TRUE.)) + IF (TRIM(postfix) == "-") postfix = "" + ! and add the extension + postfix = TRIM(postfix)//extension + END IF END IF ! and let the logger generate the filename diff --git a/src/qs_loc_utils.F b/src/qs_loc_utils.F index 31391e6095..988b9b6212 100644 --- a/src/qs_loc_utils.F +++ b/src/qs_loc_utils.F @@ -244,6 +244,7 @@ CONTAINS INTEGER :: dim_op, handle, i, iatom, imo, imoloc, & ispin, j, l_spin, lb, nao, naosub, & natoms, nmo, nmosub, nspins, s_spin, ub + LOGICAL :: loc_coeff_spin_resolved REAL(KIND=dp) :: my_occ, occ_imo REAL(KIND=dp), DIMENSION(:), POINTER :: occupations REAL(KIND=dp), DIMENSION(:, :), POINTER :: vecbuffer @@ -267,13 +268,17 @@ CONTAINS local_molecules=local_molecules, particle_set=particle_set, & para_env=para_env, mos=mos) nspins = SIZE(mos, 1) + loc_coeff_spin_resolved = .FALSE. + IF (PRESENT(loc_coeff)) THEN + loc_coeff_spin_resolved = nspins*2 == SIZE(loc_coeff) + END IF s_spin = 1 l_spin = nspins IF (PRESENT(myspin)) THEN s_spin = myspin l_spin = myspin END IF - IF (PRESENT(loc_coeff) .AND. nspins*2 == SIZE(loc_coeff)) THEN + IF (loc_coeff_spin_resolved) THEN ALLOCATE (moloc_coeff(s_spin:s_spin + 2*(l_spin - s_spin) + 1)) ELSE ALLOCATE (moloc_coeff(s_spin:l_spin)) @@ -284,7 +289,7 @@ CONTAINS nmosub = localized_wfn_control%nloc_states(ispin) CALL cp_fm_struct_create(tmp_fm_struct, nrow_global=nao, & ncol_global=nmosub, para_env=para_env, context=mo_coeff%matrix_struct%context) - IF (PRESENT(loc_coeff) .AND. nspins*2 == SIZE(loc_coeff)) THEN + IF (loc_coeff_spin_resolved) THEN CALL cp_fm_create(moloc_coeff(2*ispin - 1), tmp_fm_struct) CALL cp_fm_create(moloc_coeff(2*ispin), tmp_fm_struct) ELSE @@ -359,7 +364,7 @@ CONTAINS END IF nmosub = localized_wfn_control%nloc_states(ispin) - IF (PRESENT(loc_coeff) .AND. nspins*2 == SIZE(loc_coeff)) THEN + IF (loc_coeff_spin_resolved) THEN CALL cp_fm_to_fm(loc_coeff(2*ispin - 1), moloc_coeff(2*ispin - 1)) CALL cp_fm_to_fm(loc_coeff(2*ispin), moloc_coeff(2*ispin)) ELSE diff --git a/src/tblite_interface.F b/src/tblite_interface.F index 2408987997..cb403c496f 100644 --- a/src/tblite_interface.F +++ b/src/tblite_interface.F @@ -1325,14 +1325,13 @@ CONTAINS INTEGER :: nimg, nkind, nsgf, natorb, na, n_mix_cols, mix_offset INTEGER :: n_atom, max_orb, max_shell INTEGER :: raw_state_status, raw_state_unit - LOGICAL :: discard_mixed_output, do_combined_mixing, do_dipole, do_quadrupole, & - native_sign_mixing, skip_charge_mixing, & - reuse_native_input, skip_scf_dispersion, skip_scf_dispersion_energy, & - seed_native_from_rho, & + LOGICAL :: advance_native_mixer, discard_mixed_output, do_combined_mixing, & + do_dipole, do_quadrupole, native_sign_mixing, & + skip_charge_mixing, reuse_native_input, skip_scf_dispersion, & + skip_scf_dispersion_energy, seed_native_from_rho, & skip_scf_dispersion_gradient, skip_scf_dispersion_potential, & use_native_mixer, use_no_mixer - REAL(KIND=dp) :: native_seed_charge, norm, moment_alpha, & - new_charge, pao + REAL(KIND=dp) :: native_seed_charge, norm, new_charge, pao #if defined(__TBLITE_DEBUG_DIAGNOSTICS) INTEGER :: debug_status CHARACTER(LEN=32) :: debug_value @@ -1405,21 +1404,24 @@ CONTAINS CPABORT("Unknown tblite SCC mixer") END SELECT END IF - IF (use_native_mixer .AND. use_rho .AND. (.NOT. calculate_forces) .AND. & - scf_env%iter_count > dft_control%qs_control%xtb_control%tblite_mixer_iterations) THEN - CPABORT("tblite SCC mixer exceeded TBLITE_MIXER/ITERATIONS") - END IF - IF (use_native_mixer .AND. use_rho .AND. (.NOT. calculate_forces) .AND. & - scf_env%iter_count == 1) THEN - CALL tb_configure_mixer(tb, dft_control%qs_control%xtb_control%tblite_mixer_iterations, & - dft_control%qs_control%xtb_control%tblite_mixer_memory, & - dft_control%qs_control%xtb_control%tblite_mixer_damping, & - dft_control%qs_control%xtb_control%tblite_mixer_omega0, & - dft_control%qs_control%xtb_control%tblite_mixer_min_weight, & - dft_control%qs_control%xtb_control%tblite_mixer_max_weight, & - dft_control%qs_control%xtb_control%tblite_mixer_weight_factor, & - dft_control%qs_control%xtb_control%tblite_mixer_solver) - CALL tb_reset_mixer(tb) + IF (use_native_mixer) THEN + IF (.NOT. ASSOCIATED(scf_env)) CPABORT("tblite SCC mixer requires a QS SCF environment") + IF (use_rho .AND. (.NOT. calculate_forces)) THEN + IF (scf_env%iter_count > dft_control%qs_control%xtb_control%tblite_mixer_iterations) THEN + CPABORT("tblite SCC mixer exceeded TBLITE_MIXER/ITERATIONS") + END IF + IF (scf_env%iter_count == 1) THEN + CALL tb_configure_mixer(tb, dft_control%qs_control%xtb_control%tblite_mixer_iterations, & + dft_control%qs_control%xtb_control%tblite_mixer_memory, & + dft_control%qs_control%xtb_control%tblite_mixer_damping, & + dft_control%qs_control%xtb_control%tblite_mixer_omega0, & + dft_control%qs_control%xtb_control%tblite_mixer_min_weight, & + dft_control%qs_control%xtb_control%tblite_mixer_max_weight, & + dft_control%qs_control%xtb_control%tblite_mixer_weight_factor, & + dft_control%qs_control%xtb_control%tblite_mixer_solver) + CALL tb_reset_mixer(tb) + END IF + END IF END IF nspin = dft_control%nspins IF (nspin /= tb%wfn%nspin) CPABORT("CP2K/tblite spin channel mismatch") @@ -1438,12 +1440,14 @@ CONTAINS IF (ASSOCIATED(tb%dipbra)) do_dipole = .TRUE. IF (ASSOCIATED(tb%quadbra)) do_quadrupole = .TRUE. reuse_native_input = .FALSE. - IF (use_native_mixer .AND. scf_env%iter_count == 1) THEN - reuse_native_input = ANY(ABS(tb%wfn%qsh) > 1.0E-14_dp) - IF (do_dipole) reuse_native_input = reuse_native_input .OR. & - ANY(ABS(tb%wfn%dpat) > 1.0E-14_dp) - IF (do_quadrupole) reuse_native_input = reuse_native_input .OR. & - ANY(ABS(tb%wfn%qpat) > 1.0E-14_dp) + IF (use_native_mixer) THEN + IF (scf_env%iter_count == 1) THEN + reuse_native_input = ANY(ABS(tb%wfn%qsh) > 1.0E-14_dp) + IF (do_dipole) reuse_native_input = reuse_native_input .OR. & + ANY(ABS(tb%wfn%dpat) > 1.0E-14_dp) + IF (do_quadrupole) reuse_native_input = reuse_native_input .OR. & + ANY(ABS(tb%wfn%qpat) > 1.0E-14_dp) + END IF END IF n_atom = SIZE(particle_set) nkind = SIZE(atomic_kind_set) @@ -1609,7 +1613,11 @@ CONTAINS IF (use_native_mixer) THEN IF (.NOT. ALLOCATED(tb%mixer)) CPABORT("tblite mixer not initialized") - IF (use_rho .AND. (.NOT. calculate_forces) .AND. scf_env%iter_count > 1) THEN + advance_native_mixer = .FALSE. + IF (use_rho .AND. (.NOT. calculate_forces)) THEN + advance_native_mixer = scf_env%iter_count > 1 + END IF + IF (advance_native_mixer) THEN CALL tb%mixer%next(error) IF (ALLOCATED(error)) CPABORT("tblite native mixer failed") CALL tb%mixer%get(tb%wfn%qsh) @@ -1840,7 +1848,6 @@ CONTAINS CALL tb%pot%reset tb%e_es = 0.0_dp tb%e_scd = 0.0_dp - moment_alpha = scf_env%p_mix_alpha IF (nspin > 1) THEN DO iatom = 1, n_atom ii = tb%calc%bas%ish_at(iatom) diff --git a/tests/QS/regtest-ec/TEST_FILES.toml b/tests/QS/regtest-ec/TEST_FILES.toml index 09e71a988d..4560beb263 100644 --- a/tests/QS/regtest-ec/TEST_FILES.toml +++ b/tests/QS/regtest-ec/TEST_FILES.toml @@ -10,7 +10,7 @@ # ENERGY : LS + KG embed + Harris (Diag) MAO basis "2H2O_ecmao.inp" = [{matcher="M011", tol=1e-10, ref=-34.08394572951}] # ENERGY : LS + KG embed + Harris (Diag) MAO basis options -"2H2O_ecmao2.inp" = [{matcher="M011", tol=1e-08, ref=-34.45746110722}] +"2H2O_ecmao2.inp" = [{matcher="M011", tol=2e-08, ref=-34.45746110722}] # ENERGY : LS + KG embed + Harris (Diag) dipole "HF_ec_dipole.inp" = [{matcher="M011", tol=1e-08, ref=-24.8917060368}] # ENERGY : LS + KG embed + Harris (Diag) dipole diff --git a/tests/TEST_DIRS b/tests/TEST_DIRS index cf51c92537..f82a744ae5 100644 --- a/tests/TEST_DIRS +++ b/tests/TEST_DIRS @@ -4,13 +4,13 @@ # in case a new directory is added just add it at the top of the list.. # the order will be regularly checked and modified... QS/regtest-floquet -QS/regtest-dft-d4-auto-ref libdftd4 -QS/regtest-dft-d2-auto-ref libint -QS/regtest-dft-d3-auto-ref libint -QS/regtest-dft-d3-bj-auto-ref libint -QS/regtest-dft-d3-lib-ref libint s_dftd3 -QS/regtest-dft-d3bj-lib-ref libint s_dftd3 -QS/regtest-libgint libGint libint offload_cuda +QS/regtest-dft-d4-auto-ref libdftd4 libint !ifx +QS/regtest-dft-d2-auto-ref libint !ifx +QS/regtest-dft-d3-auto-ref libint !ifx +QS/regtest-dft-d3-bj-auto-ref libint !ifx +QS/regtest-dft-d3-lib-ref libint s_dftd3 !ifx +QS/regtest-dft-d3bj-lib-ref libint s_dftd3 !ifx +QS/regtest-libgint libGint libint offload_cuda !ifx QS/regtest-pcc QS/regtest-new-pulay-mixing QS/regtest-gcscf @@ -184,7 +184,7 @@ Fist/regtest-3 MC/regtest QS/regtest-gw libint !ifx QS/regtest-kp-1 libint !ifx -QS/regtest-kp-1-spg libint spglib !ifx +QS/regtest-kp-1-spg libint spglib !ifx QS/regtest-kp-1-spglib libint spglib !ifx QS/regtest-nmr-1 QS/regtest-nmr-4 @@ -316,8 +316,8 @@ QS/regtest-cdft-4-3 QS/regtest-gpw-6-4 QS/regtest-tddfpt-soc libint !ifx QS/regtest-dft-vdw-corr-1 -QS/regtest-dft-d3-s-ref s_dftd3 -QS/regtest-dft-d3bj-s-ref s_dftd3 +QS/regtest-dft-d3-s-ref s_dftd3 +QS/regtest-dft-d3bj-s-ref s_dftd3 QS/regtest-cdft-4-2 QS/regtest-hybrid-2 libint !ifx QS/regtest-admm-qps libint !ifx @@ -455,6 +455,6 @@ QS/regtest-trexio trexio QS/regtest-trexio-2 trexio QS/regtest-rtbse-gxac libint greenx !ifx QS/regtest-cneo -QS/regtest-tddfpt-bse libint libxc +QS/regtest-tddfpt-bse libint libxc !ifx QS/regtest-tdwf -QS/regtest-hybrid-ace-gs libint +QS/regtest-hybrid-ace-gs libint !ifx diff --git a/tools/docker/Dockerfile.test_intel-ifort-psmp b/tools/docker/Dockerfile.test_intel-ifort-psmp index 3d7cb3e8f2..c5a1a9a513 100644 --- a/tools/docker/Dockerfile.test_intel-ifort-psmp +++ b/tools/docker/Dockerfile.test_intel-ifort-psmp @@ -27,6 +27,7 @@ RUN ./install_cp2k_toolchain.sh \ --with-libsmeagol \ --with-libtorch=no \ --with-deepmd=no \ + --with-gauxc=no \ --dry-run # Dry-run leaves behind config files for the followup install scripts. diff --git a/tools/docker/Dockerfile.test_intel-ifort-ssmp b/tools/docker/Dockerfile.test_intel-ifort-ssmp index 82b72a3118..886213ce1f 100644 --- a/tools/docker/Dockerfile.test_intel-ifort-ssmp +++ b/tools/docker/Dockerfile.test_intel-ifort-ssmp @@ -27,6 +27,7 @@ RUN ./install_cp2k_toolchain.sh \ --with-libsmeagol \ --with-libtorch=no \ --with-deepmd=no \ + --with-gauxc=no \ --dry-run # Dry-run leaves behind config files for the followup install scripts. diff --git a/tools/docker/Dockerfile.test_intel-ifx-psmp b/tools/docker/Dockerfile.test_intel-ifx-psmp index 2facb8ab56..7c90de441b 100644 --- a/tools/docker/Dockerfile.test_intel-ifx-psmp +++ b/tools/docker/Dockerfile.test_intel-ifx-psmp @@ -27,6 +27,7 @@ RUN ./install_cp2k_toolchain.sh \ --with-libsmeagol \ --with-libtorch=no \ --with-deepmd=no \ + --with-gauxc=no \ --dry-run # Dry-run leaves behind config files for the followup install scripts. diff --git a/tools/docker/Dockerfile.test_intel-ifx-ssmp b/tools/docker/Dockerfile.test_intel-ifx-ssmp index 960bfc2f94..9aca740a13 100644 --- a/tools/docker/Dockerfile.test_intel-ifx-ssmp +++ b/tools/docker/Dockerfile.test_intel-ifx-ssmp @@ -27,6 +27,7 @@ RUN ./install_cp2k_toolchain.sh \ --with-libsmeagol \ --with-libtorch=no \ --with-deepmd=no \ + --with-gauxc=no \ --dry-run # Dry-run leaves behind config files for the followup install scripts. diff --git a/tools/docker/generate_dockerfiles.py b/tools/docker/generate_dockerfiles.py index bfffdc4507..86754f1fa2 100755 --- a/tools/docker/generate_dockerfiles.py +++ b/tools/docker/generate_dockerfiles.py @@ -551,6 +551,7 @@ FROM {base_image} with_libsmeagol="", with_libtorch="no", with_deepmd="no", + with_gauxc="no", ) diff --git a/tools/docker/scripts/cmake_cp2k.sh b/tools/docker/scripts/cmake_cp2k.sh index ec94fd5988..6159b72c31 100644 --- a/tools/docker/scripts/cmake_cp2k.sh +++ b/tools/docker/scripts/cmake_cp2k.sh @@ -90,8 +90,14 @@ elif [[ "${PROFILE}" == "toolchain_intel" ]] && [[ "${VERSION}" == "psmp" ]]; th cmake \ -GNinja \ -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \ - -DCP2K_USE_EVERYTHING=OFF \ - -DCP2K_USE_MPI=ON \ + -DCP2K_USE_EVERYTHING=ON \ + -DCP2K_USE_LIBTORCH=OFF \ + -DCP2K_USE_OPENPMD=OFF \ + -DCP2K_USE_DEEPMD=OFF \ + -DCP2K_USE_GAUXC=OFF \ + -DCP2K_USE_MIMIC=OFF \ + -DCP2K_USE_PEXSI=OFF \ + -DCP2K_USE_DLAF=OFF \ -Werror=dev \ .. |& tee ./cmake.log CMAKE_EXIT_CODE=$? @@ -100,8 +106,14 @@ elif [[ "${PROFILE}" == "toolchain_intel" ]] && [[ "${VERSION}" == "ssmp" ]]; th cmake \ -GNinja \ -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \ - -DCP2K_USE_EVERYTHING=OFF \ + -DCP2K_USE_EVERYTHING=ON \ -DCP2K_USE_MPI=OFF \ + -DCP2K_USE_LIBTORCH=OFF \ + -DCP2K_USE_DEEPMD=OFF \ + -DCP2K_USE_GAUXC=OFF \ + -DCP2K_USE_MIMIC=OFF \ + -DCP2K_USE_PEXSI=OFF \ + -DCP2K_USE_DLAF=OFF \ -Werror=dev \ .. |& tee ./cmake.log CMAKE_EXIT_CODE=$? diff --git a/tools/toolchain/scripts/stage8/install_sirius.sh b/tools/toolchain/scripts/stage8/install_sirius.sh index 9d3de5b942..b9ecee22c4 100755 --- a/tools/toolchain/scripts/stage8/install_sirius.sh +++ b/tools/toolchain/scripts/stage8/install_sirius.sh @@ -34,14 +34,16 @@ case "$with_sirius" in if [ "$ARCH" = "x86_64" ]; then if [ "${with_intel}" != "__DONTUSE__" ]; then + # Avoid Intel's "-backtrace" + unset CXXFLAGS SIRIUS_OPT="-DNDEBUG -O2 -g ${MATH_CFLAGS}" SIRIUS_DBG="-O1 -g ${MATH_CFLAGS}" # SIRIUS_DBG and SIRIUS_OPT are not really considered by CMake and rather the CMAKE_BUILD_TYPE matters. # The CMAKE_BUILD_TYPEs "Release" and "RelWithDebInfo" employ -O3/-O2, but already -O2 makes the SIRIUS # build quite memory and time intensive. The CMAKE_BUILD_TYPE "Debug" allows for fast compilation, but it # generates very slow code. - # EXTRA_CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS= ${SIRIUS_DBG}" - EXTRA_CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS= ${SIRIUS_OPT}" + # EXTRA_CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Debug ${EXTRA_CMAKE_FLAGS}" + EXTRA_CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=RelWithDebInfo ${EXTRA_CMAKE_FLAGS}" else SIRIUS_OPT="-O3 -DNDEBUG -mtune=native -ftree-loop-vectorize ${MATH_CFLAGS}" SIRIUS_DBG="-O2 -g -mtune=native -ftree-loop-vectorize ${MATH_CFLAGS}"