-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile2d-gpu
43 lines (30 loc) · 1.65 KB
/
Makefile2d-gpu
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
CC = nvcc
OBJS = NLC_2D_TFIM.o CPU/GenHam.o CPU/Lanczos_07.o CPU/magnetization.o graphs.o GPU/tfising.o GPU/xy.o GPU/heisenberg.o GPU/hamiltonian.o GPU/lanczos.o GPU/GPUmagnetization.o
CFLAGS = -O2 -gencode arch=compute_20,code=sm_21 -Xcompiler -fopenmp
LANCLIBS = -lcublas -lcusparse
2d-gpu.out: $(OBJS)
$(CC) $(CFLAGS) $(OBJS) -o 2d-gpu.out $(LANCLIBS)
NLC_2D_TFIM.o : NLC_2D_TFIM.cu CPU/GenHam.h CPU/Lanczos_07.h CPU/simparam.h ../Graphs/graphs.h GPU/GPUmagnetization.h
$(CC) $(CFLAGS) -c NLC_2D_TFIM.cu
CPU/GenHam.o: CPU/GenHam.cpp CPU/GenHam.h CPU/Lanczos_07.h
$(CC) $(CFLAGS) -c CPU/GenHam.cpp -o CPU/GenHam.o
CPU/Lanczos_07.o: CPU/Lanczos_07.cpp CPU/GenHam.h CPU/Lanczos_07.h
$(CC) $(CFLAGS) -c CPU/Lanczos_07.cpp -o CPU/Lanczos_07.o
CPU/magnetization.o: CPU/magnetization.cpp CPU/magnetization.h
$(CC) $(CFLAGS) -c CPU/magnetization.cpp -o CPU/magnetization.o
graphs.o: ../Graphs/graphs.cpp ../Graphs/graphs.h
$(CC) $(CFLAGS) -c ../Graphs/graphs.cpp
GPU/GPUmagnetization.o : GPU/GPUmagnetization.cu GPU/GPUmagnetization.h
$(CC) $(CFLAGS) -c GPU/GPUmagnetization.cu -o GPU/GPUmagnetization.o
GPU/lanczos.o : GPU/lanczos.cu GPU/lanczos.h
$(CC) $(CFLAGS) -c GPU/lanczos.cu $(LANCLIBS) -o GPU/lanczos.o
GPU/hamiltonian.o : GPU/hamiltonian.cu GPU/hamiltonian.h
$(CC) $(CFLAGS) -c GPU/hamiltonian.cu -o GPU/hamiltonian.o
GPU/heisenberg.o : GPU/heisenberg.cu GPU/hamiltonian.h
$(CC) $(CFLAGS) -c GPU/heisenberg.cu -o GPU/heisenberg.o
GPU/xy.o : GPU/xy.cu GPU/hamiltonian.h
$(CC) $(CFLAGS) -c GPU/xy.cu -o GPU/xy.o
GPU/tfising.o : GPU/tfising.cu GPU/hamiltonian.h
$(CC) $(CFLAGS) -c GPU/tfising.cu -o GPU/tfising.o
clean :
rm CPU/*.o && rm *.o && rm GPU/*.o