Skip to content

Commit 5f77650

Browse files
committed
add Ada and Hopper, plus ccnative
Signed-off-by: Jeff Hammond <jeff.science@gmail.com>
1 parent 2f00dfb commit 5f77650

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/fortran/make.inc.nvhpc

+12-3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,18 @@ FC := nvfortran
22
#FCFLAGS := -O3 -Minform=inform -Minfo=all
33
FCFLAGS := -O3 -Minform=warn
44

5-
#TARGET=gpu
6-
TARGET=multicore
5+
TARGET=gpu
6+
#TARGET=multicore
77

88
NVARCH=$(shell which nvidia-smi > /dev/null && nvidia-smi -q | grep "Product Architecture")
9+
ifeq ($(findstring Hopper,$(NVARCH)),Hopper)
10+
$(info Hopper detected)
11+
GPU = cc90
12+
endif
13+
ifeq ($(findstring Ada,$(NVARCH)),Ada)
14+
$(info Ada detected)
15+
GPU = cc89
16+
endif
917
ifeq ($(findstring Ampere,$(NVARCH)),Ampere)
1018
$(info Ampere detected)
1119
GPU = cc80
@@ -29,7 +37,8 @@ ifeq ($(shell which jetson_clocks > /dev/null && echo 1),1)
2937
#GPU = cc72
3038
endif
3139
ifeq ($(GPU),)
32-
$(error Your GPU architecture could not be detected. Set it manually.)
40+
$(info Your GPU architecture could not be detected.)
41+
GPU = ccnative
3342
endif
3443
GPUFLAG = -gpu=$(GPU)
3544

0 commit comments

Comments
 (0)