Skip to content

Commit

Permalink
Turn cp_dbcsr_api into an actual wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
oschuett committed May 31, 2024
1 parent cc44763 commit 50e1bb5
Show file tree
Hide file tree
Showing 6 changed files with 1,214 additions and 53 deletions.
2 changes: 1 addition & 1 deletion src/almo_scf_lbfgs_types.F
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ SUBROUTINE lbfgs_history_direction(history, gradient, direction)
END DO ! iterm, forst loop from recent to oldest
!RZK-warning: unclear whether q should be multiplied by minus one
CALL dbcsr_scale(q, -1.0)
CALL dbcsr_scale(q, -1.0_dp)
CALL dbcsr_copy(direction(ispin), q)
CALL dbcsr_release(q)
Expand Down
2 changes: 1 addition & 1 deletion src/cp_dbcsr_cp2k_link.F
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ SUBROUTINE cp_dbcsr_to_csr_screening(ks_env, csr_sparsity)
CALL basis_set_list_setup(basis_set_list_b, "ORB", qs_kind_set)

! csr_sparsity can obtain values 0 (if zero element) or 1 (if non-zero element)
CALL dbcsr_set(csr_sparsity, 0.0)
CALL dbcsr_set(csr_sparsity, 0.0_dp)

CALL neighbor_list_iterator_create(nl_iterator, neighbour_list)

Expand Down
5 changes: 2 additions & 3 deletions src/dbt/dbt_methods.F
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@ SUBROUTINE dbt_copy_matrix_to_tensor(matrix_in, tensor_out, summation)
REAL(KIND=dp), ALLOCATABLE, DIMENSION(:, :) :: block_arr
REAL(KIND=dp), DIMENSION(:, :), POINTER :: block
TYPE(dbcsr_iterator_type) :: iter
LOGICAL :: tr
INTEGER :: handle
CHARACTER(LEN=*), PARAMETER :: routineN = 'dbt_copy_matrix_to_tensor'
Expand All @@ -359,10 +358,10 @@ SUBROUTINE dbt_copy_matrix_to_tensor(matrix_in, tensor_out, summation)
CALL dbt_reserve_blocks(matrix_in_desym, tensor_out)
!$OMP PARALLEL DEFAULT(NONE) SHARED(matrix_in_desym,tensor_out,summation) &
!$OMP PRIVATE(iter,ind_2d,block,tr,block_arr)
!$OMP PRIVATE(iter,ind_2d,block,block_arr)
CALL dbcsr_iterator_start(iter, matrix_in_desym)
DO WHILE (dbcsr_iterator_blocks_left(iter))
CALL dbcsr_iterator_next_block(iter, ind_2d(1), ind_2d(2), block, tr)
CALL dbcsr_iterator_next_block(iter, ind_2d(1), ind_2d(2), block)
CALL allocate_any(block_arr, source=block)
CALL dbt_put_block(tensor_out, ind_2d, SHAPE(block_arr), block_arr, summation=summation)
DEALLOCATE (block_arr)
Expand Down
Loading

0 comments on commit 50e1bb5

Please sign in to comment.