From 21dae0fbf6027aaa935eaa53cb024fc9c42573eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiziano=20M=C3=BCller?= Date: Mon, 11 Jan 2021 11:34:04 +0100 Subject: [PATCH] block/iterator: give info about how no. of threads changed --- src/block/dbcsr_iterator_operations.F | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/block/dbcsr_iterator_operations.F b/src/block/dbcsr_iterator_operations.F index 410b0fa8b4e..b03aab72b5e 100644 --- a/src/block/dbcsr_iterator_operations.F +++ b/src/block/dbcsr_iterator_operations.F @@ -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, & @@ -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