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
minimal.cc example fails on ARM #25
Comments
On further investigation I think the problem is in the new It reads
|
slyon
added a commit
to slyon/PTL
that referenced
this issue
Dec 13, 2021
On armhf this function could return 0, as /proc/cpuinfo does not contain any "core id" lines: processor : 0 BogoMIPS : 100.00 Features : fp asimd evtstrm cpuid CPU implementer : 0x50 CPU architecture: 8 CPU variant : 0x0 CPU part : 0x000 CPU revision : 1 This leads to a division-by-zero in the minimal.cc example. We should fall back to GetNumberOfCores() if it would be 0. Fixes: jrmadsen#25
jrmadsen
added a commit
that referenced
this issue
Dec 13, 2021
) * Threading: Fix GetNumberOfPhysicalCpus, it should never return zero On armhf this function could return 0, as /proc/cpuinfo does not contain any "core id" lines: processor : 0 BogoMIPS : 100.00 Features : fp asimd evtstrm cpuid CPU implementer : 0x50 CPU architecture: 8 CPU variant : 0x0 CPU part : 0x000 CPU revision : 1 This leads to a division-by-zero in the minimal.cc example. We should fall back to GetNumberOfCores() if it would be 0. Fixes: #25 Co-authored-by: Jonathan R. Madsen <jrmadsen@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
ptl-minimal crashes with SIGFPE, Arithmetic exception on 32bit ARM. If commit 4e230f6 is reverted, the problem disappears. Especially the following line seems to introduce the Floating point exception:
static intmax_t nincr = std::max<intmax_t>(ncores / ncpus, 1);
See also: https://bugs.debian.org/1001237
To Reproduce
Steps to reproduce the behavior:
apt install libptl-dev
(v2.3.0-1)cd examples && mkdir build && cd build
cmake .. && make
./minimal/ptl-minimal
(Observe crash)Expected behavior
Test should be run successfully.
Desktop (please complete the following information):
Additional context
Does not seem to happen on other architectures but
armhf
(32bit ARM)The text was updated successfully, but these errors were encountered: