From 81f63533180dd34fa6578c6c18a060aa73242d75 Mon Sep 17 00:00:00 2001 From: Abishek Gopal Date: Mon, 3 Feb 2025 11:25:06 -0700 Subject: [PATCH] Adding option to keep nvhpc GPU builds bit-identical with CPU builds --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile b/Makefile index 1d31bb2843..48df506853 100644 --- a/Makefile +++ b/Makefile @@ -158,6 +158,8 @@ nvhpc: # BUILDTARGET NVIDIA HPC SDK "FFLAGS_OMP = -mp" \ "CFLAGS_OMP = -mp" \ "FFLAGS_ACC = -Mnofma -acc -gpu=cc70,cc80 -Minfo=accel" \ + "FFLAGS_NVHPC_ACC_BFB = -Mnofma -gpu=math_uniform" \ + "FFLAGS_NVHPC_BFB = -Mnofma" \ "CFLAGS_ACC =" \ "PICFLAG = -fpic" \ "BUILD_TARGET = $(@)" \ @@ -850,6 +852,14 @@ ifeq "$(OPENACC)" "true" LDFLAGS += $(FFLAGS_ACC) endif #OPENACC IF +ifeq "$(NVHPC_BFB)" "true" + ifeq "$(OPENACC)" "true" + FFLAGS += ${FFLAGS_NVHPC_ACC_BFB} + else + FFLAGS += ${FFLAGS_NVHPC_BFB} + endif +endif #NVHPC IF + ifeq "$(OPENMP_OFFLOAD)" "true" FFLAGS += $(FFLAGS_GPU) CFLAGS += $(FFLAGS_GPU)