Skip to content

Commit

Permalink
Fix dashboard (#2904)
Browse files Browse the repository at this point in the history
This bugfix circumvents bugs of some older versions of gcc. These are related to default initializers of derived types with allocatable components. In order to circumvent that bug, the respective components have to be explicitly initialized with NULL().
  • Loading branch information
fstein93 committed Aug 9, 2023
1 parent 3c614b3 commit 1668dc7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/almo_scf_types.F
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,9 @@ MODULE almo_scf_types
envelope_amplitude = 0.0_dp

! guess options
TYPE(almo_scf_history_type) :: almo_history = almo_scf_history_type()
TYPE(almo_scf_history_type) :: xalmo_history = almo_scf_history_type()
! This prevents a bug in GCC 8/9
TYPE(almo_scf_history_type) :: almo_history = almo_scf_history_type(matrix_p_up_down=null(), matrix_t=null())
TYPE(almo_scf_history_type) :: xalmo_history = almo_scf_history_type(matrix_p_up_down=null(), matrix_t=null())
INTEGER :: almo_extrapolation_order = 0
INTEGER :: xalmo_extrapolation_order = 0

Expand Down
6 changes: 4 additions & 2 deletions src/dm_ls_scf_types.F
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ MODULE dm_ls_scf_types
REAL(KIND=dp), DIMENSION(2) :: homo_spin = 0.0_dp
REAL(KIND=dp), DIMENSION(2) :: lumo_spin = 0.0_dp

TYPE(ls_mat_history_type) :: scf_history = ls_mat_history_type()
! This prevents a bug in GCC up to version 9.x (9.5 seems to work though)
TYPE(ls_mat_history_type) :: scf_history = ls_mat_history_type(matrix=null())
INTEGER :: extrapolation_order = -1

LOGICAL :: has_unit_metric = .FALSE.
Expand Down Expand Up @@ -136,7 +137,8 @@ MODULE dm_ls_scf_types
LOGICAL :: report_all_sparsities = .FALSE., perform_mu_scan = .FALSE., use_s_sqrt = .FALSE.

TYPE(ls_mstruct_type) :: ls_mstruct
TYPE(ls_scf_curvy_type) :: curvy_data = ls_scf_curvy_type()
TYPE(ls_scf_curvy_type) :: curvy_data = ls_scf_curvy_type(matrix_dp=null(), matrix_p=null(), &
matrix_psave=null(), matrix_bch=null())

TYPE(chebyshev_type) :: chebyshev = chebyshev_type()

Expand Down

0 comments on commit 1668dc7

Please sign in to comment.