Closed vincekurtz closed 3 years ago
Quick update: older versions of the Drake binaries (up to and including v.0.29.0) seem to work perfectly fine. The more recent binaries (corresponding to v.0.30.0 and onward) seem to have this issue.
I agree this is likely due to the recently-introduced (by me) dependence on AVX2 & FMA instructions. -march=native
build from source should fix that, but is likely being overridden by the Bazel instructions here where the use of those instructions depends only on whether we are building for Apple machines:
drake_cc_library(
name = "fast_pose_composition_functions",
srcs = ["fast_pose_composition_functions.cc"],
hdrs = ["fast_pose_composition_functions.h"],
copts = select({
"//tools/cc_toolchain:apple": [],
"//conditions:default": [
"-march=broadwell",], }
)
...
I don't have an older machine to test this on, but I believe if you remove the copts
line here you'll get a build that works. Please give that a try and post here whether that fixes the problem.
Thanks for the quick reply! I'll give that a shot and will report back when it's finished (which may be as late as tomorrow, since the compilation process is pretty slow on this machine).
Yes, commenting out the copts
line in math/BUILD.bazel
and compiling with -march=native
fixes the issue. I was able to compile successfully and everything seems to be working normally now. Thanks!
I am leaving this open with a new title as a call for accessible documentation on how to get Drake compiled on older Intel machines.
Probably the "Supported Configuration" documentation should mention that we require AVX2 and FMA when running on Ubuntu. We seem to have missed that in the original batch of changes, though we did mention it in the release notes.
I'm trying to install drake on an older laptop (ThinkPad E420, Ubuntu 20.04, Intel i5-2430M CPU) and running into an
Illegal instruction (core dumped)
error. This occurs both with a binary installation and when building from source.What I've Tried
Installing Drake from binaries per these instructions. I was then able to run the
drake-visualizer
and importpydrake
successfully. But hit the "Illegal instruction" error when trying to runRegisterCollisionGeometry
.I then figured the precompiled binaries might use some CPU instructions that this older machine doesn't support, so I tried compiling from source (using cmake, since I want to use the python bindings). This had the same result (drake-visualizer works, can import pydrake, create a MultibodyPlant, solve some simple MathematicalPrograms, but RegisterCollisionGeometry fails).
From this issue I thought the problem might be reliance on AVX2 and FMA instructions, which this CPU doesn't seem to support (see below). So I recompiled with the line
in
~/.bazelrc
in the hopes that this would force the compiler to only use available CPU instructions, but this gave the same result.Steps to reproduce
This simple python script illustrates the problem:
The same error also crops up in various other precompiled binaries. For example,
throws the same error.
Debug info
System info:
Environment variables
LD_LIBRARY_PATH=
(empty)PYTHONPATH=[HOME]/builds/drake/drake-build/install/lib/python3.8/site-packages
Output of
cat /proc/cpuinfo
: cpuinfo.txt