From 16786429d42933d3d43d3f8c90d594660fd381b8 Mon Sep 17 00:00:00 2001 From: "Xinsheng (Shawn) Qin" Date: Tue, 3 Mar 2020 00:30:37 -0800 Subject: [PATCH] update Makefile in GPU examples to set default values for CUDA relevant variables --- examples/GPU/tsunami/bowl-radial/Makefile | 12 ++++-------- examples/GPU/tsunami/chile2010/Makefile | 12 ++++-------- examples/GPU/tsunami/chile2010_adjoint/Makefile | 12 ++++-------- 3 files changed, 12 insertions(+), 24 deletions(-) diff --git a/examples/GPU/tsunami/bowl-radial/Makefile b/examples/GPU/tsunami/bowl-radial/Makefile index 7fd06311a..1a72e2b36 100644 --- a/examples/GPU/tsunami/bowl-radial/Makefile +++ b/examples/GPU/tsunami/bowl-radial/Makefile @@ -21,26 +21,24 @@ PLOTDIR = _plots # Directory for plots OVERWRITE ?= True # False ==> make a copy of OUTDIR first -FC = pgi USE_CUDA = TRUE -# FC = gfortran -# USE_CUDA = FALSE +FC = pgi +CUDA_PATH ?= /usr/local/cuda-10.0 +CUDA_VERSION ?= 10.0 +CUDA_CC ?= cc60 -# DEBUG = TRUE DEBUG = FALSE CC = pgi USE_CPP = TRUE PROFILE = TRUE -# PROFILE = FALSE USE_OPENMP = TRUE VERBOSE = FALSE -# USE_DOUBLE_PRECISION = FALSE USE_DOUBLE_PRECISION = TRUE DIM = 2 @@ -50,8 +48,6 @@ NUM_COEFFS = 1 USE_FWAVES = TRUE USE_CAPA = FALSE -# Environment variable FC should be set to fortran compiler, e.g. gfortran - # Compiler flags can be specified here or set as an environment variable FFLAGS ?= diff --git a/examples/GPU/tsunami/chile2010/Makefile b/examples/GPU/tsunami/chile2010/Makefile index 4f4e2d4d7..8b8405b1b 100644 --- a/examples/GPU/tsunami/chile2010/Makefile +++ b/examples/GPU/tsunami/chile2010/Makefile @@ -20,26 +20,24 @@ PLOTDIR = _plots # Directory for plots OVERWRITE ?= True # False ==> make a copy of OUTDIR first -FC = pgi USE_CUDA = TRUE -# FC = gfortran -# USE_CUDA = FALSE +FC = pgi +CUDA_PATH ?= /usr/local/cuda-10.0 +CUDA_VERSION ?= 10.0 +CUDA_CC ?= cc60 -# DEBUG = TRUE DEBUG = FALSE CC = pgi USE_CPP = TRUE PROFILE = TRUE -# PROFILE = FALSE USE_OPENMP = TRUE VERBOSE = FALSE -# USE_DOUBLE_PRECISION = FALSE USE_DOUBLE_PRECISION = TRUE DIM = 2 @@ -49,8 +47,6 @@ NUM_COEFFS = 3 USE_FWAVES = TRUE USE_CAPA = TRUE -# Environment variable FC should be set to fortran compiler, e.g. gfortran - # Compiler flags can be specified here or set as an environment variable FFLAGS ?= diff --git a/examples/GPU/tsunami/chile2010_adjoint/Makefile b/examples/GPU/tsunami/chile2010_adjoint/Makefile index 4f4e2d4d7..8b8405b1b 100644 --- a/examples/GPU/tsunami/chile2010_adjoint/Makefile +++ b/examples/GPU/tsunami/chile2010_adjoint/Makefile @@ -20,26 +20,24 @@ PLOTDIR = _plots # Directory for plots OVERWRITE ?= True # False ==> make a copy of OUTDIR first -FC = pgi USE_CUDA = TRUE -# FC = gfortran -# USE_CUDA = FALSE +FC = pgi +CUDA_PATH ?= /usr/local/cuda-10.0 +CUDA_VERSION ?= 10.0 +CUDA_CC ?= cc60 -# DEBUG = TRUE DEBUG = FALSE CC = pgi USE_CPP = TRUE PROFILE = TRUE -# PROFILE = FALSE USE_OPENMP = TRUE VERBOSE = FALSE -# USE_DOUBLE_PRECISION = FALSE USE_DOUBLE_PRECISION = TRUE DIM = 2 @@ -49,8 +47,6 @@ NUM_COEFFS = 3 USE_FWAVES = TRUE USE_CAPA = TRUE -# Environment variable FC should be set to fortran compiler, e.g. gfortran - # Compiler flags can be specified here or set as an environment variable FFLAGS ?=