Skip to content

Commit

Permalink
add Ada and Hopper, plus ccnative
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Hammond <[email protected]>
  • Loading branch information
jeffhammond committed Mar 13, 2024
1 parent 2f00dfb commit 5f77650
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/fortran/make.inc.nvhpc
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@ FC := nvfortran
#FCFLAGS := -O3 -Minform=inform -Minfo=all
FCFLAGS := -O3 -Minform=warn

#TARGET=gpu
TARGET=multicore
TARGET=gpu
#TARGET=multicore

NVARCH=$(shell which nvidia-smi > /dev/null && nvidia-smi -q | grep "Product Architecture")
ifeq ($(findstring Hopper,$(NVARCH)),Hopper)
$(info Hopper detected)
GPU = cc90
endif
ifeq ($(findstring Ada,$(NVARCH)),Ada)
$(info Ada detected)
GPU = cc89
endif
ifeq ($(findstring Ampere,$(NVARCH)),Ampere)
$(info Ampere detected)
GPU = cc80
Expand All @@ -29,7 +37,8 @@ ifeq ($(shell which jetson_clocks > /dev/null && echo 1),1)
#GPU = cc72
endif
ifeq ($(GPU),)
$(error Your GPU architecture could not be detected. Set it manually.)
$(info Your GPU architecture could not be detected.)
GPU = ccnative
endif
GPUFLAG = -gpu=$(GPU)

Expand Down

0 comments on commit 5f77650

Please sign in to comment.