spirit-code / spirit

Atomistic Spin Simulation Framework

Home Page:http://spirit-code.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Weird results caused by using CUDA

zangyuzhe opened this issue · comments

Hi,

I found some weird results caused by using CUDA. Log file, cfg file, initial state and final state are attached.

I can’t relax a skyrmion even under 100T external field with the attached cfg file. When using CUDA, some spins in the centre are pinned and can’t be flipped. But this doesn’t happen if I use pip version of spirit.

Can anyone help me sort this out?

Many thanks,
Yuzhe

System information:

  • Os: Ubuntu 20.10
  • Kernal: 5.8.0-53-generic
  • CPU: Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz
  • GPU: GeForce GTX 1050
  • nvcc: Cuda compilation tools, release 10.1, V10.1.243
  • gcc: 9.3.0
  • cmake: 3.16.3

skyrmion_state
FInal_state
Log_2021-05-09_11-04-41.txt
input_modified.cfg.txt
2021-05-09_11-05-42_Image-00_Spins-final.ovf.txt

There might be an issue with the multi-atom basis, this looks like a bug. With the CUDA version it can always be due to the lack of precision (the CUDA backend is limited to single precision float). However, your log indicates that the pairs were correctly identified,

2021-05-09 11:04:41  [ PARAM ] [IO  ] [--] [--]  Done reading 50 spin pairs from file "input/input_modified.cfg", giving 10 exchange and 10 DM (symmetry-reduced) pairs.

(at least I get the same on my machine).

I suspect that these stripes will appear throughout the whole system if you start from a random configuration? It might be an issue with the dipolar interactions, please try switching them off (ddi_method none) and see if the issue persists. If not, we seem to have a bug in the cuFFT implementation of the DDI.

I have done a quick test which started from a random configuration.
This is the result with DDI.
WIth_DDI

This is the result without DDI.
Without_DDI

Looks to me like the bugfix from commit 3e46c0d was not applied to the CUDA backend, leading to indexing errors when using a multi-atom basis.

Dear @zangyuzhe, thank you for pointing out these issues! There were indeed several bugs in the cuda backend with regard to multi-atom bases. I have pushed fixes to the develop branch 382cac3. According to my checks, the issues you encountered should be fixed now. Please let us know if you find more problems!

Dear @MSallermann , I will run some test simulation today. If there is any problem, I will let u know.

Dear @zangyuzhe, is your problem solved so we could close this issue?

Dear @GPMueller , thank you for ur help. Problem has been resolved.