diff options
Diffstat (limited to 'libs/numeric/odeint/examples/thrust/Makefile')
-rw-r--r-- | libs/numeric/odeint/examples/thrust/Makefile | 58 |
1 files changed, 13 insertions, 45 deletions
diff --git a/libs/numeric/odeint/examples/thrust/Makefile b/libs/numeric/odeint/examples/thrust/Makefile index 570a06673..5a33bdb32 100644 --- a/libs/numeric/odeint/examples/thrust/Makefile +++ b/libs/numeric/odeint/examples/thrust/Makefile @@ -1,66 +1,34 @@ -# Copyright 2011-2013 Mario Mulansky +# Copyright 2011-2014 Mario Mulansky # Copyright 2011-2012 Karsten Ahnert # # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or # copy at http://www.boost.org/LICENSE_1_0.txt) +# make sure BOOST_ROOT is pointing to your boost directory +# otherwise, set it here: +# BOOST_ROOT = /path/to/boost - -# CUDA_ROOT = /home/karsten/boost/cuda4.1/cuda/ +# path to the cuda installation CUDA_ROOT = /usr/local/cuda +# target architecture ARCH = sm_13 -CC = gcc -CXX = g++ NVCC = $(CUDA_ROOT)/bin/nvcc -# NVCC = g++ - -INCLUDES += -I$(BOOST_ROOT) -I$(THRUST_ROOT) -I$(CUDA_ROOT)/include -I../../../../.. - -NVCCFLAGS = -O3 $(INCLUDES) -arch $(ARCH) --compiler-bindir=/opt/gcc4.6.2/bin/ -Xcompiler -fopenmp -DTHRUST_DEVICE_BACKEND=THRUST_DEVICE_BACKEND_OMP -# NVCCFLAGS = -O3 $(INCLUDES) -arch $(ARCH) --compiler-bindir=/usr/bin/g++-4.3 -Xcompiler -fopenmp -DTHRUST_DEVICE_BACKEND=THRUST_DEVICE_BACKEND_OMP - -# NVCCFLAGS = -O3 $(INCLUDES) -arch $(ARCH) --compiler-bindir=/usr/bin/g++-4.3 - -#--compiler-bindir=/usr/bin/g++-4.4 -#-Xcompiler -fopenmp -DTHRUST_DEVICE_BACKEND=THRUST_DEVICE_BACKEND_OMP -# NVCCFLAGS = -O3 $(INCLUDES) -arch $(ARCH) --compiler-bindir=/usr/bin/g++-4.3 -#-Xcompiler -fopenmp -DTHRUST_DEVICE_BACKEND=THRUST_DEVICE_BACKEND_OMP +INCLUDES += -I../../include/ -I$(BOOST_ROOT) -LDLIBS = -lstdc++ -lm -lcudart -lgomp -LDFLAGS = -L$(CUDA_ROOT)/lib64 +NVCCFLAGS = -O3 $(INCLUDES) -arch $(ARCH) -%.co : %.cu +%.o : %.cu $(NVCC) $(NVCCFLAGS) -c $< -o $@ - -all : phase_oscillator_chain phase_oscillator_ensemble lorenz_parameters relaxation - - -phase_oscillator_chain.co : phase_oscillator_chain.cu -phase_oscillator_chain : phase_oscillator_chain.co - $(CC) -o phase_oscillator_chain $(LDFLAGS) $(LDLIBS) phase_oscillator_chain.co +% : %.o + $(NVCC) $(NVCCFLAGS) -o $@ $< - -phase_oscillator_ensemble.co : phase_oscillator_ensemble.cu -phase_oscillator_ensemble : phase_oscillator_ensemble.co - $(CC) -o phase_oscillator_ensemble $(LDFLAGS) $(LDLIBS) phase_oscillator_ensemble.co - - - -lorenz_parameters : lorenz_parameters.co - $(CC) -o lorenz_parameters $(LDFLAGS) $(LDLIBS) lorenz_parameters.co -lorenz_parameters.co : lorenz_parameters.cu - - -relaxation : relaxation.co - $(CC) -o relaxation $(LDFLAGS) $(LDLIBS) relaxation.co -relaxation.co : relaxation.cu - +all : phase_oscillator_chain phase_oscillator_ensemble lorenz_parameters relaxation clean : - -rm *~ *.o *.co phase_oscillator_chain phase_oscillator_ensemble lorenz_parameters relaxation + -rm *~ *.o phase_oscillator_chain phase_oscillator_ensemble lorenz_parameters relaxation |