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
I am an Admin at the HPC center of ZIH TU-Dresden, I provide MuJoCo for our researchers
My setup
Mujoco 3.3.0, on Intel Sapphire Rapids and AMD Rome
GCC 13.2
What's happening? What did you expect?
Running ctest after the build shows a failure in UserObjectsTest.Inertial which I think is "just" an overly strict comparision. It looks like:
[ RUN ] UserObjectsTest.Inertial
/dev/shm//mujoco-3.3.0/test/user/user_objects_test.cc:2511: Failure
Expected equality of these values:
AsVector(m->body_iquat+4, 4)
Which is: { -0.51924266463036339, 0.37105264616146549, 0.19689792716967142, -0.74427024344684178 }
AsVector(quat, 4)
Which is: { -0.5192426646303635, 0.37105264616146549, 0.19689792716967142, -0.74427024344684178 }
It looks like it compares floating point numbers for equality which is error-prone given the differing rounding behavior on different architectures.
Was this observed already somewhere else? Can it be changed to be more reliable?
I do get the exact same values (to the printed permission at least) on 2 different systems with otherwise identical software. So it doesn't look like a purely hardware-specific issue.
Steps for reproduction
mkdir build && cd build && cmake ..
make -j user_objects_test && (cd ../test/ && /dev/shm/mujoco-3.3.0/build/bin/user_objects_test )
I traced that to the function mju_euler2Quat in engine_util_spatial.c yielding those different results compared to user_object.cc
The issue seems to be caused by compiling one as C++ and the other as C which seem to have slightly different rounding behavior
Edit: I found a different vectorization in mjuu_mulquat compared to mju_mulQuat (besides the former doing a superflous normalization so the implementation and test code aren't fully equal to begin with, but that doesn't matter here as the same issue holds when the additional code is removed) The former is C++ and used from user_objects, the latter is in C. Putting the exact same code as input to gcc and g++ yields a slight difference that might explain the different results. See https://godbolt.org/z/rneTbfxas
Intro
Hi!
I am an Admin at the HPC center of ZIH TU-Dresden, I provide MuJoCo for our researchers
My setup
Mujoco 3.3.0, on Intel Sapphire Rapids and AMD Rome
GCC 13.2
What's happening? What did you expect?
Running
ctest
after the build shows a failure inUserObjectsTest.Inertial
which I think is "just" an overly strict comparision. It looks like:It looks like it compares floating point numbers for equality which is error-prone given the differing rounding behavior on different architectures.
Was this observed already somewhere else? Can it be changed to be more reliable?
I do get the exact same values (to the printed permission at least) on 2 different systems with otherwise identical software. So it doesn't look like a purely hardware-specific issue.
Steps for reproduction
mkdir build && cd build && cmake ..
make -j user_objects_test && (cd ../test/ && /dev/shm/mujoco-3.3.0/build/bin/user_objects_test )
Minimal model for reproduction
No response
Code required for reproduction
No response
Confirmations
The text was updated successfully, but these errors were encountered: