-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.make
More file actions
56 lines (44 loc) · 1.11 KB
/
Copy pathconfig.make
File metadata and controls
56 lines (44 loc) · 1.11 KB
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
# file: config.mk
# nAPMO package
# Copyright (c) 2021, Edwin Fernando Posada
# All rights reserved.
# Version: 2.0
# fernando.posada@temple.edu
# Comment and uncomment different options depending on the desired compilation.
# Kind of builds supported (list)
BUILD = SERIAL CUDA OMP
#-----------------------
# Compiler
#-----------------------
ifeq ($(strip $(CC)),)
CC := gcc
endif
ifeq ($(strip $(CXX)),)
CXX := g++
endif
CC := gcc
CXX := g++
#-----------------------
# Initial configuration
#-----------------------
CFLAGS := -Wall -O2 -fPIC
LDLIBS := -lgsl -lgslcblas -lint2
LDFLAGS += -shared
#-----------------------
# OpenMP support
#-----------------------
# INTEL
#-------
# OMP: CFLAGS += -D_OMP -DMKL_ILP64 -openmp -mkl=parallel
# OMP: LDLIBS += -liomp5
# OMP: LDFLAGS += -lpthread
# GCC
#-------
OMP: CFLAGS += -fopenmp -D_OMP
OMP: LDLIBS += -lgomp
#----------------
# Nvidia support
#----------------
CUDA: CC := nvcc
CUDA: CFLAGS := -Xcompiler '$(CFLAGS) -fopenmp -D_OMP -D_CUDA' -use_fast_math -arch=sm_50 -lineinfo -Xptxas="-v"
CUDA: LDFLAGS := -Xcompiler '$(LDFLAGS) -lgomp' -arch=sm_50 -lineinfo