Giter Site home page Giter Site logo

projectchrono / dem-engine Goto Github PK

View Code? Open in Web Editor NEW
63.0 6.0 14.0 27.93 MB

A dual-GPU DEM solver with complex grain geometry support

License: Other

CMake 1.79% C++ 76.29% Cuda 21.92%
chrono cuda discrete-element-method multi-gpu gpu simulation

dem-engine's People

Contributors

btagliafierro avatar dannegrut avatar huweibit avatar ljyang17 avatar rserban avatar ruochun avatar shlok191 avatar thepianoboy avatar zzhou292 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dem-engine's Issues

can't run the demo examples

Description

I am compiling DEME with CUDA 12.0 and Visual Studio 2019, and I am trying to run the demo examples in debug mode. Initially, I encountered a runtime error:

The variable 'new_stream' is being used without being initialized

I uncommented the following line where the error occurred:

cudaStreamCreate(&new_stream);

When I ran the program again, I encountered another error:

Unhandled exception at 0x00007FFEF9A632CF (nvcuda64.dll) (in DEMdemo_BallDrop2D.exe): 0xC0000006: An error in the page (status code 0x0000000900960118) occurred while reading at position 0x0000000900960118.

Steps to Reproduce

  1. Compile DEME with CUDA 12.0 and Visual Studio 2019.
  2. Run the demo examples in debug mode.
  3. Uncomment the line cudaStreamCreate(&new_stream);.
  4. Run the program again.

Expected Behavior

The demo should run without causing runtime errors or exceptions.

Actual Behavior

An unhandled exception occurs at runtime, specifically in nvcuda64.dll.

Error Messages

  • Initial error:
    The variable 'new_stream' is being used without being initialized
    
  • After uncommenting cudaStreamCreate(&new_stream);:
    Unhandled exception at 0x00007FFEF9A632CF (nvcuda64.dll) (in DEMdemo_BallDrop2D.exe): 0xC0000006: An error in the page (status code 0x0000000900960118) occurred while reading at position 0x0000000900960118.
    

Environment

  • CUDA Version: 12.0
  • Visual Studio Version: 2019
  • Operating System: [Windows]
  • GPU: [GTX 1650 Ti]

Additional Information

I am unsure if this error is due to incorrect code or insufficient device computing power.

a problem for installation

when i install the python package of DEME, there is an error that "coult not build wheels for deme, which is required to install pyproject.toml-based projects". could any one give me a help? thanks!

PDSampler should be random

The DEM-Engine implementation of PDSampler seems to have a flaw: every time we call it again, it has the same random state.
Indeed, when the user calls the SampleCylinderZ for instance (observed with other sampling functions), the same set of random positions is sampled. The minimal example shows the issue.

import DEME
import matplotlib.pyplot as plt
for i in range(10):
    sampler = DEME.PDSampler(0.1)
    pos = sampler.SampleCylinderZ([0,0,0], 0.5, 0)
    x = [p[0] for p in pos]
    y = [p[1] for p in pos]
    plt.scatter(x,y, label=i, alpha=0.2)
    print(len(pos))
plt.legend(loc='center left', bbox_to_anchor=[1.05,0.5], title='Batch #')

The printed text is a series of "56", meaning that the length of the sampled positions is always the same.
The obtained figure is the following:

image

We can clearly see that each set of points overlaps the others. The expected behavior would be something like the one shown in a (less efficient) Python sampler I made (prints 55, 58, 53, 54, ... as lengths):

image

Additional suggestion: an additional boolean argument to DEME.PDSampler called (or similar to) keep_history that would allow the users to choose if they want to keep the previously sampled positions or erase the history every time a new sampling is applied.

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.