diff --git a/CMakeLists.txt b/CMakeLists.txt index aff10922ac22364e175e28b0d74f4880837c7fc4..71284510e638dcc6e357e73d78925537af0ca194 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -154,6 +154,10 @@ else() message( FATAL_ERROR "BOOST is required in order to install OpenFPM" ) endif() +if (OPENMP_FOUND) + file(WRITE openmp_flags ${OpenMP_CXX_FLAGS}) +endif() + if(ENABLE_GPU AND CUDA_FOUND) set(DEFINE_CUDA_GPU "#define CUDA_GPU") endif() diff --git a/example/SparseGrid/3_gray_scott_3d_sparse_gpu_cs_opt/Makefile b/example/SparseGrid/3_gray_scott_3d_sparse_gpu_cs_opt/Makefile index 50373464fbc7429a088540b11eeff1bfa3dd6f29..7aa92176ccd5a91639dae2b2e54c20d55a115d9c 100644 --- a/example/SparseGrid/3_gray_scott_3d_sparse_gpu_cs_opt/Makefile +++ b/example/SparseGrid/3_gray_scott_3d_sparse_gpu_cs_opt/Makefile @@ -3,13 +3,19 @@ include ../../example.mk ### internally the example disable with the preprocessor its code if not compiled with nvcc CUDA_CC= CUDA_CC_LINK= -ifeq (, $(shell which nvcc)) +ifdef CUDA_ON_CPU CUDA_CC=mpic++ -x c++ $(INCLUDE_PATH) INCLUDE_PATH_NVCC= CUDA_CC_LINK=mpic++ else - CUDA_CC=nvcc -ccbin=mpic++ - CUDA_CC_LINK=nvcc -ccbin=mpic++ + ifeq (, $(shell which nvcc)) + CUDA_CC=mpic++ -x c++ $(INCLUDE_PATH) + INCLUDE_PATH_NVCC= + CUDA_CC_LINK=mpic++ + else + CUDA_CC=nvcc -ccbin=mpic++ + CUDA_CC_LINK=nvcc -ccbin=mpic++ + endif endif gray_scott_sparse_gpu_test: OPT += -DTEST_RUN diff --git a/example/SparseGrid/4_gray_scott_3d_sparse_surface_cs/Makefile b/example/SparseGrid/4_gray_scott_3d_sparse_surface_cs/Makefile index 54f2679d3ae46663ebe938d7ed35c9e27d6750dd..d6018ae5da5d5c219baa24a72a873d5dffecdff5 100644 --- a/example/SparseGrid/4_gray_scott_3d_sparse_surface_cs/Makefile +++ b/example/SparseGrid/4_gray_scott_3d_sparse_surface_cs/Makefile @@ -9,7 +9,7 @@ gray_scott_sparse_surface_cs_test: OPT += -DTEST_RUN gray_scott_sparse_surface_cs_test: gray_scott_sparse_surface_cs %.o: %.cpp - $(CC) -O3 -g $(OPT) -c --std=c++11 -o $@ $< $(INCLUDE_PATH) + $(CC) -O3 -g $(OPT) -c --std=c++14 -o $@ $< $(INCLUDE_PATH) gray_scott_sparse_surface_cs: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)