From 9e6da20df68cef029a96326f50751a14e35bbe56 Mon Sep 17 00:00:00 2001 From: Serhii Yaskovets <yaskovet@mpi-cbg.de> Date: Thu, 19 Oct 2023 20:56:20 +0200 Subject: [PATCH] Move example CC/NVCC parameters to common.mk --- example/Grid/0_simple/Makefile | 4 ++-- example/Grid/1_stencil/Makefile | 4 ++-- example/Grid/2_solve_eq/Makefile | 4 ++-- example/Grid/3_gray_scott/Makefile | 4 ++-- example/Grid/3_gray_scott_3d/Makefile | 4 ++-- .../3_gray_scott_3d_vectorization/Makefile | 4 ++-- example/Numerics/2D_ActiveFluid/Makefile | 4 ++-- .../0_sphere_redistancing/Makefile | 2 +- example/Numerics/OdeInt/Makefile | 4 ++-- example/Numerics/PS-CMA-ES/Makefile | 4 ++-- .../PSE/0_Derivative_approx_1D/Makefile | 2 +- .../PSE/1_Derivative_approx_1D_mp/Makefile | 2 +- example/Numerics/PSE/1_Diffusion_1D/Makefile | 2 +- .../Stoke_flow/0_2D_incompressible/Makefile | 2 +- .../Stoke_flow/1_3D_incompressible/Makefile | 2 +- .../2_2D_LidDrivenCavity_PC/Makefile | 2 +- .../Stoke_flow/3_3D_StokesFlowBall/Makefile | 2 +- example/Numerics/Surface_DCPSE/Bump/Makefile | 2 +- example/Numerics/Surface_DCPSE/Bunny/Makefile | 2 +- .../Numerics/Surface_DCPSE/Circle/Makefile | 2 +- .../Numerics/Surface_DCPSE/Ellipsoid/Makefile | 2 +- .../Numerics/Surface_DCPSE/Sphere/Makefile | 2 +- .../example_sussman_disk/Makefile | 2 +- .../example_sussman_images_2D/Makefile | 2 +- .../example_sussman_images_3D/Makefile | 2 +- .../example_sussman_sphere/Makefile | 2 +- example/Numerics/Vortex_in_cell/Makefile | 4 ++-- example/Performance/Nbody_benchmark/Makefile | 6 ++--- .../Syncthreads_kokkos_benchmark/Makefile | 6 ++--- example/Performance/memBW/Makefile | 6 ++--- example/Performance/memBW_multi/Makefile | 6 ++--- example/Performance/miniBUDE/Makefile | 6 ++--- example/Plot/0_simple_graph/Makefile | 4 ++-- example/Plot/2_PSE_convergence/Makefile | 4 ++-- .../Makefile | 4 ++-- .../1_gray_scott_3d_sparse/Makefile | 4 ++-- .../1_gray_scott_3d_sparse_gpu/Makefile | 4 ++-- .../2_gray_scott_3d_sparse_gpu_opt/Makefile | 4 ++-- .../2_gray_scott_3d_sparse_opt/Makefile | 4 ++-- .../3_gray_scott_3d_sparse_cs/Makefile | 4 ++-- .../3_gray_scott_3d_sparse_gpu_cs/Makefile | 4 ++-- .../Makefile | 4 ++-- .../Makefile | 4 ++-- .../5_gray_scott_3d_surface_cs_opt/Makefile | 4 ++-- .../Makefile | 4 ++-- .../Makefile | 4 ++-- .../SparseGrid/8_filling_benchmark/Makefile | 4 ++-- .../8_filling_benchmark_gpu/Makefile | 4 ++-- .../Makefile | 4 ++-- example/VCluster/0_simple/Makefile | 4 ++-- example/VCluster/1_semantic/Makefile | 4 ++-- .../VCluster/2_serial_and_parallel/Makefile | 4 ++-- example/Vector/0_simple/Makefile | 4 ++-- example/Vector/1_HDF5_save_load/Makefile | 4 ++-- example/Vector/1_celllist/Makefile | 4 ++-- example/Vector/1_ghost_get_put/Makefile | 4 ++-- example/Vector/1_gpu_first_step/Makefile | 6 ++--- example/Vector/2_expressions/Makefile | 4 ++-- example/Vector/3_molecular_dynamic/Makefile | 4 ++-- .../Vector/3_molecular_dynamic_gpu/Makefile | 4 ++-- .../3_molecular_dynamic_gpu_opt/Makefile | 6 ++--- example/Vector/4_complex_prop/Makefile | 4 ++-- .../4_multiphase_celllist_verlet/Makefile | 4 ++-- example/Vector/4_reorder/Makefile | 4 ++-- .../Vector/5_molecular_dynamic_sym/Makefile | 4 ++-- .../5_molecular_dynamic_sym_crs/Makefile | 4 ++-- example/Vector/6_complex_usage/Makefile | 4 ++-- example/Vector/7_SPH_dlb/Makefile | 4 ++-- example/Vector/7_SPH_dlb_gpu/Makefile | 6 ++--- .../Vector/7_SPH_dlb_gpu_more_opt/Makefile | 6 ++--- example/Vector/7_SPH_dlb_gpu_opt/Makefile | 6 ++--- example/Vector/7_SPH_dlb_opt/Makefile | 4 ++-- example/Vector/8_DEM/Makefile | 4 ++-- example/Vector/9_gpu_cuda_interop/Makefile | 6 ++--- example/common.mk | 24 ++++++++++--------- install | 4 ++-- 76 files changed, 157 insertions(+), 155 deletions(-) diff --git a/example/Grid/0_simple/Makefile b/example/Grid/0_simple/Makefile index fee751e77..25626ea0d 100644 --- a/example/Grid/0_simple/Makefile +++ b/example/Grid/0_simple/Makefile @@ -1,10 +1,10 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) grid: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Grid/1_stencil/Makefile b/example/Grid/1_stencil/Makefile index fb05ceb3e..4974cff0a 100644 --- a/example/Grid/1_stencil/Makefile +++ b/example/Grid/1_stencil/Makefile @@ -1,10 +1,10 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) stencil: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Grid/2_solve_eq/Makefile b/example/Grid/2_solve_eq/Makefile index aa96c4a2a..fe74085ee 100644 --- a/example/Grid/2_solve_eq/Makefile +++ b/example/Grid/2_solve_eq/Makefile @@ -1,10 +1,10 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) periodic: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Grid/3_gray_scott/Makefile b/example/Grid/3_gray_scott/Makefile index 10392737b..87a6dedac 100644 --- a/example/Grid/3_gray_scott/Makefile +++ b/example/Grid/3_gray_scott/Makefile @@ -1,10 +1,10 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) gray_scott: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Grid/3_gray_scott_3d/Makefile b/example/Grid/3_gray_scott_3d/Makefile index 702a33fe7..87a6dedac 100644 --- a/example/Grid/3_gray_scott_3d/Makefile +++ b/example/Grid/3_gray_scott_3d/Makefile @@ -1,10 +1,10 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o %.o: %.cpp - $(CC) -O3 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) gray_scott: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Grid/3_gray_scott_3d_vectorization/Makefile b/example/Grid/3_gray_scott_3d_vectorization/Makefile index f1d92367e..cb7f92e3a 100644 --- a/example/Grid/3_gray_scott_3d_vectorization/Makefile +++ b/example/Grid/3_gray_scott_3d_vectorization/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o update_new.o @@ -8,7 +8,7 @@ OBJ = main.o update_new.o mpif90 -ffree-line-length-none -fno-range-check -fno-second-underscore -fimplicit-none -mavx -O3 -c -g -o $@ $< %.o: %.cpp - $(CC) -O3 -mavx -g -c --std=c++14 -Wno-ignored-attributes -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -mavx -c -Wno-ignored-attributes -o $@ $< $(INCLUDE_PATH) gray_scott: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Numerics/2D_ActiveFluid/Makefile b/example/Numerics/2D_ActiveFluid/Makefile index 5a3f92c6b..5f5ee5b50 100644 --- a/example/Numerics/2D_ActiveFluid/Makefile +++ b/example/Numerics/2D_ActiveFluid/Makefile @@ -1,10 +1,10 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o %.o: %.cpp - $(CC) -O0 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) Active2d: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Numerics/Closest_point/0_sphere_redistancing/Makefile b/example/Numerics/Closest_point/0_sphere_redistancing/Makefile index a1d57e878..268820eb6 100644 --- a/example/Numerics/Closest_point/0_sphere_redistancing/Makefile +++ b/example/Numerics/Closest_point/0_sphere_redistancing/Makefile @@ -4,7 +4,7 @@ include ../../../example.mk OBJ = main.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) all: sphere_redistance diff --git a/example/Numerics/OdeInt/Makefile b/example/Numerics/OdeInt/Makefile index 063a16b40..f15b71c81 100644 --- a/example/Numerics/OdeInt/Makefile +++ b/example/Numerics/OdeInt/Makefile @@ -1,11 +1,11 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o OBJ2 = main2.o %.o: %.cpp - $(CC) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) example_odeint: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Numerics/PS-CMA-ES/Makefile b/example/Numerics/PS-CMA-ES/Makefile index 8650a377d..9010b0e86 100644 --- a/example/Numerics/PS-CMA-ES/Makefile +++ b/example/Numerics/PS-CMA-ES/Makefile @@ -1,10 +1,10 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o %.o: %.cpp - $(CC) -I/usr/local/cuda/include -O3 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) ps_cma_es: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Numerics/PSE/0_Derivative_approx_1D/Makefile b/example/Numerics/PSE/0_Derivative_approx_1D/Makefile index 5a5f90c9f..e43a95e06 100644 --- a/example/Numerics/PSE/0_Derivative_approx_1D/Makefile +++ b/example/Numerics/PSE/0_Derivative_approx_1D/Makefile @@ -4,7 +4,7 @@ include ../../../example.mk OBJ = main.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) pse_1d: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Numerics/PSE/1_Derivative_approx_1D_mp/Makefile b/example/Numerics/PSE/1_Derivative_approx_1D_mp/Makefile index 2c01f11bd..3a9a4727e 100644 --- a/example/Numerics/PSE/1_Derivative_approx_1D_mp/Makefile +++ b/example/Numerics/PSE/1_Derivative_approx_1D_mp/Makefile @@ -6,7 +6,7 @@ include ../../../example.mk OBJ_128 = main_float128.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) # pse_1d_128: $(OBJ_128) # $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) -lquadmath diff --git a/example/Numerics/PSE/1_Diffusion_1D/Makefile b/example/Numerics/PSE/1_Diffusion_1D/Makefile index faaf9dd0c..42480f1d8 100644 --- a/example/Numerics/PSE/1_Diffusion_1D/Makefile +++ b/example/Numerics/PSE/1_Diffusion_1D/Makefile @@ -4,7 +4,7 @@ include ../../../example.mk OBJ = main.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) diff_1d: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Numerics/Stoke_flow/0_2D_incompressible/Makefile b/example/Numerics/Stoke_flow/0_2D_incompressible/Makefile index 7dce97679..375c8ce07 100644 --- a/example/Numerics/Stoke_flow/0_2D_incompressible/Makefile +++ b/example/Numerics/Stoke_flow/0_2D_incompressible/Makefile @@ -5,7 +5,7 @@ OBJ_EIGEN = main_eigen.o OBJ_PETSC = main_petsc.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) all: stokes_2d_eigen stokes_2d_petsc diff --git a/example/Numerics/Stoke_flow/1_3D_incompressible/Makefile b/example/Numerics/Stoke_flow/1_3D_incompressible/Makefile index dd6ad2466..d253ab0bd 100644 --- a/example/Numerics/Stoke_flow/1_3D_incompressible/Makefile +++ b/example/Numerics/Stoke_flow/1_3D_incompressible/Makefile @@ -5,7 +5,7 @@ OBJ_EIGEN = main_eigen.o OBJ_PETSC = main_petsc.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) all: stokes_3d_eigen stokes_3d_petsc diff --git a/example/Numerics/Stoke_flow/2_2D_LidDrivenCavity_PC/Makefile b/example/Numerics/Stoke_flow/2_2D_LidDrivenCavity_PC/Makefile index 7385de919..a68ba6f66 100644 --- a/example/Numerics/Stoke_flow/2_2D_LidDrivenCavity_PC/Makefile +++ b/example/Numerics/Stoke_flow/2_2D_LidDrivenCavity_PC/Makefile @@ -5,7 +5,7 @@ OBJ = mainDCPSE.o OBJ2 = mainFD.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) DcpseLid: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Numerics/Stoke_flow/3_3D_StokesFlowBall/Makefile b/example/Numerics/Stoke_flow/3_3D_StokesFlowBall/Makefile index b096d58e3..ec9c833a9 100644 --- a/example/Numerics/Stoke_flow/3_3D_StokesFlowBall/Makefile +++ b/example/Numerics/Stoke_flow/3_3D_StokesFlowBall/Makefile @@ -4,7 +4,7 @@ include ../../../example.mk OBJ = main.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) Stokes3dBall: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Numerics/Surface_DCPSE/Bump/Makefile b/example/Numerics/Surface_DCPSE/Bump/Makefile index 5298d0f7d..c69deecb7 100644 --- a/example/Numerics/Surface_DCPSE/Bump/Makefile +++ b/example/Numerics/Surface_DCPSE/Bump/Makefile @@ -4,7 +4,7 @@ include ../../../example.mk OBJ = Bump.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) Bump: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Numerics/Surface_DCPSE/Bunny/Makefile b/example/Numerics/Surface_DCPSE/Bunny/Makefile index 6fbbf6767..cb805665c 100644 --- a/example/Numerics/Surface_DCPSE/Bunny/Makefile +++ b/example/Numerics/Surface_DCPSE/Bunny/Makefile @@ -4,7 +4,7 @@ include ../../../example.mk OBJ = Bunny.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) Bunny: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Numerics/Surface_DCPSE/Circle/Makefile b/example/Numerics/Surface_DCPSE/Circle/Makefile index ed0df1007..07c24ff9c 100644 --- a/example/Numerics/Surface_DCPSE/Circle/Makefile +++ b/example/Numerics/Surface_DCPSE/Circle/Makefile @@ -5,7 +5,7 @@ OBJ = CircLap.o OBJ2=CircPoisson.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) Circ: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Numerics/Surface_DCPSE/Ellipsoid/Makefile b/example/Numerics/Surface_DCPSE/Ellipsoid/Makefile index c715db5fa..34f399c35 100644 --- a/example/Numerics/Surface_DCPSE/Ellipsoid/Makefile +++ b/example/Numerics/Surface_DCPSE/Ellipsoid/Makefile @@ -4,7 +4,7 @@ include ../../../example.mk OBJ = Ellip.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) Ellipsoid: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Numerics/Surface_DCPSE/Sphere/Makefile b/example/Numerics/Surface_DCPSE/Sphere/Makefile index 0c4d7712b..3ec1e6be1 100644 --- a/example/Numerics/Surface_DCPSE/Sphere/Makefile +++ b/example/Numerics/Surface_DCPSE/Sphere/Makefile @@ -5,7 +5,7 @@ OBJ = Sph.o OBJ2 = SphBench.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) SphereE: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Numerics/Sussman_redistancing/example_sussman_disk/Makefile b/example/Numerics/Sussman_redistancing/example_sussman_disk/Makefile index b3952a7e4..ca3a7fe8d 100644 --- a/example/Numerics/Sussman_redistancing/example_sussman_disk/Makefile +++ b/example/Numerics/Sussman_redistancing/example_sussman_disk/Makefile @@ -4,7 +4,7 @@ include ../../../example.mk OBJ = main.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) example_sussman_disk: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Numerics/Sussman_redistancing/example_sussman_images_2D/Makefile b/example/Numerics/Sussman_redistancing/example_sussman_images_2D/Makefile index 3746f0a07..41f3ce667 100644 --- a/example/Numerics/Sussman_redistancing/example_sussman_images_2D/Makefile +++ b/example/Numerics/Sussman_redistancing/example_sussman_images_2D/Makefile @@ -4,7 +4,7 @@ include ../../../example.mk OBJ = main.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) example_sussman_images: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Numerics/Sussman_redistancing/example_sussman_images_3D/Makefile b/example/Numerics/Sussman_redistancing/example_sussman_images_3D/Makefile index 3746f0a07..41f3ce667 100644 --- a/example/Numerics/Sussman_redistancing/example_sussman_images_3D/Makefile +++ b/example/Numerics/Sussman_redistancing/example_sussman_images_3D/Makefile @@ -4,7 +4,7 @@ include ../../../example.mk OBJ = main.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) example_sussman_images: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Numerics/Sussman_redistancing/example_sussman_sphere/Makefile b/example/Numerics/Sussman_redistancing/example_sussman_sphere/Makefile index b0ba3e14d..e8ef1d14a 100644 --- a/example/Numerics/Sussman_redistancing/example_sussman_sphere/Makefile +++ b/example/Numerics/Sussman_redistancing/example_sussman_sphere/Makefile @@ -4,7 +4,7 @@ include ../../../example.mk OBJ = main.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) example_sussman_sphere: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Numerics/Vortex_in_cell/Makefile b/example/Numerics/Vortex_in_cell/Makefile index ca6538232..c184ea083 100644 --- a/example/Numerics/Vortex_in_cell/Makefile +++ b/example/Numerics/Vortex_in_cell/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ_VIC_PETSC = main_vic_petsc.o OBJ_VIC_PETSC_OPT = main_vic_petsc_opt.o @@ -10,7 +10,7 @@ vic_petsc_test: OPT += -DTEST_RUN vic_petsc_test: vic_petsc vic_petsc_opt %.o: %.cpp - $(CC) -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) vic_petsc_opt: $(OBJ_VIC_PETSC_OPT) $(CC) -o $@ $^ $(LIBS_PATH) $(LIBS) diff --git a/example/Performance/Nbody_benchmark/Makefile b/example/Performance/Nbody_benchmark/Makefile index d3033f6c8..05e594bb3 100644 --- a/example/Performance/Nbody_benchmark/Makefile +++ b/example/Performance/Nbody_benchmark/Makefile @@ -1,15 +1,15 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o nbody: %.o: %.cu - $(CUDA_CC) -O3 $(CUDA_OPTIONS) $(OPT) -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC) + $(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC) %.o: %.cpp - $(CC) -g -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) nbody: $(OBJ) $(CUDA_CC_LINK) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT) diff --git a/example/Performance/Syncthreads_kokkos_benchmark/Makefile b/example/Performance/Syncthreads_kokkos_benchmark/Makefile index ed3ab68e0..b128483d5 100644 --- a/example/Performance/Syncthreads_kokkos_benchmark/Makefile +++ b/example/Performance/Syncthreads_kokkos_benchmark/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o @@ -8,10 +8,10 @@ sync_dlb_test: sync_dlb cuda: %.o: %.cu - $(CUDA_CC) -O3 $(OPT) $(CUDA_OPTIONS) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC) + $(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC) %.o: %.cpp - $(CC) -O0 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) cuda: $(OBJ) $(CUDA_CC_LINK) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT) diff --git a/example/Performance/memBW/Makefile b/example/Performance/memBW/Makefile index 974224d00..e32c43053 100644 --- a/example/Performance/memBW/Makefile +++ b/example/Performance/memBW/Makefile @@ -1,15 +1,15 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o memBW: %.o: %.cu - $(CUDA_CC) -O3 $(CUDA_OPTIONS) $(OPT) -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC) + $(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC) %.o: %.cpp - $(CC) -g -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) memBW: $(OBJ) $(CUDA_CC_LINK) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT) diff --git a/example/Performance/memBW_multi/Makefile b/example/Performance/memBW_multi/Makefile index a8f60ed2b..e65fd07fe 100644 --- a/example/Performance/memBW_multi/Makefile +++ b/example/Performance/memBW_multi/Makefile @@ -1,15 +1,15 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o memBW: %.o: %.cu - $(CUDA_CC) -O3 -g $(CUDA_OPTIONS) $(OPT) -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC) + $(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC) %.o: %.cpp - $(CC) -g -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) memBW: $(OBJ) $(CUDA_CC_LINK) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT) diff --git a/example/Performance/miniBUDE/Makefile b/example/Performance/miniBUDE/Makefile index 7cc2d1fa0..ae23f6132 100644 --- a/example/Performance/miniBUDE/Makefile +++ b/example/Performance/miniBUDE/Makefile @@ -1,15 +1,15 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o miniBUDE: %.o: %.cu - $(CUDA_CC) -O3 $(CUDA_OPTIONS) $(OPT) -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC) + $(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC) %.o: %.cpp - $(CC) -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) miniBUDE: $(OBJ) $(CUDA_CC_LINK) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT) diff --git a/example/Plot/0_simple_graph/Makefile b/example/Plot/0_simple_graph/Makefile index 444776c38..1676ac40d 100644 --- a/example/Plot/0_simple_graph/Makefile +++ b/example/Plot/0_simple_graph/Makefile @@ -1,10 +1,10 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o %.o: %.cpp - $(CC) -O3 -g3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) plot: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Plot/2_PSE_convergence/Makefile b/example/Plot/2_PSE_convergence/Makefile index b62564939..fec4a3090 100644 --- a/example/Plot/2_PSE_convergence/Makefile +++ b/example/Plot/2_PSE_convergence/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk #### this example work only if you have quadmath activated ### #### (only if -lquadmath work) uncomment to reactivate @@ -7,7 +7,7 @@ include ../../example.mk #OBJ = main.o #%.o: %.cpp -# $(CC) -O3 -g3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH) +# $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) #conv_p: $(OBJ) # $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) -lquadmath diff --git a/example/SparseGrid/10_heat_conduction_reticulate_porous_ceramics/Makefile b/example/SparseGrid/10_heat_conduction_reticulate_porous_ceramics/Makefile index 84437da25..805bd05f3 100644 --- a/example/SparseGrid/10_heat_conduction_reticulate_porous_ceramics/Makefile +++ b/example/SparseGrid/10_heat_conduction_reticulate_porous_ceramics/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o DATA = reactiondiffusion_imagebased_porousmedia-main.tar.gz @@ -16,7 +16,7 @@ $(DATA): rm -rf reactiondiffusion_imagebased_porousmedia-main/ %.o: %.cu - $(CUDA_CC) -O3 $(OPT) $(CUDA_OPTIONS) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC) + $(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC) heat_ceram: $(OBJ) $(DATA) $(CUDA_CC_LINK) -o $@ $(OBJ) $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT) diff --git a/example/SparseGrid/1_gray_scott_3d_sparse/Makefile b/example/SparseGrid/1_gray_scott_3d_sparse/Makefile index bf9004bbd..3f087db43 100644 --- a/example/SparseGrid/1_gray_scott_3d_sparse/Makefile +++ b/example/SparseGrid/1_gray_scott_3d_sparse/Makefile @@ -1,12 +1,12 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o gray_scott_sparse_test: OPT += -DTEST_RUN gray_scott_sparse_test: gray_scott_sparse %.o: %.cpp - $(CC) -O3 -g $(OPT) -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) gray_scott_sparse: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/SparseGrid/1_gray_scott_3d_sparse_gpu/Makefile b/example/SparseGrid/1_gray_scott_3d_sparse_gpu/Makefile index 9adb3283a..350174184 100644 --- a/example/SparseGrid/1_gray_scott_3d_sparse_gpu/Makefile +++ b/example/SparseGrid/1_gray_scott_3d_sparse_gpu/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o @@ -7,7 +7,7 @@ gray_scott_sparse_gpu_test: OPT += -DTEST_RUN gray_scott_sparse_gpu_test: gray_scott_sparse_gpu %.o: %.cu - $(CUDA_CC) -O3 $(OPT) $(CUDA_OPTIONS) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC) + $(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC) gray_scott_sparse_gpu: $(OBJ) $(CUDA_CC_LINK) -o $@ $^ $(LIBS_PATH) $(LIBS_SELECT) diff --git a/example/SparseGrid/2_gray_scott_3d_sparse_gpu_opt/Makefile b/example/SparseGrid/2_gray_scott_3d_sparse_gpu_opt/Makefile index 619f8d3fe..cadfc5b87 100644 --- a/example/SparseGrid/2_gray_scott_3d_sparse_gpu_opt/Makefile +++ b/example/SparseGrid/2_gray_scott_3d_sparse_gpu_opt/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk gray_scott_sparse_gpu_test: OPT += -DTEST_RUN gray_scott_sparse_gpu_test: gray_scott_sparse_gpu @@ -7,7 +7,7 @@ gray_scott_sparse_gpu_test: gray_scott_sparse_gpu OBJ = main.o %.o: %.cu - $(CUDA_CC) -O3 $(OPT) $(CUDA_OPTIONS) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC) + $(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC) gray_scott_sparse_gpu: $(OBJ) $(CUDA_CC_LINK) -o $@ $^ $(LIBS_PATH) $(LIBS_SELECT) diff --git a/example/SparseGrid/2_gray_scott_3d_sparse_opt/Makefile b/example/SparseGrid/2_gray_scott_3d_sparse_opt/Makefile index 800a9b219..1079b2de5 100644 --- a/example/SparseGrid/2_gray_scott_3d_sparse_opt/Makefile +++ b/example/SparseGrid/2_gray_scott_3d_sparse_opt/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o @@ -8,7 +8,7 @@ gray_scott_sparse_opt_test: OPT += -DTEST_RUN gray_scott_sparse_opt_test: gray_scott_sparse_opt %.o: %.cpp - $(CC) -mavx -O3 -g $(OPT) -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) -mavx -$(OPT) -c -o $@ $< $(INCLUDE_PATH) gray_scott_sparse_opt: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/SparseGrid/3_gray_scott_3d_sparse_cs/Makefile b/example/SparseGrid/3_gray_scott_3d_sparse_cs/Makefile index e329d7169..9d3e16495 100644 --- a/example/SparseGrid/3_gray_scott_3d_sparse_cs/Makefile +++ b/example/SparseGrid/3_gray_scott_3d_sparse_cs/Makefile @@ -1,12 +1,12 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o gray_scott_sparse_cs_test: OPT += -DTEST_RUN gray_scott_sparse_cs_test: gray_scott_sparse_cs %.o: %.cpp - $(CC) -O3 -g $(OPT) -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) gray_scott_sparse_cs: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/SparseGrid/3_gray_scott_3d_sparse_gpu_cs/Makefile b/example/SparseGrid/3_gray_scott_3d_sparse_gpu_cs/Makefile index 07f57b0b4..350174184 100644 --- a/example/SparseGrid/3_gray_scott_3d_sparse_gpu_cs/Makefile +++ b/example/SparseGrid/3_gray_scott_3d_sparse_gpu_cs/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o @@ -7,7 +7,7 @@ gray_scott_sparse_gpu_test: OPT += -DTEST_RUN gray_scott_sparse_gpu_test: gray_scott_sparse_gpu %.o: %.cu - $(CUDA_CC) $(OPT) $(CUDA_OPTIONS) -O3 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC) + $(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC) gray_scott_sparse_gpu: $(OBJ) $(CUDA_CC_LINK) -o $@ $^ $(LIBS_PATH) $(LIBS_SELECT) 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 07f57b0b4..350174184 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 @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o @@ -7,7 +7,7 @@ gray_scott_sparse_gpu_test: OPT += -DTEST_RUN gray_scott_sparse_gpu_test: gray_scott_sparse_gpu %.o: %.cu - $(CUDA_CC) $(OPT) $(CUDA_OPTIONS) -O3 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC) + $(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC) gray_scott_sparse_gpu: $(OBJ) $(CUDA_CC_LINK) -o $@ $^ $(LIBS_PATH) $(LIBS_SELECT) 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 63186e0b7..9aa2c2794 100644 --- a/example/SparseGrid/4_gray_scott_3d_sparse_surface_cs/Makefile +++ b/example/SparseGrid/4_gray_scott_3d_sparse_surface_cs/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o @@ -7,7 +7,7 @@ gray_scott_sparse_cs_surface: OPT += -DTEST_RUN gray_scott_sparse_cs_surface: gray_scott_sparse_surface_cs %.o: %.cpp - $(CC) -O3 -g $(OPT) -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) gray_scott_sparse_surface_cs: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/SparseGrid/5_gray_scott_3d_surface_cs_opt/Makefile b/example/SparseGrid/5_gray_scott_3d_surface_cs_opt/Makefile index c4688e433..991fd0ac8 100644 --- a/example/SparseGrid/5_gray_scott_3d_surface_cs_opt/Makefile +++ b/example/SparseGrid/5_gray_scott_3d_surface_cs_opt/Makefile @@ -1,12 +1,12 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o 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++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) gray_scott_sparse_surface_cs: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/SparseGrid/6_gray_scott_3d_sparse_gpu_opt_weak_scal/Makefile b/example/SparseGrid/6_gray_scott_3d_sparse_gpu_opt_weak_scal/Makefile index 9adb3283a..350174184 100644 --- a/example/SparseGrid/6_gray_scott_3d_sparse_gpu_opt_weak_scal/Makefile +++ b/example/SparseGrid/6_gray_scott_3d_sparse_gpu_opt_weak_scal/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o @@ -7,7 +7,7 @@ gray_scott_sparse_gpu_test: OPT += -DTEST_RUN gray_scott_sparse_gpu_test: gray_scott_sparse_gpu %.o: %.cu - $(CUDA_CC) -O3 $(OPT) $(CUDA_OPTIONS) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC) + $(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC) gray_scott_sparse_gpu: $(OBJ) $(CUDA_CC_LINK) -o $@ $^ $(LIBS_PATH) $(LIBS_SELECT) diff --git a/example/SparseGrid/7_gray_scott_3d_sparse_gpu_sphere_expanding/Makefile b/example/SparseGrid/7_gray_scott_3d_sparse_gpu_sphere_expanding/Makefile index feac80b73..ea08cfea6 100644 --- a/example/SparseGrid/7_gray_scott_3d_sparse_gpu_sphere_expanding/Makefile +++ b/example/SparseGrid/7_gray_scott_3d_sparse_gpu_sphere_expanding/Makefile @@ -1,10 +1,10 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o %.o: %.cu - $(CUDA_CC) $(OPT) $(CUDA_OPTIONS) -O3 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC) + $(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC) gray_scott_sparse_gpu: $(OBJ) $(CUDA_CC_LINK) -o $@ $^ $(LIBS_PATH) $(LIBS_SELECT) diff --git a/example/SparseGrid/8_filling_benchmark/Makefile b/example/SparseGrid/8_filling_benchmark/Makefile index 040b3fdb1..2c364f931 100644 --- a/example/SparseGrid/8_filling_benchmark/Makefile +++ b/example/SparseGrid/8_filling_benchmark/Makefile @@ -1,12 +1,12 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o gray_scott_sparse_opt_test: OPT += -DTEST_RUN gray_scott_sparse_opt_test: gray_scott_sparse_opt %.o: %.cpp - $(CC) -mavx -O3 -g $(OPT) -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) -mavx $(OPT) -c -o $@ $< $(INCLUDE_PATH) gray_scott_sparse_opt: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/SparseGrid/8_filling_benchmark_gpu/Makefile b/example/SparseGrid/8_filling_benchmark_gpu/Makefile index 619f8d3fe..cadfc5b87 100644 --- a/example/SparseGrid/8_filling_benchmark_gpu/Makefile +++ b/example/SparseGrid/8_filling_benchmark_gpu/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk gray_scott_sparse_gpu_test: OPT += -DTEST_RUN gray_scott_sparse_gpu_test: gray_scott_sparse_gpu @@ -7,7 +7,7 @@ gray_scott_sparse_gpu_test: gray_scott_sparse_gpu OBJ = main.o %.o: %.cu - $(CUDA_CC) -O3 $(OPT) $(CUDA_OPTIONS) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC) + $(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC) gray_scott_sparse_gpu: $(OBJ) $(CUDA_CC_LINK) -o $@ $^ $(LIBS_PATH) $(LIBS_SELECT) diff --git a/example/SparseGrid/9_inhomogeneous_diffusion_porous_catalyst_CaCO3/Makefile b/example/SparseGrid/9_inhomogeneous_diffusion_porous_catalyst_CaCO3/Makefile index f5b06ead6..133703ff9 100644 --- a/example/SparseGrid/9_inhomogeneous_diffusion_porous_catalyst_CaCO3/Makefile +++ b/example/SparseGrid/9_inhomogeneous_diffusion_porous_catalyst_CaCO3/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o DATA = reactiondiffusion_imagebased_porousmedia-main.tar.gz @@ -16,7 +16,7 @@ $(DATA): rm -rf reactiondiffusion_imagebased_porousmedia-main/ %.o: %.cu - $(CUDA_CC) -O3 $(OPT) $(CUDA_OPTIONS) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC) + $(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC) diff_CaCO3: $(OBJ) $(DATA) $(CUDA_CC_LINK) -o $@ $(OBJ) $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT) diff --git a/example/VCluster/0_simple/Makefile b/example/VCluster/0_simple/Makefile index a8481189a..95a283c5e 100644 --- a/example/VCluster/0_simple/Makefile +++ b/example/VCluster/0_simple/Makefile @@ -1,10 +1,10 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) vcluster: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/VCluster/1_semantic/Makefile b/example/VCluster/1_semantic/Makefile index 7bd6612ec..95a283c5e 100644 --- a/example/VCluster/1_semantic/Makefile +++ b/example/VCluster/1_semantic/Makefile @@ -1,10 +1,10 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o %.o: %.cpp - $(CC) -O3 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) vcluster: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/VCluster/2_serial_and_parallel/Makefile b/example/VCluster/2_serial_and_parallel/Makefile index 0aa3d7cc8..163dd1d96 100644 --- a/example/VCluster/2_serial_and_parallel/Makefile +++ b/example/VCluster/2_serial_and_parallel/Makefile @@ -1,10 +1,10 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o %.o: %.cpp - $(CC) -O3 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) serial_parallel: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Vector/0_simple/Makefile b/example/Vector/0_simple/Makefile index aea6cc569..5630d6645 100644 --- a/example/Vector/0_simple/Makefile +++ b/example/Vector/0_simple/Makefile @@ -1,10 +1,10 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o %.o: %.cpp - $(CC) -O0 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) vect: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Vector/1_HDF5_save_load/Makefile b/example/Vector/1_HDF5_save_load/Makefile index 458d9e3d7..491d19c22 100644 --- a/example/Vector/1_HDF5_save_load/Makefile +++ b/example/Vector/1_HDF5_save_load/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o @@ -7,7 +7,7 @@ all: hdf5 %.o: %.cpp - $(CC) -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) hdf5: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Vector/1_celllist/Makefile b/example/Vector/1_celllist/Makefile index 326da57f5..781c64696 100644 --- a/example/Vector/1_celllist/Makefile +++ b/example/Vector/1_celllist/Makefile @@ -1,10 +1,10 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) cell: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Vector/1_ghost_get_put/Makefile b/example/Vector/1_ghost_get_put/Makefile index 8e9e901dd..795964a14 100644 --- a/example/Vector/1_ghost_get_put/Makefile +++ b/example/Vector/1_ghost_get_put/Makefile @@ -1,10 +1,10 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o %.o: %.cpp - $(CC) -O3 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) ghost: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Vector/1_gpu_first_step/Makefile b/example/Vector/1_gpu_first_step/Makefile index a3d5f7929..1fb6fd227 100644 --- a/example/Vector/1_gpu_first_step/Makefile +++ b/example/Vector/1_gpu_first_step/Makefile @@ -1,15 +1,15 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o gpu_fstep: %.o: %.cu - $(CUDA_CC) -O3 -g $(CUDA_OPTIONS) -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC) + $(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC) %.o: %.cpp - $(CC) -O3 $(OPT) -g -c --std=c++11 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) gpu_fstep: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT) diff --git a/example/Vector/2_expressions/Makefile b/example/Vector/2_expressions/Makefile index 9474b9b73..d4c9c4409 100644 --- a/example/Vector/2_expressions/Makefile +++ b/example/Vector/2_expressions/Makefile @@ -1,10 +1,10 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) expr: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Vector/3_molecular_dynamic/Makefile b/example/Vector/3_molecular_dynamic/Makefile index 6f3a26f0e..31c5e5e2a 100644 --- a/example/Vector/3_molecular_dynamic/Makefile +++ b/example/Vector/3_molecular_dynamic/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o OBJ_EXPR = main_expr.o @@ -9,7 +9,7 @@ OBJ_EXPR_PAP = main_expr_paper.o all: md_dyn md_dyn_expr md_dyn_vl md_dyn_pap %.o: %.cpp - $(CC) -O3 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) md_dyn: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Vector/3_molecular_dynamic_gpu/Makefile b/example/Vector/3_molecular_dynamic_gpu/Makefile index eaa8cc206..dd525c6d5 100644 --- a/example/Vector/3_molecular_dynamic_gpu/Makefile +++ b/example/Vector/3_molecular_dynamic_gpu/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o @@ -9,7 +9,7 @@ md_dyn_test: OPT += -DTEST_RUN md_dyn_test: md_dyn %.o: %.cu - $(CUDA_CC) $(OPT) $(CUDA_OPTIONS) -O3 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC) + $(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC) md_dyn: $(OBJ) $(CUDA_CC_LINK) -o $@ $^ $(LIBS_PATH) $(LIBS_SELECT) diff --git a/example/Vector/3_molecular_dynamic_gpu_opt/Makefile b/example/Vector/3_molecular_dynamic_gpu_opt/Makefile index be132bd95..a313cee66 100644 --- a/example/Vector/3_molecular_dynamic_gpu_opt/Makefile +++ b/example/Vector/3_molecular_dynamic_gpu_opt/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ_GPU = main_gpu.o OBJ_CPU = main_cpu.o @@ -11,10 +11,10 @@ md_dyn_gpu_test: OPT += -DTEST_RUN md_dyn_gpu_test: all %.o: %.cu - $(CUDA_CC) -O3 $(OPT) $(CUDA_OPTIONS) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC) + $(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC) %.o: %.cpp - $(CC) $(OPT) -O3 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) md_dyn_gpu: $(OBJ_GPU) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Vector/4_complex_prop/Makefile b/example/Vector/4_complex_prop/Makefile index e12643515..fd6cce573 100644 --- a/example/Vector/4_complex_prop/Makefile +++ b/example/Vector/4_complex_prop/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o OBJ_SER = main_ser.o @@ -7,7 +7,7 @@ OBJ_SER = main_ser.o all: vect_cp vect_ser %.o: %.cpp - $(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) vect_cp: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Vector/4_multiphase_celllist_verlet/Makefile b/example/Vector/4_multiphase_celllist_verlet/Makefile index be886b092..fec6cb98e 100644 --- a/example/Vector/4_multiphase_celllist_verlet/Makefile +++ b/example/Vector/4_multiphase_celllist_verlet/Makefile @@ -1,10 +1,10 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o %.o: %.cpp - $(CC) -O3 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) multip: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Vector/4_reorder/Makefile b/example/Vector/4_reorder/Makefile index e4a50cab8..6e34abf4f 100644 --- a/example/Vector/4_reorder/Makefile +++ b/example/Vector/4_reorder/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ_DORD = main_data_ord.o OBJ_CORD = main_comp_ord.o @@ -9,7 +9,7 @@ all_test: OPT += -DTEST_RUN all_test: md_data_ord_test md_comp_ord_test %.o: %.cpp - $(CC) -O3 -g -c --std=c++14 $(OPT) -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) md_data_ord: $(OBJ_DORD) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Vector/5_molecular_dynamic_sym/Makefile b/example/Vector/5_molecular_dynamic_sym/Makefile index 8f964a975..7202d8283 100644 --- a/example/Vector/5_molecular_dynamic_sym/Makefile +++ b/example/Vector/5_molecular_dynamic_sym/Makefile @@ -1,12 +1,12 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ_DORD = main.o all: md_sym %.o: %.cpp - $(CC) -O3 -g -c --std=c++14 $(OPT) -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) md_sym: $(OBJ_DORD) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Vector/5_molecular_dynamic_sym_crs/Makefile b/example/Vector/5_molecular_dynamic_sym_crs/Makefile index 8f964a975..7202d8283 100644 --- a/example/Vector/5_molecular_dynamic_sym_crs/Makefile +++ b/example/Vector/5_molecular_dynamic_sym_crs/Makefile @@ -1,12 +1,12 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ_DORD = main.o all: md_sym %.o: %.cpp - $(CC) -O3 -g -c --std=c++14 $(OPT) -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) md_sym: $(OBJ_DORD) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Vector/6_complex_usage/Makefile b/example/Vector/6_complex_usage/Makefile index c961e4c42..a4de2b3d4 100644 --- a/example/Vector/6_complex_usage/Makefile +++ b/example/Vector/6_complex_usage/Makefile @@ -1,12 +1,12 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ_DORD = main.o all: complex_use %.o: %.cpp - $(CC) -O3 -g -c --std=c++14 $(OPT) -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) complex_use: $(OBJ_DORD) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Vector/7_SPH_dlb/Makefile b/example/Vector/7_SPH_dlb/Makefile index 4da261b6d..33544bcc7 100644 --- a/example/Vector/7_SPH_dlb/Makefile +++ b/example/Vector/7_SPH_dlb/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o @@ -8,7 +8,7 @@ sph_dlb_test: OPT += -DTEST_RUN sph_dlb_test: sph_dlb %.o: %.cpp - $(CC) -O3 -g $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) sph_dlb: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Vector/7_SPH_dlb_gpu/Makefile b/example/Vector/7_SPH_dlb_gpu/Makefile index f4819a42c..46ae11f7a 100644 --- a/example/Vector/7_SPH_dlb_gpu/Makefile +++ b/example/Vector/7_SPH_dlb_gpu/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o @@ -8,10 +8,10 @@ sph_dlb_test: OPT += -DTEST_RUN sph_dlb_test: sph_dlb %.o: %.cu - $(CUDA_CC) $(CUDA_OPTIONS) $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC) + $(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC) %.o: %.cpp - $(CC) -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) sph_dlb: $(OBJ) $(CUDA_CC_LINK) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT) diff --git a/example/Vector/7_SPH_dlb_gpu_more_opt/Makefile b/example/Vector/7_SPH_dlb_gpu_more_opt/Makefile index c9728dac8..98181a60c 100644 --- a/example/Vector/7_SPH_dlb_gpu_more_opt/Makefile +++ b/example/Vector/7_SPH_dlb_gpu_more_opt/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o @@ -8,10 +8,10 @@ sph_dlb_test: OPT += -DTEST_RUN sph_dlb_test: sph_dlb %.o: %.cu - $(CUDA_CC) -O3 $(OPT) $(CUDA_OPTIONS) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC) + $(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC) %.o: %.cpp - $(CC) -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) sph_dlb: $(OBJ) $(CUDA_CC_LINK) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT) diff --git a/example/Vector/7_SPH_dlb_gpu_opt/Makefile b/example/Vector/7_SPH_dlb_gpu_opt/Makefile index a36643460..5f3c3d22d 100644 --- a/example/Vector/7_SPH_dlb_gpu_opt/Makefile +++ b/example/Vector/7_SPH_dlb_gpu_opt/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o @@ -8,10 +8,10 @@ sph_dlb_test: OPT += -DTEST_RUN sph_dlb_test: sph_dlb %.o: %.cu - $(CUDA_CC) -O3 $(OPT) $(CUDA_OPTIONS) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC) + $(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC) %.o: %.cpp - $(CC) -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) sph_dlb: $(OBJ) $(CUDA_CC_LINK) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT) diff --git a/example/Vector/7_SPH_dlb_opt/Makefile b/example/Vector/7_SPH_dlb_opt/Makefile index d190bf27b..9e97ce5e6 100644 --- a/example/Vector/7_SPH_dlb_opt/Makefile +++ b/example/Vector/7_SPH_dlb_opt/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o @@ -9,7 +9,7 @@ sph_dlb_test: OPT += -DTEST_RUN sph_dlb_test: sph_dlb %.o: %.cpp - $(CC) -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) sph_dlb: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Vector/8_DEM/Makefile b/example/Vector/8_DEM/Makefile index 3857b0510..5a4f3f665 100644 --- a/example/Vector/8_DEM/Makefile +++ b/example/Vector/8_DEM/Makefile @@ -1,5 +1,5 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o @@ -9,7 +9,7 @@ dem_test: OPT += -DTEST_RUN dem_test: all %.o: %.cpp - $(CC) -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) dem: $(OBJ) $(CC) -o $@ $^ $(OPT) $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Vector/9_gpu_cuda_interop/Makefile b/example/Vector/9_gpu_cuda_interop/Makefile index 30c93e541..d7bea3e0d 100644 --- a/example/Vector/9_gpu_cuda_interop/Makefile +++ b/example/Vector/9_gpu_cuda_interop/Makefile @@ -1,15 +1,15 @@ -include ../../common.mk include ../../example.mk +include ../../common.mk OBJ = main.o gpu_interop: %.o: %.cu - $(CUDA_CC) -O3 $(OPT) $(CUDA_OPTIONS) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC) + $(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC) %.o: %.cpp - $(CC) -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH) + $(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH) gpu_interop: $(OBJ) $(CUDA_CC_LINK) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT) diff --git a/example/common.mk b/example/common.mk index 85ce5519c..a6a536b74 100644 --- a/example/common.mk +++ b/example/common.mk @@ -1,4 +1,5 @@ # SET ENVIRONMENT VARIABLES ACCORDING TO ONE OF THE SUPPORTED MODES (cpu, gpu-nvcc, gpu-hip, gpu-emulated (CUDA_ON_CPU)) +# openfpm installed and the gpu examples have to be compiled in the same mode (i.e. via nvcc, hip or gpu-emulated (CUDA_ON_CPU)) ### This is a trick to avoid "Command not found if you no not have NVCC compiler". In practice the normal C++ compiler is used ### internally the example disable with the preprocessor its code if not compiled with nvcc @@ -7,29 +8,30 @@ CUDA_CC_LINK= ifdef HIP CUDA_CC=hipcc - CUDA_OPTIONS=-D__NVCC__ -D__HIP__ -DCUDART_VERSION=11000 -D__CUDACC__ -D__CUDACC_VER_MAJOR__=11 -D__CUDACC_VER_MINOR__=0 -D__CUDACC_VER_BUILD__=0 + CUDA_OPTIONS=-O3 --std=c++14 -D__NVCC__ -D__HIP__ -DCUDART_VERSION=11000 -D__CUDACC__ -D__CUDACC_VER_MAJOR__=11 -D__CUDACC_VER_MINOR__=0 -D__CUDACC_VER_BUILD__=0 LIBS_SELECT=$(LIBS) CC=hipcc CUDA_CC_LINK=hipcc else CC=mpic++ ifdef CUDA_ON_CPU - CUDA_CC=mpic++ -x c++ $(INCLUDE_PATH) - INCLUDE_PATH_NVCC= + CUDA_CC=mpic++ -x c++ + INCLUDE_PATH_NVCC=$(INCLUDE_PATH) CUDA_CC_LINK=mpic++ - CUDA_OPTIONS=-D__NVCC__ -DCUDART_VERSION=11000 - LIBS_SELECT=$(LIBS) + CUDA_OPTIONS=-O3 --std=c++14 -D__NVCC__ -DCUDART_VERSION=11000 + LIBS_SELECT=$(LIBS) -lboost_context else ifeq (, $(shell which nvcc)) - CUDA_CC=mpic++ -x c++ $(INCLUDE_PATH) + CUDA_CC=tput setaf 1; echo "ERROR: NVCC not found; HIP and CUDA_ON_CPU disabled!"; tput sgr0 \# INCLUDE_PATH_NVCC= - CUDA_CC_LINK=mpic++ + CUDA_CC_LINK=\# CUDA_OPTIONS= - LIBS_SELECT=$(LIBS) + LIBS_SELECT= else + INCLUDE_PATH_NVCC:=-Xcompiler=-Wno-deprecated-declarations $(INCLUDE_PATH_NVCC) CUDA_CC=nvcc -ccbin=mpic++ CUDA_CC_LINK=nvcc -ccbin=mpic++ - CUDA_OPTIONS=-use_fast_math -arch=sm_61 -lineinfo --extended-lambda --expt-relaxed-constexpr + CUDA_OPTIONS=-O3 --std=c++14 -use_fast_math -arch=sm_61 -lineinfo --extended-lambda --expt-relaxed-constexpr LIBS_SELECT=$(LIBS_NVCC) endif endif @@ -44,7 +46,7 @@ else CUDA_CC_LINK:=$(CUDA_CC_LINK) endif -LDIR = -OPT= +OPT=-g -O3 --std=c++14 +INCLUDE_PATH:=-Wno-deprecated-declarations $(INCLUDE_PATH) INCLUDE_PATH_NVCC:=$(INCLUDE_PATH_NVCC) -I./include diff --git a/install b/install index 639179961..61e26be0a 100755 --- a/install +++ b/install @@ -467,14 +467,14 @@ elif [ -d "$i_dir/HDF5/lib64" ]; then hdf5_lib_dir=-L$i_dir/HDF5/lib64 fi -echo "INCLUDE_PATH=$mpi_include_dirs $cuda_include_dirs -Wno-deprecated-declarations $openmp_flags -I. -I$install_base/openfpm_numerics/include -I$install_base/openfpm_pdata/include/config -I$install_base/openfpm_pdata/include -I$install_base/openfpm_data/include -I$install_base/openfpm_vcluster/include -I$install_base/openfpm_io/include -I$install_base/openfpm_devices/include -I$i_dir/VCDEVEL/include -I$i_dir/METIS/include -I$i_dir/PARMETIS/include -I$i_dir/BOOST/include -I$i_dir/HDF5/include -I$i_dir/LIBHILBERT/include $lin_alg_inc -I$i_dir/BLITZ/include -I$i_dir/ALGOIM/include -I$i_dir/SUITESPARSE/include " > example.mk +echo "INCLUDE_PATH=$mpi_include_dirs $cuda_include_dirs $openmp_flags -I. -I$install_base/openfpm_numerics/include -I$install_base/openfpm_pdata/include/config -I$install_base/openfpm_pdata/include -I$install_base/openfpm_data/include -I$install_base/openfpm_vcluster/include -I$install_base/openfpm_io/include -I$install_base/openfpm_devices/include -I$i_dir/VCDEVEL/include -I$i_dir/METIS/include -I$i_dir/PARMETIS/include -I$i_dir/BOOST/include -I$i_dir/HDF5/include -I$i_dir/LIBHILBERT/include $lin_alg_inc -I$i_dir/BLITZ/include -I$i_dir/ALGOIM/include -I$i_dir/SUITESPARSE/include " > example.mk echo "LIBS_PATH=$mpi_libs -L$install_base/openfpm_devices/lib -L$install_base/openfpm_pdata/lib -L$install_base/openfpm_vcluster/lib -L$i_dir/VCDEVEL/lib -L$i_dir/METIS/lib -L$i_dir/PARMETIS/lib -L$i_dir/BOOST/lib $hdf5_lib_dir -L$i_dir/LIBHILBERT/lib $lin_alg_dir " >> example.mk if [ x"$cuda_on_cpu" == x"YES" ]; then echo "CUDA_ON_CPU=YES" >> example.mk fi echo "LIBS=$openmp_flags $mpi_libs $openmp_libs -lvcluster -lofpm_pdata -lofpmmemory -lparmetis -lmetis -lboost_iostreams -lboost_program_options -lhdf5 -llibhilbert -lVc $(cat cuda_lib) $lin_alg_lib -ldl -lboost_filesystem -lboost_system $optional_boost" >> example.mk echo "LIBS_NVCC=-Xcompiler=$openmp_flags $mpi_libs -lvcluster -lofpm_pdata -lofpmmemory -lparmetis -lmetis -lboost_iostreams -lboost_program_options -lhdf5 -llibhilbert -lVc $(cat cuda_lib) $lin_alg_lib -ldl -lboost_filesystem -lboost_system $optional_boost" >> example.mk -echo "INCLUDE_PATH_NVCC=-Xcompiler="-Wno-deprecated-declarations" -Xcompiler=$(cat openmp_flags) "$(cat cuda_options)" $mpi_include_dirs -I. -I$install_base/openfpm_numerics/include -I$install_base/openfpm_pdata/include/config -I$install_base/openfpm_pdata/include -I$install_base/openfpm_data/include -I$install_base/openfpm_vcluster/include -I$install_base/openfpm_io/include -I$install_base/openfpm_devices/include -I$i_dir/METIS/include -I$i_dir/PARMETIS/include -I$i_dir/BOOST/include -I$i_dir/HDF5/include -I$i_dir/LIBHILBERT/include $lin_alg_inc -I$i_dir/BLITZ/include -I$i_dir/ALGOIM/include -I$i_dir/SUITESPARSE/include " >> example.mk +echo "INCLUDE_PATH_NVCC=-Xcompiler=$(cat openmp_flags) "$(cat cuda_options)" $mpi_include_dirs -I. -I$install_base/openfpm_numerics/include -I$install_base/openfpm_pdata/include/config -I$install_base/openfpm_pdata/include -I$install_base/openfpm_data/include -I$install_base/openfpm_vcluster/include -I$install_base/openfpm_io/include -I$install_base/openfpm_devices/include -I$i_dir/METIS/include -I$i_dir/PARMETIS/include -I$i_dir/BOOST/include -I$i_dir/HDF5/include -I$i_dir/LIBHILBERT/include $lin_alg_inc -I$i_dir/BLITZ/include -I$i_dir/ALGOIM/include -I$i_dir/SUITESPARSE/include " >> example.mk cp example.mk src/example.mk cp example.mk example/example.mk cp example.mk ~/.openfpm.mk -- GitLab