Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compartments CPU (release) vs GPU (release) Spike Times Deviation #45

Open
staslist opened this issue Nov 3, 2017 · 2 comments
Open

Comments

@staslist
Copy link
Contributor

staslist commented Nov 3, 2017

The issue was revelead by Compartments spikeTimesCPUvsGPU test.
The issue occurs at some, but not all timesteps.

CPU + release, CPU + debug, and GPU + debug modes all produce the same spike times when running compartment models. The GPU + release mode, however, deviaties from the other three models.

Overview of the issue:
The GPU release mode seems to suffer from occassional calculation 'errors' that slowly snowball out of control. The cause of these calculation 'errors' has not been determined.

More in depth look:
The deviation is first evident in regard to voltage values then recovery & current variables.
The deviation slowly increases in size, eventually resulting in deviation between spike times.
The deviation in voltage values begins early on (within first 100ms).

The GPU release voltage values deviate from GPU debug voltage.
The CPU release voltage and CPU debug voltage do not deviate.

Print statements in GPU release mode seem to affect the reported values.
This is not the case in GPU debug mode.

Attempted:
Equating different optimization flags between debug & release modes for both C/C++ and CUDA C/C++.

https://devtalk.nvidia.com/default/topic/551571/different-results-when-using-gpu-debug-option-g-/?offset=6

https://www.researchgate.net/post/Debug_mode_VS_release_mode_in_visual_studio

https://devtalk.nvidia.com/default/topic/670121/release-and-debug-modes-on-cuda-5-0/

Disabling FMAD:
https://stackoverflow.com/questions/14552576/disabling-fused-multiply-add-in-cuda-under-visual-studio-2010

Potential Causes:

  1. Race condition?
  2. ???
@nmsutton
Copy link

nmsutton commented Dec 11, 2022

@staslist an update on this is that I am not seeing any spikeTimesCPUvsGPU test fail in "test/compartments.cpp" or "test/stp.cpp" in CARLsim6 using Ubuntu 21.10 with an Intel 12900KS CPU and NVidia RTX 3090 GPU (CUDA 11.4). Perhaps this means this bug has been resolved in CARLsim6? If the test is still failing in CARLsim4 then this issue could stay open for that version.

@bainro
Copy link
Member

bainro commented Sep 28, 2023

I'm just going thru old CARLsim issues, and just as a coincidence I currently debugging this in CARLsim6. We hadn't had this compartments.cpp in the test suite since CARLsim4 and if you add it back in, like I'm trying to do in CARLsim6, it will FAIL tests:

image

The tolerance of spike time differences is 1ms, but the worst I can see is 3ms, and most are 2ms... Going to continue looking into it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants