Code Monkey home page Code Monkey logo

bonsai's People

Contributors

biddisco avatar happyicecream avatar harrism avatar jbedorf avatar nsakharnykh avatar simesgreen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bonsai's Issues

bonsai file format variables, placing

I have written a conversion script at https://github.com/twobombs/qracknet/blob/master/scripts/makebonsai.sh and I see that there are differences in the notation of the values. Could/can someone point out what the position of the variables are in the converted model3_child_compact bonsai hex file ? This would help great deal in setting the variables in correct order.

Screenshot 2021-02-27 at 13 34 11

i think there is a big endian notation might be a thing going on in the first value, the directional speed for the imported quantum points are all zero at the moment.

Screenshot 2021-02-27 at 13 45 03

^ the converted file from ascii output to binary hex

before the file gets converted to binary, this is what the variables look like in hex-ascii.
it has ID, x, y, z, m, zd,yd,zd preceded at the top with the amount of points ( only a small subset of the actual quantum data )

Screenshot 2021-02-27 at 13 45 32

Note: I've opened a separate ticket because the original thread became OT.

Direct calculation is incorrect.

Unless I'm mistaken, in file dev_direct_gravity.cu, function dev_direct_gravity:
int numTiles = n / p;
should be
int numTiles = (n + p - 1) / p;
Otherwise forces from the last, non-full, tile are not processed.

Error generating file bonsai2_slowdust_generated_timestep.cu.o

Hi, I am able to build the project using cmake fine, but when I run the make command I get the aforementioned error. I have pasted the output below. Any help would be appreciated.


CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as

project(ProjectName)

near the top of the file, but after cmake_minimum_required().

CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Deprecation Warning at CMakeLists.txt:3 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

-- Configuring done
-- Generating done
-- Build files have been written to: /home/sarl-ws-4/ismael/Bonsai-master/runtime
[ 1%] Building NVCC (Device) object CMakeFiles/bonsai2_slowdust.dir/CUDAkernels/bonsai2_slowdust_generated_timestep.cu.o
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
ptxas info : 13 bytes gmem
ptxas info : Compiling entry function '_ZN3cub11EmptyKernelIvEEvv' for 'sm_35'
ptxas info : Function properties for _ZN3cub11EmptyKernelIvEEvv
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 2 registers, 320 bytes cmem[0]
ptxas info : Compiling entry function 'compute_energy_double' for 'sm_35'
ptxas info : Function properties for compute_energy_double
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 20 registers, 360 bytes cmem[0]
ptxas info : Compiling entry function 'compute_dt' for 'sm_35'
ptxas info : Function properties for compute_dt
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 28 registers, 396 bytes cmem[0], 40 bytes cmem[2]
ptxas info : Compiling entry function 'correct_particles' for 'sm_35'
ptxas info : Function properties for correct_particles
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 30 registers, 432 bytes cmem[0], 28 bytes cmem[2]
ptxas info : Compiling entry function 'setActiveGroups' for 'sm_35'
ptxas info : Function properties for setActiveGroups
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 6 registers, 352 bytes cmem[0]
ptxas info : Compiling entry function 'predict_particles' for 'sm_35'
ptxas info : Function properties for predict_particles
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 22 registers, 384 bytes cmem[0]
ptxas info : Compiling entry function 'get_nactive' for 'sm_35'
ptxas info : Function properties for get_nactive
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 13 registers, 344 bytes cmem[0]
ptxas info : Compiling entry function 'get_Tnext' for 'sm_35'
ptxas info : Function properties for get_Tnext
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 13 registers, 344 bytes cmem[0]
/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
435 | function(_Functor&& __f)
| ^
/usr/include/c++/11/bits/std_function.h:435:145: note: ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
530 | operator=(_Functor&& __f)
| ^
/usr/include/c++/11/bits/std_function.h:530:146: note: ‘_ArgTypes’
CMake Error at bonsai2_slowdust_generated_timestep.cu.o.cmake:280 (message):
Error generating file
/home/sarl-ws-4/ismael/Bonsai-master/runtime/CMakeFiles/bonsai2_slowdust.dir/CUDAkernels/./bonsai2_slowdust_generated_timestep.cu.o

