forked from Qiskit/qiskit-aer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.Thrust
51 lines (25 loc) · 1.09 KB
/
Makefile.Thrust
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
PROJECT_SOURCE_DIR=.
AER_SIMULATOR_CPP_SRC_DIR=$(PROJECT_SOURCE_DIR)/src
AER_SIMULATOR_CPP_MAIN=$(PROJECT_SOURCE_DIR)/contrib/standalone/qasm_simulator.cpp
CUCC = /usr/local/cuda/bin/nvcc
CXX = /gpfs/wscgpfs01/doichan/gcc/bin/g++
CXXFLAGS= -ccbin $(CXX) -DQASM_THRUST -gencode arch=compute_70,code=sm_70 -std c++14 -I$(AER_SIMULATOR_CPP_SRC_DIR) -Xcompiler "-O3 -fopenmp -ffast-math -isystem $(AER_SIMULATOR_CPP_SRC_DIR)/third-party/headers" -use_fast_math -expt-extended-lambda -I/usr/local/cuda/include -x cu
#-DQASM_DEBUG -DQASM_TIMING
LDFLAGS=-O3 -fopenmp -std=c++14
LDLIBS = -lpthread -L/usr/local/cuda/lib64 -lcudart -lopenblas
LD = $(CXX)
#// program ===================================================================
MODULE = qasm_simulator
SRCSC = \
$(AER_SIMULATOR_CPP_MAIN) \
OBJSC = ${SRCSC:.cpp=.o}
#// rules =====================================================================
all: $(MODULE)
.SUFFIXES: .o .cpp
.cpp.o:
$(CUCC) $(CXXFLAGS) -c $< -o $@
$(MODULE): $(OBJSC)
rm -f $(MODULE)
$(LD) $(OBJSC) $(LDFLAGS) $(LDLIBS) -o $@
clean:
rm -f $(OBJSC) $(MODULE)