lorenzo-rovigatti / oxDNA

A new version of the code to simulate the oxDNA/oxRNA models, now equipped with Python bindings
https://dna.physics.ox.ac.uk/
GNU General Public License v3.0
43 stars 28 forks source link

cudaThreadSynchronize is deprecated #8

Closed lorenzo-rovigatti closed 3 years ago

lorenzo-rovigatti commented 3 years ago

We should remove cudaThreadSynchronize in favour of cudaDeviceSynchronize.

HalseyWang commented 3 years ago

How to remove cudaThreadSynchronize and intall cudaDeviceSynchronize

lorenzo-rovigatti commented 3 years ago

Hi there! What do you mean?

HalseyWang commented 3 years ago

Hi there, I ran into some problems when compiling with CUDA support. The compilation of romano failed and there were some questions about cudaThreadsynchronize and cudaThreaderror. I am a non-computer professional, so I want to ask for your help to compile oxDNA correctly.

lorenzo-rovigatti commented 3 years ago

Well, the compilation of romano has not been tested with the current version of the code, and it may fail given the number of changes that I carried out with respect to the sourceforge repo.

HalseyWang commented 3 years ago

Thanks!

lorenzo-rovigatti commented 3 years ago

Feel free to open a new issue if you have problems compiling oxDNA though. Don't forget to specify the versions of the tools you are using (cmake, gcc) and to copy&paste the errors you get.

HalseyWang commented 3 years ago

cmake version 3.10.2 gcc Ubuntu 7.5.0 nvcc: Cuda compilation tools, release 10.1, V10.1.168.

Many thanks for creating this model, I am keen to use. I am working on a GPU workstation with Nvidia p5000 cards, and would like to leverage these for running oxDNA simulations. Currently I have successfully compiled and run the oxDNA program (only with cpu). However, I keep running into trouble when trying to compile with the -DCUDA=ON option. It is finding my CUDA installed alright (v 10.1), and during building everything seems to work. Here is the log file.

oxDNA_error.docx

lorenzo-rovigatti commented 3 years ago

In order to compile with CUDA support you need these commands:

mkdir build
cd build
cmake .. -DCUDA=1
make -j4

and that's it. You are running way more commands than you need to (no need for make test_quick, make romano and make rovigatti, for instance). The other "errors" you see are just warnings, which will be removed in future versions but are not a problem right now. This means that your code compiles correctly and you can start using it.

HalseyWang commented 3 years ago

Thank you very much for your help!

lorenzo-rovigatti commented 3 years ago

This issue has been fixed in aebbdba3a9e6ec653f971aa8bce07ecf6d9bab1d and sooner or later will be merged in the master branch.