Transfer information from GPU to CPU
Hi,
I was trying to count agglomerate information at each timestep based on particles contact with each other and have finished the code with CPU API. Now I want my code to work on GPU cuda. What I did was collecting contact particle id pairs in contact model and process these info in body force. However, I found it difficult to transfer those contact id pairs in calculateForce() from GPU to CPU. And the mark and process particle only work for each individual particle rather than a pair. So is there a method to transfer the contact pair from GPU to CPU?
Regards,
Yang Qi
Find more posts tagged with
Hey
I have a bunch of custom properties that get modified in the GPU file (.cu)
I used this gpu file and modified to my requirements
(https://community.altair.com/discussion/35370/edem-cuda-api-contact-model-example-hertz-mindlin-effective-sphere?utm_source=community-search&utm_medium=organic-search&utm_term=Hertz+mindlin+gpu)
I have not put the custom properties in the cpp file; I only added it to the gpu file (.cu).
I want to use them in the CPU file for post-processing. I am not able to see the custom property on EDEM gui.
Should i define the custom property again in the cpp file?
Should i do some extra processing such as what is mentioned here
(https://community.altair.com/discussion/39619/edem-cuda-api-tutorial-2-cuda-custom-properties-and-parameters?utm_source=community-search&utm_medium=organic-search&utm_term=custom+properties+in+cuda)
This tutorial talks about passing information from cpu to gpu. but does not mention anything about gpu to cpu. Please tell me how i can access the information of changed custom properties in cpu for post procesing?
Hi Yang Qi,
What was the issue with writing the code directly on GPU? That would be the fastest approach. What can be useful is to use custom properties to tag particles as in contact. Particle Custom properties are passed automatically between Contact Model and Body Force on CUDA.
Regards
Stephen