You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yale cluster, pi-poland partition, SDPB compiled on cascadelake (with avx512) and run on broadwell (without avx512).
On one cluster, Singularity image built from docker://bootstrapcollaboration/sdpb:master fails, whereas docker://bootstrapcollaboration/sdpb:2.7.0 works fine. We don't have a stacktrace for this case.
Similar crash happened when running amd64 Docker image on arm64 CPU, see #222
Description
There were several cases when SDPB crashes right after printing parameters:
Two known cases:
cascadelake
(with avx512) and run onbroadwell
(without avx512).docker://bootstrapcollaboration/sdpb:master
fails, whereasdocker://bootstrapcollaboration/sdpb:2.7.0
works fine. We don't have a stacktrace for this case.Similar crash happened when running
amd64
Docker image onarm64
CPU, see #222Possible cause
The function that crashes is simply
sqrt(double)
called from FLINT'sn_sqrt()
:https://github.com/flintlib/flint/blob/213a4cff74d1bff9f0e07b63c57b6f3f8876e3a0/src/ulong_extras/sqrt.c#L20
On modern CPUs, sqrt is compiled to
vsqrtsd
instruction from AVX extensions.On older CPUs, it is compiled to
sqrtsd
.The problem arises when FLINT binary is compiled on a new CPU and used on an old one.
Fix
When building FLINT, run
./configure
with--host
option specifying target machine.For FLINT Docker image (built from https://github.com/vasdommes/flint/tree/docker-main), we should set
--host=amd64
option - this will ensure compatibility with all x86_64 CPUs by setting compiler flag-march=x86_64
, (see configure.ac and GCC flags).On clusters, one can choose more specific target host, e.g.
--host=broadwell
.If a similar problem occurs in SDPB's own code, one may set compiler flag e.g. as
CXXFLAGS="${CXXFLAGS} -march broadwell" ./waf configure <...>
The text was updated successfully, but these errors were encountered: