Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
1ac12cb
avoid overflow when reporting effective mlups
Ahdhn Jul 6, 2023
de310f5
missing sync
Ahdhn Jul 7, 2023
6fa7cd8
effective number of iterations
Ahdhn Jul 7, 2023
70506ef
adding option to work with float
Ahdhn Jul 11, 2023
8804455
using the right type in collision
Ahdhn Jul 11, 2023
441bb57
ops
Ahdhn Jul 11, 2023
d5046db
Fuse Collision and Store
Ahdhn Jul 11, 2023
039acd9
use abbreviation for containers names
Ahdhn Jul 12, 2023
3dea26a
Fix minor bug with `collideBGKUnrolledFusedStore`
Ahdhn Jul 13, 2023
f5cd10f
Fix collideBGKUnrolledFusedStore
Ahdhn Jul 13, 2023
146eedb
show timing
Ahdhn Jul 13, 2023
641bd76
Update lbmMultiRes.cu
Ahdhn Jul 13, 2023
c2fa589
adding Report
Ahdhn Jul 14, 2023
85c46f4
app is not a test
Ahdhn Jul 14, 2023
e8af0ed
Merge pull request #42 from Autodesk/MultiResLBMOpt
Ahdhn Jul 17, 2023
78763b4
ioToVtk with slices
Ahdhn Jul 17, 2023
344b71c
adding more problems
Ahdhn Jul 17, 2023
0794e52
run script
Ahdhn Jul 17, 2023
d5f120d
Upgrading the domain level tutorial.
massimim Jul 18, 2023
06c7d20
more problems
Ahdhn Jul 18, 2023
fa4b16a
Merge branch 'develop' of https://github.com/Autodesk/Neon into Multi…
Ahdhn Jul 18, 2023
f7ff14f
fix problemID 8
Ahdhn Jul 19, 2023
ae0f4e2
minu bug in dat file
Ahdhn Jul 21, 2023
870fc99
update DAT files
Ahdhn Jul 25, 2023
f8d59eb
fix problem confi with more than 3 levels
Ahdhn Jul 25, 2023
dab4e48
update grid configuration and figures
Ahdhn Aug 2, 2023
75c2484
update run script
Ahdhn Aug 2, 2023
b441cfa
Update run.sh
Ahdhn Aug 2, 2023
3913e8b
avoid division by sumStore
Ahdhn Aug 3, 2023
9fef504
Update stream.h
Ahdhn Aug 3, 2023
5d6a5b4
store in register before multiply
Ahdhn Aug 3, 2023
1f1df0c
increase number of iterations in run script
Ahdhn Aug 3, 2023
cb90eb3
remove duplication
Ahdhn Aug 3, 2023
ead3a64
tweak streamFusedCoalescence
Ahdhn Aug 22, 2023
bc0d07b
Revert "tweak streamFusedCoalescence"
Ahdhn Aug 22, 2023
cbbbce0
adding option to cull extra storage of the overlapping coarser girds
Ahdhn Aug 24, 2023
8220b1f
refactor to add flow over cylinder
Ahdhn Aug 24, 2023
e21a587
cylinder position
Ahdhn Aug 24, 2023
f8cd1f3
fix bug with setting child block ID
Ahdhn Aug 28, 2023
376197d
fix initialization of the flow over cylinder
Ahdhn Aug 28, 2023
988a054
split init
Ahdhn Aug 28, 2023
6f1bde7
def BGK and KBC
Ahdhn Aug 28, 2023
8bd76d9
ops
Ahdhn Aug 28, 2023
09ddf79
tiny refactor to reduce duplicate code
Ahdhn Aug 29, 2023
8874994
Fix post process for moving wall boundary condition
Ahdhn Aug 29, 2023
782b850
add Re to the input arguments and output json
Ahdhn Aug 30, 2023
b8113a6
thin slices
Ahdhn Aug 30, 2023
be7978f
split files
Ahdhn Aug 30, 2023
da31821
movingWall = inlet, adding option to control output frequency
Ahdhn Aug 31, 2023
132f6fe
fixes for flow over cylinder
Ahdhn Aug 31, 2023
cdc8c22
sphere not cylinder
Ahdhn Aug 31, 2023
fd0fb06
report collision model
Ahdhn Aug 31, 2023
0c0ab50
fix
Ahdhn Aug 31, 2023
0ec9782
jet fighter sdf
Ahdhn Sep 5, 2023
d29577a
jet problem
Ahdhn Sep 5, 2023
bc48f13
jet problem
Ahdhn Sep 5, 2023
a1329b1
flowOverShape and use sdf to define bounce back BC
Ahdhn Sep 5, 2023
ec49d09
initFlowOverShape for the jet
Ahdhn Sep 6, 2023
e64a4d1
Fix clength and a scale to Sphere problemn
Ahdhn Sep 6, 2023
20fc9de
parametrize jet problem
Ahdhn Sep 6, 2023
3d4c409
adding polyscope
Ahdhn Sep 11, 2023
152dffb
Add input arguments in a struct
Ahdhn Sep 11, 2023
8d0c6af
replaces problemId with scale and make it user input
Ahdhn Sep 11, 2023
343f005
require device ID
Ahdhn Sep 11, 2023
3f61ad7
to compile polyscope
Ahdhn Sep 11, 2023
61788e9
fix linux compilation
Ahdhn Sep 11, 2023
6b8bdfb
fix Ubuntu compilation
Ahdhn Sep 11, 2023
2789a46
mField operator() using Idx
Ahdhn Sep 12, 2023
9503aa4
use host container for initPolyscope
Ahdhn Sep 12, 2023
786da02
added libigl to use winding number for flow over mesh
Ahdhn Sep 12, 2023
817177f
minor fix to the clength
Ahdhn Sep 12, 2023
6ecd1b0
Fix minor issue with scaling the mesh
Ahdhn Sep 12, 2023
5147782
minor fixes to get flow over mesh working
Ahdhn Sep 12, 2023
297443a
update libigl
Ahdhn Sep 13, 2023
0d88f70
Fix outlet BC
Ahdhn Sep 14, 2023
f127d8b
skip outlet BC for now, tweak mesh box size, output vtk, add mesh to …
Ahdhn Sep 14, 2023
f1fe05c
Fix clength for the mesh problem
Ahdhn Sep 14, 2023
2e8d032
clenght for jet
Ahdhn Sep 14, 2023
41a3e15
speedup inside/outside query
Ahdhn Sep 14, 2023
811e90d
Revert "speedup inside/outside query"
Ahdhn Sep 14, 2023
367f2ad
fix a bug in initSumStore
Ahdhn Sep 15, 2023
9d4a868
bGrid get neighbor degenerate case
Ahdhn Sep 18, 2023
b8bde1c
bug fix with storeFine
Ahdhn Sep 18, 2023
5ad983d
cleanup
Ahdhn Sep 18, 2023
0ef30a7
added `collideKBCFusedStore`
Ahdhn Sep 18, 2023
84afa2f
init fusedFinest
Ahdhn Sep 18, 2023
c3507d9
use int8_t with loops
Ahdhn Sep 18, 2023
fd95095
streaming push
Ahdhn Sep 19, 2023
d0905de
use libigl as static library
Ahdhn Sep 20, 2023
d8d811a
Revert "use libigl as static library"
Ahdhn Sep 20, 2023
d550a00
use igl winding number instead of signed distance
Ahdhn Sep 20, 2023
f4e8dc2
fix fused finest
Ahdhn Sep 21, 2023
70e037c
fused finest seems to work correctly now
Ahdhn Sep 21, 2023
b20594b
fused finest using KBC
Ahdhn Sep 21, 2023
4baa6a6
make polyscope optional
Ahdhn Sep 21, 2023
e38d047
comment out outlet BC
Ahdhn Sep 21, 2023
439d6ea
enforce max register count
Ahdhn Sep 21, 2023
9a1b21e
compute velocity at the end
Ahdhn Sep 21, 2023
fdb1396
minor bug
Ahdhn Sep 21, 2023
682868d
correct mlups
Ahdhn Sep 25, 2023
44cf166
Update lbmMultiRes.h
Ahdhn Sep 25, 2023
d8a17fb
benchmark script
Ahdhn Sep 25, 2023
cd467ff
Update run.sh
Ahdhn Sep 25, 2023
aeb0f07
correct report name + BGK as default
Ahdhn Sep 26, 2023
9933345
lid drive cavity problem 10
Ahdhn Sep 26, 2023
84db90b
allocate velocity and density only for visuals
Ahdhn Sep 27, 2023
5746239
fix minor bug
Ahdhn Sep 29, 2023
1b380bd
a little bump to stream fused explosion
Ahdhn Sep 29, 2023
68e5edd
stream fused coalescence
Ahdhn Oct 1, 2023
359fc73
fix streamFuseAll performance
Ahdhn Oct 1, 2023
f7224a6
fix mesh resizing for flow over mesh
Ahdhn Oct 2, 2023
c73c979
use vector field in writing the vtk
Ahdhn Oct 2, 2023
65279f6
binary vtk
Ahdhn Oct 4, 2023
605dc33
binary vtk
Ahdhn Oct 4, 2023
a1039c3
scripts
Ahdhn Oct 4, 2023
e82e16b
use the coarsest level to upsample the velocity for binary vtk
Ahdhn Oct 4, 2023
040da98
plane obj file
Ahdhn Oct 4, 2023
a0ae21e
Update practice_v28.obj
Ahdhn Oct 4, 2023
b90c97e
speedup inside/outside calculation
Ahdhn Oct 4, 2023
9740e46
bigger mesh box
Ahdhn Oct 5, 2023
0ddaee8
ghia plots
Ahdhn Oct 5, 2023
0e22d86
sphere model
Ahdhn Oct 5, 2023
a827c56
cleanup
Ahdhn Oct 12, 2023
880fe9d
cleanup
Ahdhn Oct 12, 2023
f91f0f3
fix multi-res unit test
Ahdhn Oct 12, 2023
0bbbe75
minor reorg
Ahdhn Jan 29, 2024
6949536
plot script
Ahdhn Feb 6, 2024
422ce66
experiment with 5 levels
Ahdhn Feb 12, 2024
fd73e75
speedup inside/outside calculation
Ahdhn Feb 13, 2024
f336338
minor
Ahdhn Feb 13, 2024
de579cb
fix issue where we may end up with gaps between different resolutions
Ahdhn Feb 14, 2024
25ad35c
dist to mesh for grid construction (commented out for now)
Ahdhn Feb 14, 2024
f8e7a60
add option to rotate the input model
Ahdhn Feb 14, 2024
82e4c75
Merge pull request #44 from Autodesk/MultiResLBMOpt
Ahdhn Apr 10, 2024
684c8b4
remove jet problem
Ahdhn Apr 10, 2024
6057df8
README for multi res LBM
Ahdhn Apr 10, 2024
0b7b258
Merge branch 'MultiResLBMOpt' of https://github.com/Autodesk/Neon int…
Ahdhn Apr 10, 2024
42ce6ed
Document `flowOverMesh`
Ahdhn Apr 10, 2024
a85ab95
Update README.md
Ahdhn Apr 10, 2024
0ebb5c9
Update README.md
Ahdhn Apr 11, 2024
bf72548
README hot fix
Ahdhn Apr 11, 2024
2662ec9
Renaming all test folders (#48)
Ahdhn Apr 29, 2024
c730618
Updating apps to the latest Neon API. (#55)
massimim Aug 2, 2024
d7b2165
Implemented outputting to the nanoVDB file format.
mattloulou Aug 24, 2024
86290a1
Implemented outputting to the nanoVDB file format.
mattloulou Aug 24, 2024
9493ae7
Implemented HDF5 output
mattloulou Aug 30, 2024
9bc6e61
Implemented HDF5 output
mattloulou Aug 30, 2024
d16eba0
Fixed issues with nanovdb and hdf5 outputs
mattloulou Sep 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/Ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
with:
cuda: '11.7.0'
linux-local-args: '["--toolkit"]'
- run: sudo apt-get update
- run: sudo apt-get install -y xorg-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev
- run: nvcc -V
- name: Checkout
uses: actions/checkout@v2
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@ temp
docs/doxygen/html/

docs/doxygen/latex/

!apps/lbmMultiRes/practice_v28.obj
!apps/lbmMultiRes/sphere3.obj
17 changes: 16 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
set(CMAKE_BUILD_TYPE Release)
endif ()

if (WIN32)
set(LIBIGL_USE_STATIC_LIBRARY "ON" CACHE BOOL "Use Libigl as a static library")
set(NEON_USE_POLYSCOPE "ON" CACHE BOOL "Enable Ployscope for visualization")
endif()

if(${NEON_USE_POLYSCOPE})
message(STATUS "Polyscope is enabled")
else()
message(STATUS "Polyscope is disabled")
endif()


# Manage between building Neon as shared or static library
include("${PROJECT_SOURCE_DIR}/cmake/ManageLibraryType.cmake")

Expand Down Expand Up @@ -70,6 +82,9 @@ if (NOT OpenMP_CXX_FOUND)
message(FATAL_ERROR "Neon could not find OpenMP")
endif ()
target_link_libraries(NeonDeveloperLib INTERFACE OpenMP::OpenMP_CXX)
if(${NEON_USE_POLYSCOPE})
target_compile_definitions(NeonDeveloperLib INTERFACE NEON_USE_POLYSCOPE)
endif()

#target_link_libraries(libNeonXXX INTERFACE $<BUILD_INTERFACE:NeonDeveloperLib>)

Expand All @@ -79,7 +94,7 @@ add_subdirectory("libNeonSet")
add_subdirectory("libNeonDomain")
add_subdirectory("libNeonSkeleton")
#add_subdirectory("libNeonSolver")
#add_subdirectory("tutorials")
add_subdirectory("tutorials")
add_subdirectory("apps")
add_subdirectory("benchmarks")

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
![Neon logo](docs/logo/neonDarkLogo.jpg "Neon")

# For information about the GPU LBM Grid Refinement work (IPDPS 2024), go to this [README](https://github.com/Autodesk/Neon/blob/v0.5.1/apps/lbmMultiRes/README.md)

Neon is a research framework for programming multi-device systems maintained by [Autodesk Research](https://www.autodesk.com/research/overview). Neon's goal is to automatically transform user sequential code into, for example, a scalable multi-GPU execution.

To reach its goal, Neon takes a domain-specific approach based on the parallel skeleton philosophy (a.k.a parallel patterns). Neon provides a set of domain-specific and programmable patterns that users compose through a sequential programming model to author their applications. Then, thanks to the knowledge of the domain, the patterns and their composition, Neon automatically optimizes the sequential code into an execution optimized for multi-device systems.
Expand Down
8 changes: 4 additions & 4 deletions apps/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

#add_subdirectory("fractal")
#add_subdirectory("lbm")
#add_subdirectory("gameOfLife")
add_subdirectory("fractal")
add_subdirectory("lbm")
add_subdirectory("gameOfLife")
#add_subdirectory("poisson")
add_subdirectory("lbmMultiRes")
#add_subdirectory("lbmMultiRes")
18 changes: 9 additions & 9 deletions apps/fractal/fractal.cu
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include "Neon/domain/dGrid.h"
#include "Neon/skeleton/Skeleton.h"

template <typename FieldT>
inline void draw_pixels(const int t, FieldT& field)
template <typename Field>
inline void draw_pixels(const int t, Field& field)
{
printf("\n Exporting Frame =%d", t);
int precision = 4;
Expand All @@ -28,19 +28,19 @@ NEON_CUDA_HOST_DEVICE inline Neon::float_2d complex_pow(Neon::float_2d& z, Neon:
return Neon::float_2d(radius * cos(angle), radius * sin(angle));
}

template <typename FieldT>
inline Neon::set::Container FractalsContainer(FieldT& pixels,
template <typename Field>
inline Neon::set::Container FractalsContainer(Field& pixels,
int32_t& time,
int32_t n)
{
return pixels.getGrid().getContainer(
return pixels.getGrid().newContainer(
"FractalContainer", [&, n](Neon::set::Loader& L) {
auto& px = L.load(pixels);
auto& t = time;

return [=] NEON_CUDA_HOST_DEVICE(
const typename FieldT::Cell& idx) mutable {
auto id = px.mapToGlobal(idx);
const typename Field::Idx& idx) mutable {
auto id = px.getGlobalIndex(idx);

Neon::float_2d c(-0.8, cos(t * 0.03) * 0.2);
Neon::float_2d z((float(id.x) / float(n)) - 1.0f,
Expand All @@ -59,7 +59,7 @@ inline Neon::set::Container FractalsContainer(FieldT& pixels,
int main(int argc, char** argv)
{
Neon::init();
if (Neon::sys::globalSpace::gpuSysObjStorage.numDevs() > 0) {
if ( Neon::Backend::countAvailableGpus() > 0) {
int32_t n = 320;
Neon::index_3d dim(2 * n, n, 1);
std::vector<int> gpu_ids{0};
Expand Down Expand Up @@ -90,7 +90,7 @@ int main(int argc, char** argv)
skeleton.run();

pixels.updateHostData(0);
//draw_pixels(time, pixels);
draw_pixels(time, pixels);
}
}
}
50 changes: 25 additions & 25 deletions apps/gameOfLife/gameOfLife.cu
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
#include "Neon/domain/dGrid.h"
#include "Neon/skeleton/Skeleton.h"

template <typename FieldT>
inline void exportVTI(FieldT& voxel_1, FieldT& voxel_2, int frame_id)
template <typename Field>
inline void exportVTI(Field& voxel_1, Field& voxel_2, int frame_id)
{
auto io = [&](int f, FieldT& voxel) {
auto io = [&](int f, Field& voxel) {
printf("\n Exporting Frame =%d", f);
int precision = 4;
voxel.updateHostData(0);
Expand All @@ -39,66 +39,66 @@ Neon::domain::Stencil createStencil()
return Neon::domain::Stencil(stencil);
}

template <typename FieldT>
inline Neon::set::Container GoLContainer(const FieldT& in_cells,
FieldT& out_cells,
typename FieldT::Type length)
template <typename Field>
inline Neon::set::Container GoLContainer(const Field& in_cells,
Field& out_cells,
typename Field::Type length)
{
using T = typename FieldT::Type;
return in_cells.getGrid().getContainer(
using T = typename Field::Type;
return in_cells.getGrid().newContainer(
"GoLContainer", [&, length](Neon::set::Loader& L) {
const auto& ins = L.load(in_cells, Neon::Compute::STENCIL);
const auto& ins = L.load(in_cells, Neon::Pattern::STENCIL);
auto& out = L.load(out_cells);

return [=] NEON_CUDA_HOST_DEVICE(
const typename FieldT::Cell& idx) mutable {
typename FieldT::ngh_idx ngh(0, 0, 0);
const T default_value = 0;
int alive = 0;
T value = 0;
T status = ins.nghVal(idx, ngh, 0, default_value).value;
const typename Field::Idx& idx) mutable {
typename Field::NghIdx ngh(0, 0, 0);
const T default_value = 0;
int alive = 0;
T value = 0;
T status = ins.getNghData(idx, ngh, 0, default_value).getData();

//+x
ngh.x = 1;
ngh.y = 0;
ngh.z = 0;
value = ins.nghVal(idx, ngh, 0, default_value).value;
value = ins.getNghData(idx, ngh, 0, default_value).getData();
alive += (value > 0.0 ? 1 : 0);
ngh.y = 1;
value = ins.nghVal(idx, ngh, 0, default_value).value;
value = ins.getNghData(idx, ngh, 0, default_value).getData();
alive += (value > 0.0 ? 1 : 0);

//-x
ngh.x = -1;
ngh.y = 0;
ngh.z = 0;
value = ins.nghVal(idx, ngh, 0, default_value).value;
value = ins.getNghData(idx, ngh, 0, default_value).getData();
alive += (value > 0.0 ? 1 : 0);
ngh.y = -1;
value = ins.nghVal(idx, ngh, 0, default_value).value;
value = ins.getNghData(idx, ngh, 0, default_value).getData();
alive += (value > 0.0 ? 1 : 0);

//+y
ngh.x = 0;
ngh.y = 1;
ngh.z = 0;
value = ins.nghVal(idx, ngh, 0, default_value).value;
value = ins.getNghData(idx, ngh, 0, default_value).getData();
alive += (value > 0.0 ? 1 : 0);
ngh.x = -1;
value = ins.nghVal(idx, ngh, 0, default_value).value;
value = ins.getNghData(idx, ngh, 0, default_value).getData();
alive += (value > 0.0 ? 1 : 0);

//-y
ngh.x = 0;
ngh.y = -1;
ngh.z = 0;
value = ins.nghVal(idx, ngh, 0, default_value).value;
value = ins.getNghData(idx, ngh, 0, default_value).getData();
alive += (value > 0.0 ? 1 : 0);
ngh.x = 1;
value = ins.nghVal(idx, ngh, 0, default_value).value;
value = ins.getNghData(idx, ngh, 0, default_value).getData();
alive += (value > 0.0 ? 1 : 0);

auto id_global = ins.mapToGlobal(idx);
auto id_global = ins.getGlobalIndex(idx);
out(idx, 0) = ((T)id_global.x / length) * (T)((alive == 3 || (alive == 2 && status) ? 1 : 0));
};
});
Expand Down
Loading