make[2]: *** [CMakeFiles/bonsai2_slowdust.dir/build.make:714: CMakeFiles/bonsai2_slowdust.dir/CUDAkernels/bonsai2_slowdust_generated_timestep.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:84: CMakeFiles/bonsai2_slowdust.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Allocation errors on a V100

I consistently get cudaMalloc allocation errors when allocating the generic buffer. I think this is because the V100 is using 32 tree walk blocks per SM, and has 84 SMs. Using the preset values in node_specs.h, it ends up trying to allocate ~5.7 GB. While in theory there should be plenty of memory available on the device, I get consistent failures to allocate this array.

I've temporarily worked around it by reducing to 8 tree walk blocks per SM, but I imagine this will hurt performance.

What would be the preferred way to reduce the size of the generic buffer so that allocation succeeds? Is reducing the number of tree walk blocks preferable, or perhaps I should reduce NTHREAD?

Or maybe I've missed something else entirely? Is there a fixed upper limit on contiguous array allocations for cuda? I wouldn't think so. It's possible that 6GB is just too big to find a contiguous block, but with the device practically empty I figured it should be possible.

segmentation fault

I compiled the latest commit ca3d2b1 using

cmake \
-DCMAKE_BUILD_TYPE=release \
-DCUDA_DEVICE_DEBUGGING:BOOL=OFF \
-DUSE_OPENGL:BOOL=ON \
-DUSE_MPI:BOOL=OFF \
-DUSE_CUB:BOOL=OFF \
-DUSE_DUST:BOOL=OFF \
-DUSE_GALACTICS:BOOL=OFF \
-DUSE_THRUST:BOOL=OFF \
../runtime
make

with cuda 9.1, gcc 5.4, on ubuntu 16.04 and GeForce GTX 750 Ti.
Running

./bonsai2_slowdust -i model3_child_compact.tipsy

I get following segmentation fault:

Unknown ENV_VARIABLE:   -- Falling to basic forking method after MPI_Init, unsafe!
Proc id: 0 @ Default , total processes: 1 (mpiInit) 
[INIT]	Used settings: 
[INIT]	Input  filename model3_child_compact.tipsy
[INIT]	Bonsai filename 
[INIT]	Log filename gpuLog.log
[INIT]	Theta: 		0.75		eps: 		0.05
[INIT]	Timestep: 	0.0625		tEnd: 		1
[INIT]	iterEnd: 	1073741824
[INIT]	Use MPI-IO: 	NO
[INIT]	snapshotFile: 	snapshot_	snapshotIter: 	-1
[INIT]	Input file: 	model3_child_compact.tipsy		devID: 		0
[INIT]	Remove dist: 	-1
[INIT]	Rebuild tree every 1 timestep
[INIT]	Runtime logging is DISABLED 
[INIT]	Direct gravitation is DISABLED
[INIT]	Tglow = 0
[INIT]	dTglow = 1
[INIT]	stereo = 0
[INIT]	Code is built WITHOUT MPI Support 
File version: 32550 
Proc: 0 Bootup times: Tree/MPI: 1.96776 Threads/log: 7.41482e-05 IC-model: 0 
Unable to open file `../images/Carina_cross.ppm'
Loaded `../images/deepfield1_1k.ppm', 1024 x 1024
Loaded `../images/deepfield2_1k.ppm', 1024 x 1024
Loaded `../images/deepfield3_1k.ppm', 1024 x 1024
Loaded `../images/deepfield4_1k.ppm', 1024 x 1024
Loaded `../images/deepfield5_1k.ppm', 1024 x 1024
Loaded `../images/deepfield6_1k.ppm', 1024 x 1024
Errors during OpenGL init: cannot set while device is active in this process  /home/doserbd/git/Bonsai.treecode/runtime/renderer/SmokeRenderer.cpp:191
Vendor: NVIDIA Corporation
Renderer: GeForce GTX 750 Ti/PCIe/SSE2
image size: 1920 1200
downsampled size: 960 600
Couldn't open camera file 'cameras.txt'
image size: 1920 1200
downsampled size: 960 600
image size: 1920 1176
downsampled size: 960 588
Segmentation fault (core dumped)

Any help appreciated.

GL compilation

Compiling with the following settings for OpenGL Display
Screenshot from 2020-11-29 11-25-51

Gives this error at make:
Screenshot from 2020-11-29 11-23-42

Can't find the lib that represents glLightfv for Ubuntu 20.04, seems to be an GL function. Without the GLVN directive I get this error.

Screenshot from 2020-11-29 11-34-48

Segfault Linking GL? context

I've integrated Bonsai into the Qracknet docker environment ( twobombs/qracknet:bonsai ) and find that there are segfaults whilst linking in the GL context for the GL compiled version of Bonsai. System is running inside a container with a software FB and software GL, but displays a similar error running directly on the host. I think Bonsai requires an hardware accelerated NVidia GL and FB ?

Will work further on narrowing down the cause of this crash. Compiled without GL works both inside the container and on the host. But we want all the bells and whistles, now won't we ? :)

Screenshot 2020-12-13 at 13 26 23

Win 2014 GB Price

Objective

  • win the 2014 Gordon Bell prize

Great talk in New Orleans today guys, fingers crossed for tomorrow!

Feature: colour in object declaration

Hi wonderfull people of the Bonsai project,

I am working on feeding Bonsai a whole bunch of quantum data and would like to add a colour to the imported objects.
AFAIK stars have colours too, is this something that crossed someone's mind to do during recent times or is it ouside the context of this project ?

Its absence is not a killer in that "I needs it", but "I do wants it" because it is an easy and intuitive way to see what the quantum density is for an imported datapoint, and might be interesting to look at from a stellar perspective ?

Just thinking out loud.

Points/values not visible in star view; low [m] values threshold ?

i've come a long way since starting the use of Bonsai, and as I'm working towards using real quantum values in a bonsai graph I found that some values are not visible in star-view but are visible in points-view as blue dots. Is there a range/reason when those values are not displayed ? Is this range known, so I can adapt values for those settings and get all point/values displayed in star-view. The image below is one with star view the bottom image is point view ( P key ) [ graph is in a mobius form ]
Screenshot from 2022-02-17 15-36-52
Screenshot from 2022-02-17 15-33-44

missing: mpi.h

next up:

cmake sets the enviroment yet make causes an include fail : mpi.h

installed anything that I could find on mpi.h, but to no avail. again on ubuntu 20.04

Screenshot from 2020-11-06 20-08-30

Any ideas here ?
( background: I'm trying to build this project to see if I can use the output of Qrack, a quantum computer simulator, on the nbody functions. )

Compiling under Windows 7 x64, CUDA 5.0/4.2

Using Geforce GTX 650, Windows 7 SP1 x64, MSVS 2010, CUDA 4.2 (5.0 didn't work with strings in cudaLaunch), CMake 2.8.10.
I'm trying to get work clean_code. But it's seems that something went wrong in these lines:
void h2d(...){...
...
//Async copy, ONLY works for page-locked memory therefore default parameter
//is blocking.
assert(pinned_mem);
CU_SAFE_CALL(cudaMemcpyAsync(hDeviceMem, host_ptr, number*sizeof(T),cudaMemcpyHostToDevice, stream));
CU_SAFE_CALL(cudaEventRecord(asyncCopyEvent, stream));
...
}
After "cudaMemcpyAsync" I get error CUDA error API 30: Unknown Error.

CMake error on master Bonsai

Hi,

I would like to see Bonsai so I compiled it and I got this error:
Screenshot from 2020-11-06 09-46-53

I retried with production values ( without the OGL handle ) and got the same error.
I'm on Ubuntu 20.04, I added the CMakeOutput.log, i can't find what's going wrong here.

CMakeOutput.log

error: identifier "cudaSetupArgument" is undefined

Hi, I want to do my phantomSPH simulations with BonsaiSPH. When I compile BonsaiSPH, I get this error:

/home/x1/CODES_REPOS/Bonsai/runtime/include/my_cuda_rt.h(1167): error: identifier "cudaSetupArgument" is undefined

/home/x1/CODES_REPOS/Bonsai/runtime/include/my_cuda_rt.h(1461): error: identifier "cudaConfigureCall" is undefined

/home/x1/CODES_REPOS/Bonsai/runtime/include/my_cuda_rt.h(1474): error: identifier "cudaLaunch" is undefined

3 errors detected in the compilation of "/tmp/tmpxft_000071bf_00000000-6_dev_approximate_gravity_warp_new.cpp1.ii".
CMake Error at bonsai2_slowdust_generated_dev_approximate_gravity_warp_new.cu.o.cmake:268 (message):
  Error generating file
  /home/x1/CODES_REPOS/Bonsai/runtime/CMakeFiles/bonsai2_slowdust.dir/CUDAkernels/./bonsai2_slowdust_generated_dev_approximate_gravity_warp_new.cu.o


CMakeFiles/bonsai2_slowdust.dir/build.make:661: recipe for target 'CMakeFiles/bonsai2_slowdust.dir/CUDAkernels/bonsai2_slowdust_generated_dev_approximate_gravity_warp_new.cu.o' failed
make[2]: *** [CMakeFiles/bonsai2_slowdust.dir/CUDAkernels/bonsai2_slowdust_generated_dev_approximate_gravity_warp_new.cu.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/bonsai2_slowdust.dir/all' failed
make[1]: *** [CMakeFiles/bonsai2_slowdust.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

I have installed cuda-10.1 with on a computer with Quadro P4000 GPU.
Is there any step-by-step document for BonsaiSPH? Many thanks

Which Branch to use?

Hi, I see there are a few branches ahead of master... are any of them ready for other users to try out?

I want to test this code for a graduate computational physics class at UCSD to run a galaxy collision.

Will the master branch still run on a GTX Titan okay? Also, what is the difference between the "Titan," "Titan2D," and "Titan2D-IO" branches?

Thanks!

GCC 8+

Last one for tonight: is it correct I need to downgrade GCC to compile ? As that might be a killer... ;(

Screenshot from 2020-11-06 20-47-43

Screenshot from 2020-11-06 20-50-46

Finish volume rendering

  • Change 'if' statement to switch colors based on rendering method
  • Enable GS shader for volume rendering and verify particle-size vs h

Compile error using CUDA thrust

Compiling Bonsai master-branch with CUDA thrust support

cmake -DUSE_MPI:BOOL=OFF -DUSE_THRUST:BOOL=ON ..

crash during linking with

/usr/local/cuda-7.5/include/thrust/system/cuda/detail/cub/device/device_radix_sort.cuh:158: multiple definition of 'thrust_sort_32b' CMakeFiles/bonsai2_slowdust.dir/CUDAkernels/bonsai2_slowdust_generated_build_tree.cu.o:/home/bernd/git/Bonsai_org/runtime/CUDAkernels/support_kernels.cu:25: first defined here CMakeFiles/bonsai2_slowdust.dir/CUDAkernels/bonsai2_slowdust_generated_compute_propertiesD.cu.o: In function 'thrust::detail::temporary_allocator<char, thrust::system::cuda::detail::tag>::allocate(unsigned long)': /usr/local/cuda-7.5/include/thrust/system/cuda/detail/cub/device/dispatch/device_radix_sort_dispatch.cuh:922: multiple definition of 'thrust_sort_96b' CMakeFiles/bonsai2_slowdust.dir/CUDAkernels/bonsai2_slowdust_generated_build_tree.cu.o:/home/bernd/git/Bonsai_org/runtime/CUDAkernels/support_kernels.cu:74: first defined here collect2: error: ld returned 1 exit status

SC14_demo branch, CMake error

When I do:
git checkout SC14_demo
cd runtime
mkdir build
cd build
cmake .. -DUSE_B40C=1 -DCMAKE_CXX_COMPILER=mpicxx

I get the following error:
Linking CXX executable bonsai_driver
/usr/bin/ld: CMakeFiles/bonsai_driver.dir/src/driver.cpp.o: undefined reference to symbol 'dlsym@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line

I can fix this by changing CMakeLists.txt to comment the following lines:

add_executable(bonsai_driver

src/driver.cpp

)

SC14_demo branch, runtime error

When I run ./bonsai2_slowdust with the following options I get an error:
yokota@stelletto:build$ mpirun -np 1 ./bonsai2_slowdust --plummer 1000000 -t 0.015625 -T 16 -r 1
Unknown ENV_VARIABLE: -- Falling to basic forking method after MPI_Init, unsafe!
MPIComm :: ni= 1 nj= 1 :: ni x nj= 1 nproc= 1
Proc id: 0 @ stelletto , total processes: 1 (mpiInit)
[INIT] Used settings:
[INIT] Input filename
[INIT] Bonsai filename
[INIT] Log filename gpuLog.log
[INIT] Theta: 0.75 eps: 0.05
[INIT] Timestep: 0.015625 tEnd: 16
[INIT] iterEnd: 1073741824
[INIT] Use MPI-IO: NO
[INIT] snapshotFile: snapshot_ snapshotIter: -1
[INIT] Input file: devID: 0
[INIT] Remove dist: -1
[INIT] Rebuild tree every 1 timestep
[INIT] Runtime logging is DISABLED
[INIT] Direct gravitation is DISABLED
[INIT] Code is built WITH MPI Support
Using Plummer model with n= 1000000 per process
................................................................
Dataset particle information: Ntotal: 0 NFirst: 0 NSecond: 0 NThird: 0
Proc: 0 Bootup times: Tree/MPI: 0.00315213 Threads/log: 2.19644 IC-model: 0
Starting iterating

= BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
= EXIT CODE: 139
= CLEANING UP REMAINING PROCESSES

= YOU CAN IGNORE THE BELOW CLEANUP MESSAGES

YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault (signal 11)
This typically refers to a problem with your application.
Please see the FAQ page for debugging suggestions

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.