Skip to content

Commit

Permalink
block/iterator: give info about how no. of threads changed
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-zero committed Jan 11, 2021
1 parent db9b878 commit 21dae0f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/block/dbcsr_iterator_operations.F
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ MODULE dbcsr_iterator_operations
dbcsr_distribution_thread_dist
USE dbcsr_methods, ONLY: dbcsr_distribution
USE dbcsr_ptr_util, ONLY: pointer_rank_remap2
USE dbcsr_string_utilities, ONLY: stringify
USE dbcsr_toollib, ONLY: swap
USE dbcsr_types, ONLY: dbcsr_data_obj, &
dbcsr_distribution_obj, &
Expand Down Expand Up @@ -176,7 +177,10 @@ SUBROUTINE dbcsr_iterator_start(iterator, matrix, shared, dynamic, &
IF (.NOT. iterator%dynamic .AND. .NOT. dbcsr_distribution_has_threads(dist)) &
DBCSR_ABORT("Thread distribution must be defined for non-dynamic iterator.")
!$ IF (omp_in_parallel() .AND. omp_get_num_threads() /= dbcsr_distribution_num_threads(dist)) &
!$ DBCSR_ABORT("Number of threads has changed!")
!$ CALL dbcsr_abort(__LOCATION__, &
!$ "Number of threads has changed from "// &
!$ stringify(dbcsr_distribution_num_threads(dist))// &
!$ " to "//stringify(omp_get_num_threads())//"!")
!Synchronize the positions
NULLIFY (iterator%common_pos)
IF (iterator%dynamic) THEN
Expand Down

0 comments on commit 21dae0f

Please sign in to comment.