From a4e75e9a93701d4bb6aa86434fd3cb24aaeb1c90 Mon Sep 17 00:00:00 2001 From: Rafael Ravedutti <rafaelravedutti@gmail.com> Date: Fri, 29 Dec 2023 18:29:19 +0100 Subject: [PATCH] Small adjustments Signed-off-by: Rafael Ravedutti <rafaelravedutti@gmail.com> --- Makefile | 8 +++----- examples/dem.py | 2 +- runtime/dem_sc_grid.hpp | 2 ++ 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index c823f1e..1a2a8c3 100644 --- a/Makefile +++ b/Makefile @@ -5,10 +5,8 @@ TESTCASE=dem PYCMD=python3 # C/C++ compiler settings -CC=mpicc -#CC=mpiicpx -#CC=mpiicpc -CFLAGS=-Ofast -march=core-avx2 -fopenmp ${MPI_FLAGS} ${LIKWID_FLAGS} +CC=mpic++ +CFLAGS=-O3 -mavx2 -mfma -fopenmp ${MPI_FLAGS} ${LIKWID_FLAGS} #CFLAGS=-Ofast -xHost -qopt-zmm-usage=high ${MPI_FLAGS} ${LIKWID_FLAGS} #CFLAGS=-Ofast -xCORE-AVX512 -qopt-zmm-usage=high ${MPI_FLAGS} ${LIKWID_FLAGS} DEBUG_FLAGS= @@ -16,7 +14,7 @@ DEBUG_FLAGS= # CUDA settings NVCC=nvcc -NVCC_FLAGS=-O3 --use_fast_math +NVCC_FLAGS=-O3 -mavx2 -mfma NVCC_PATH:="$(shell which ${NVCC})" CUDA_FLAGS=-DENABLE_CUDA_AWARE_MPI CUDART_FLAGS=-lcudart -L /apps/SPACK/0.19.1/opt/linux-almalinux8-zen/gcc-8.5.0/nvhpc-23.7-bzxcokzjvx4stynglo4u2ffpljajzlam/Linux_x86_64/23.7/cuda/12.2/targets/x86_64-linux/lib diff --git a/examples/dem.py b/examples/dem.py index 6f42699..7f3d4d5 100644 --- a/examples/dem.py +++ b/examples/dem.py @@ -171,7 +171,7 @@ psim.dem_sc_grid( # "data/spheres.input", # "data/spheres_4x4x2.input", # "data/spheres_6x6x2.input", -# #"data/spheres_8x8x2.input", +# "data/spheres_8x8x2.input", # ['uid', 'type', 'mass', 'radius', 'position', 'linear_velocity', 'flags'], # pairs.sphere()) diff --git a/runtime/dem_sc_grid.hpp b/runtime/dem_sc_grid.hpp index 6f47fc5..fae3056 100644 --- a/runtime/dem_sc_grid.hpp +++ b/runtime/dem_sc_grid.hpp @@ -113,10 +113,12 @@ int dem_sc_grid(PairsSimulation *ps, double xmax, double ymax, double zmax, doub flags(nparticles) = 0; shape(nparticles) = 0; // sphere + /* std::cout << uid(nparticles) << "," << types(nparticles) << "," << masses(nparticles) << "," << radius(nparticles) << "," << positions(nparticles, 0) << "," << positions(nparticles, 1) << "," << positions(nparticles, 2) << "," << velocities(nparticles, 0) << "," << velocities(nparticles, 1) << "," << velocities(nparticles, 2) << "," << flags(nparticles) << std::endl; + */ nparticles++; } -- GitLab