Skip to content
Snippets Groups Projects
Commit 52189ace authored by Rafael Ravedutti's avatar Rafael Ravedutti
Browse files

Adjust NVCC flags and print DEM setup info


Signed-off-by: default avatarRafael Ravedutti <rafaelravedutti@gmail.com>
parent cce65f5b
No related merge requests found
...@@ -10,10 +10,10 @@ obj ...@@ -10,10 +10,10 @@ obj
obj_cpu obj_cpu
obj_gpu obj_gpu
todo* todo*
lj_cpu md_cpu
lj_gpu md_gpu
lj.cu md.cu
lj.cpp md.cpp
dem_cpu dem_cpu
dem_gpu dem_gpu
dem.cu dem.cu
......
...@@ -14,7 +14,9 @@ DEBUG_FLAGS= ...@@ -14,7 +14,9 @@ DEBUG_FLAGS=
# CUDA settings # CUDA settings
NVCC=nvcc NVCC=nvcc
NVCC_FLAGS=-O3 -mavx2 -mfma #NVCC_FLAGS=-O3 -mavx2 -mfma
NVCC_FLAGS=-O3 -arch=sm_80 -mavx2 -mfma -ffast-math -funroll-loops --forward-unknown-to-host-compiler
#NVCC_FLAGS=-O3 -arch=sm_80 -march=native -ffast-math -funroll-loops --forward-unknown-to-host-compiler
NVCC_PATH:="$(shell which ${NVCC})" NVCC_PATH:="$(shell which ${NVCC})"
CUDA_FLAGS=-DENABLE_CUDA_AWARE_MPI 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 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
......
...@@ -151,6 +151,23 @@ int dem_sc_grid(PairsSimulation *ps, double xmax, double ymax, double zmax, doub ...@@ -151,6 +151,23 @@ int dem_sc_grid(PairsSimulation *ps, double xmax, double ymax, double zmax, doub
last_uid++; last_uid++;
} }
int global_nparticles = nparticles;
if(ps->getDomainPartitioner()->getWorldSize() > 1) {
MPI_Allreduce(&nparticles, &global_nparticles, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD);
}
if(ps->getDomainPartitioner()->getRank() == 0) {
std::cout << "DEM Simple-Cubic Grid" << std::endl;
std::cout << "Domain size: <" << xmax << ", " << ymax << ", " << zmax << ">" << std::endl;
std::cout << "Spacing: " << spacing << std::endl;
std::cout << "Diameter: " << diameter
<< " (min = " << min_diameter << ", max = " << max_diameter << ")" << std::endl;
std::cout << "Initial velocity: " << initial_velocity << std::endl;
std::cout << "Particle density: " << particle_density << std::endl;
std::cout << "Number of types: " << ntypes << std::endl;
std::cout << "Number of particles: " << global_nparticles << std::endl;
}
return nparticles; return nparticles;
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment