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

DoDemul segfault with 44 antennas and AVX512 #336

Open
asedlmayr opened this issue Dec 16, 2021 · 3 comments · Fixed by #338
Open

DoDemul segfault with 44 antennas and AVX512 #336

asedlmayr opened this issue Dec 16, 2021 · 3 comments · Fixed by #338
Assignees
Labels
bug Something isn't working
Milestone

Comments

@asedlmayr
Copy link
Collaborator

Suspected to be alignment issue on DoDemul line 141 ( mm512_store_ps(dst + j * cfg->BsAntNum() * 2, data_rx);)

If antenna_num=48 (46/42) everything appears to work ok ....
-change antenna_num to 44 and you should see a segfault.

@asedlmayr asedlmayr added the bug Something isn't working label Dec 16, 2021
@asedlmayr asedlmayr added this to the 2021-Q3 milestone Dec 16, 2021
@asedlmayr asedlmayr self-assigned this Dec 16, 2021
@di-mu
Copy link
Collaborator

di-mu commented Dec 19, 2021

Change the condition "cfg_->BsAntNum() % 4 == 0" to "cfg_->BsAntNum() % 8 == 0" in https://github.com/jianding17/Agora/blob/d090d16d7e7ae1fc91df6caf3a4996769a9c0e97/src/agora/dodemul.cc#L118 can fix this segfault if antenna_num is 44.

It seems mm512_store_ps() only allows the destination offsets to be multiplications of 16.
https://github.com/jianding17/Agora/blob/d090d16d7e7ae1fc91df6caf3a4996769a9c0e97/src/agora/dodemul.cc#L141

@asedlmayr asedlmayr assigned di-mu and unassigned asedlmayr Dec 20, 2021
@asedlmayr
Copy link
Collaborator Author

In member function ‘virtual EventData DoDemul::Launch(size_t)’:
/scratch/repos/agora/src/agora/dodemul.cc:140:65: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
140 | : _mm512_i32gather_ps(index, src + j * 2, 4);

don't add to void pointers. cast the memory before doing a jump

@asedlmayr asedlmayr pinned this issue Dec 21, 2021
@asedlmayr asedlmayr unpinned this issue Dec 21, 2021
@asedlmayr asedlmayr linked a pull request Jan 3, 2022 that will close this issue
@asedlmayr
Copy link
Collaborator Author

I made an update in #338 to address the issue. Hope we can understand it better and fix it in a more rigorous way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants