From ba1d5371a4d345d64f0d814e4004be7e295180b8 Mon Sep 17 00:00:00 2001 From: aprilnovak Date: Wed, 8 Feb 2023 17:30:03 -0500 Subject: [PATCH] Force CUDA on if AMGX is requested. --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index e88fe9683..943c7a1f9 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,13 @@ OCCA_OPENCL_ENABLED=0 # Whether to enable AMGX in Nek (only available for Nvidia GPU) AMGX_ENABLED=0 +ifeq ($(AMGX_ENABLED),1) + ifeq ($(OCCA_CUDA_ENABLED),0) + $(info Turning on CUDA backend because AMGX was requested) + OCCA_CUDA_ENABLED=1 + endif +endif + CARDINAL_DIR := $(abspath $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))) CONTRIB_DIR := $(CARDINAL_DIR)/contrib