From 6f1065d9e271c9fecb85d6bf715db42a3c74ac8e Mon Sep 17 00:00:00 2001 From: Hans Pabst Date: Wed, 29 May 2024 09:25:45 +0200 Subject: [PATCH] ocl: always print number of devices found * Using the CUDA backend, ACC_OPENCL_VERBOSE is not available. * Prints the activated device and number of found devices. * Helps, e.g., CI to capture basic information. --- src/acc/acc_bench_smm.c | 4 +--- src/acc/acc_bench_trans.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/acc/acc_bench_smm.c b/src/acc/acc_bench_smm.c index 412c40eadc9..81458de3b14 100644 --- a/src/acc/acc_bench_smm.c +++ b/src/acc/acc_bench_smm.c @@ -227,9 +227,7 @@ int main(int argc, char* argv[]) { int ndevices = 0; result = c_dbcsr_acc_get_ndevices(&ndevices); if (0 < ndevices && (0 == device || EXIT_SUCCESS == c_dbcsr_acc_set_active_device(device))) { -#if defined(_DEBUG) - fprintf(stderr, "Activated device %i of %i (device%i).\n", device + 1, ndevices, device); -#endif + PRINTF("Activated device%i (ndevices=%i)\n", device, ndevices); } else { if (0 >= ndevices) { diff --git a/src/acc/acc_bench_trans.c b/src/acc/acc_bench_trans.c index be5643478eb..07101a187df 100644 --- a/src/acc/acc_bench_trans.c +++ b/src/acc/acc_bench_trans.c @@ -123,9 +123,7 @@ int main(int argc, char* argv[]) { if (EXIT_SUCCESS == result) { result = c_dbcsr_acc_get_ndevices(&ndevices); if (0 < ndevices && (0 == device || EXIT_SUCCESS == c_dbcsr_acc_set_active_device(device))) { -#if defined(_DEBUG) - fprintf(stderr, "Activated device %i of %i (device%i).\n", device + 1, ndevices, device); -#endif + printf("Activated device%i (ndevices=%i)\n", device, ndevices); } else { if (0 >= ndevices) {