From 1d6ec141abf192caa4763a3ed0682f48561d2ca3 Mon Sep 17 00:00:00 2001 From: edoapra Date: Wed, 8 Nov 2023 22:36:26 -0800 Subject: [PATCH] introduced OPENBLAS_USES_OPENMP variable to handle OpenBLAS threaded with OpenMP --- src/config/makefile.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/config/makefile.h b/src/config/makefile.h index fd4008e6e4..8d6d00049a 100644 --- a/src/config/makefile.h +++ b/src/config/makefile.h @@ -3888,7 +3888,14 @@ ifdef BUILD_OPENBLAS DEFINES += -DOPENBLAS endif ifeq ($(shell echo $(BLASOPT) |awk '/openblas/ {print "Y"; exit}'),Y) - DEFINES += -DOPENBLAS + ifdef OPENBLAS_USES_OPENMP + DEFINES += -DBLAS_OPENMP + ifndef USE_OPENMP + $(error USE_OPENMP must be set when OPENBLAS_USES_OPENMP is set) + endif + else + DEFINES += -DOPENBLAS + endif endif # NVHPC compilers are distributed wtih OpenBLAS named as libblas/liblapack ifeq ($(shell echo $(BLASOPT) |awk '/\/nvidia\/hpc_sdk\// {print "Y"; exit}'),Y)