-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmakefile.in
75 lines (62 loc) · 2.53 KB
/
makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
##===----------------------------------------------------------------------===##
##
## KernelGen -- A prototype of LLVM-based auto-parallelizing Fortran/C
## compiler for NVIDIA GPUs, targeting numerical modeling code.
##
## This file is distributed under the University of Illinois Open Source
## License. See LICENSE.TXT for details.
##
##===----------------------------------------------------------------------===##
# Floating-point type: float or double
real = double
szreal =
pgi_szreal =
ifeq ($(real), double)
szreal = -fdefault-real-8
pgi_szreal = -r8
endif
# Verbose setting
VERBOSE = 0
SILENT = @
ifeq ($(VERBOSE), 1)
SILENT =
endif
# GCC compiler/linker options
GCCOPT = -O3 -ffast-math -march=native
GCC = gcc $(GCCOPT) -D_GNU_SOURCE -std=c99
GFORTRAN = gfortran $(GCCOPT) $(szreal)
# KernelGen compiler/linker options
KERNELGEN_GCC = kernelgen-gcc -O3 -D_GNU_SOURCE -std=c99
KERNELGEN_GFORTRAN = kernelgen-gfortran -O3 $(szreal)
# Intel compiler/linker options
ICC = icc -O3 -D_GNU_SOURCE -D_MIC -std=c99 -openmp-report=2 -vec-report6 -opt-subscript-in-range -align -offload-build
IFORT = ifort -O3 -D_MIC -openmp-report=2 -vec-report6 -opt-subscript-in-range -align -offload-build $(szreal)
# PGI/OpenACC compiler/linker options
GPUARCH = 60
GPUCUDA = 10.0
PGCC = pgcc -I. -acc -O3 -Minfo=accel -ta=nvidia:keep,cc$(GPUARCH),cuda$(GPUCUDA) -Wl,--wrap=__pgi_uacc_cuda_launch
PGF90 = pgf90 -acc -O3 -Minfo=accel -ta=nvidia:keep,cc$(GPUARCH),cuda$(GPUCUDA) -Wl,--wrap=__pgi_uacc_cuda_launch $(pgi_szreal)
PGCC_CUDA = pgcc -I. -O3
PGF90_CUDA = pgf90 -O3 -Mcuda=keepgpu,keepbin,keepptx,ptxinfo,cc$(GPUARCH),cuda$(GPUCUDA) $(pgi_szreal) -D__CUDAFOR__
# CAPS/OpenACC compiler/linker options
CAPSCC = hmpp --openacc-target=CUDA -k -f --nvcc-options -O3,-arch,sm_$(GPUARCH) $(GCC) -Wl,--wrap=openacci_call -Wl,--wrap=dlsym
CAPSF90 = hmpp --openacc-target=CUDA -k -f --nvcc-options -O3,-arch,sm_$(GPUARCH) $(GFORTRAN) -Wl,--wrap=openacci_call -Wl,--wrap=dlsym
# PathScale/OpenACC compiler/linker options
PATHHOME ?= /opt/enzo-5.0.0/
PATHCCPATH = $(PATHHOME)bin/
PATHCC_INCLUDE_PATH = $(PATHHOME)include/
PATHCCAPI = -acc
PATHCC = $(PATHCCPATH)pathcc $(PATHCCAPI) -O3 -I$(PATHCC_INCLUDE_PATH)
PATHF90 = $(PATHCCPATH)pathf90 $(PATHCCAPI) -O3 -I$(PATHCC_INCLUDE_PATH)
# NVIDIA compiler options
NVCC = nvcc -I. -I.. -O3 -arch=sm_$(GPUARCH) -Xptxas -v
# PATUS compiler
PATUS = patus
# PATUS-specific GCC compiler options
PATUS_GCC = $(GCC) -mavx -fopenmp -std=c99 -D_GNU_SOURCE -D_PATUS
# Default grid dimensions
NX ?= 512
NY ?= 256
NS ?= 256
NT ?= 10
NRUNS ?= 10