1 # Copyright 2011-2013 Mario Mulansky
2 # Copyright 2011-2012 Karsten Ahnert
4 # Distributed under the Boost Software License, Version 1.0.
5 # (See accompanying file LICENSE_1_0.txt or
6 # copy at http://www.boost.org/LICENSE_1_0.txt)
10 # CUDA_ROOT = /home/karsten/boost/cuda4.1/cuda/
11 CUDA_ROOT = /usr/local/cuda
16 NVCC = $(CUDA_ROOT)/bin/nvcc
19 INCLUDES += -I$(BOOST_ROOT) -I$(THRUST_ROOT) -I$(CUDA_ROOT)/include -I../../../../..
21 NVCCFLAGS = -O3 $(INCLUDES) -arch $(ARCH) --compiler-bindir=/opt/gcc4.6.2/bin/ -Xcompiler -fopenmp -DTHRUST_DEVICE_BACKEND=THRUST_DEVICE_BACKEND_OMP
22 # NVCCFLAGS = -O3 $(INCLUDES) -arch $(ARCH) --compiler-bindir=/usr/bin/g++-4.3 -Xcompiler -fopenmp -DTHRUST_DEVICE_BACKEND=THRUST_DEVICE_BACKEND_OMP
24 # NVCCFLAGS = -O3 $(INCLUDES) -arch $(ARCH) --compiler-bindir=/usr/bin/g++-4.3
26 #--compiler-bindir=/usr/bin/g++-4.4
27 #-Xcompiler -fopenmp -DTHRUST_DEVICE_BACKEND=THRUST_DEVICE_BACKEND_OMP
28 # NVCCFLAGS = -O3 $(INCLUDES) -arch $(ARCH) --compiler-bindir=/usr/bin/g++-4.3
29 #-Xcompiler -fopenmp -DTHRUST_DEVICE_BACKEND=THRUST_DEVICE_BACKEND_OMP
32 LDLIBS = -lstdc++ -lm -lcudart -lgomp
33 LDFLAGS = -L$(CUDA_ROOT)/lib64
36 $(NVCC) $(NVCCFLAGS) -c $< -o $@
39 all : phase_oscillator_chain phase_oscillator_ensemble lorenz_parameters relaxation
42 phase_oscillator_chain.co : phase_oscillator_chain.cu
43 phase_oscillator_chain : phase_oscillator_chain.co
44 $(CC) -o phase_oscillator_chain $(LDFLAGS) $(LDLIBS) phase_oscillator_chain.co
48 phase_oscillator_ensemble.co : phase_oscillator_ensemble.cu
49 phase_oscillator_ensemble : phase_oscillator_ensemble.co
50 $(CC) -o phase_oscillator_ensemble $(LDFLAGS) $(LDLIBS) phase_oscillator_ensemble.co
54 lorenz_parameters : lorenz_parameters.co
55 $(CC) -o lorenz_parameters $(LDFLAGS) $(LDLIBS) lorenz_parameters.co
56 lorenz_parameters.co : lorenz_parameters.cu
59 relaxation : relaxation.co
60 $(CC) -o relaxation $(LDFLAGS) $(LDLIBS) relaxation.co
61 relaxation.co : relaxation.cu
66 -rm *~ *.o *.co phase_oscillator_chain phase_oscillator_ensemble lorenz_parameters relaxation