Closed raffaello-camoriano closed 5 years ago
The functions which get multiple definition errors are the following casting ones (static inline functions):
_mm_castpd_ps⚠ | x86-64 and sse2Casts a 128-bit floating-point vector of [2 x double] into a 128-bit floating-point vector of [4 x float].
-- | --
_mm_castpd_si128⚠ | x86-64 and sse2Casts a 128-bit floating-point vector of [2 x double] into a 128-bit integer vector.
_mm_castps_pd⚠ | x86-64 and sse2Casts a 128-bit floating-point vector of [4 x float] into a 128-bit floating-point vector of [2 x double].
_mm_castps_si128⚠ | x86-64 and sse2Casts a 128-bit floating-point vector of [4 x float] into a 128-bit integer vector.
_mm_castsi128_pd⚠ | x86-64 and sse2Casts a 128-bit integer vector into a 128-bit floating-point vector of [2 x double].
_mm_castsi128_ps⚠ | x86-64 and sse2Casts a 128-bit integer vector into a 128-bit floating-point vector of [4 x float].
Apparently they are doubly defined in h-files in both the following Eigen installation and Clang directories:
Note: the definitions are different.
e.g., for _mm_castpd_ps
the definition of the function in the Clang directory is:
/// \brief Casts a 128-bit floating-point vector of [2 x double] into a 128-bit
/// floating-point vector of [4 x float].
///
/// \headerfile <x86intrin.h>
///
/// This intrinsic has no corresponding instruction.
///
/// \param __a
/// A 128-bit floating-point vector of [2 x double].
/// \returns A 128-bit floating-point vector of [4 x float] containing the same
/// bitwise pattern as the parameter.
static __inline__ __m128 __DEFAULT_FN_ATTRS
_mm_castpd_ps(__m128d __a)
{
return (__m128)__a;
}
On the other hand, the definitions in the Eigen directory are:
#if EIGEN_COMP_PGI < 1900
// PGI++ does not define the following intrinsics in C++ mode.
static inline __m128 _mm_castpd_ps (__m128d x) { return reinterpret_cast<__m128&>(x); }
static inline __m128i _mm_castpd_si128(__m128d x) { return reinterpret_cast<__m128i&>(x); }
static inline __m128d _mm_castps_pd (__m128 x) { return reinterpret_cast<__m128d&>(x); }
static inline __m128i _mm_castps_si128(__m128 x) { return reinterpret_cast<__m128i&>(x); }
static inline __m128 _mm_castsi128_ps(__m128i x) { return reinterpret_cast<__m128&>(x); }
static inline __m128d _mm_castsi128_pd(__m128i x) { return reinterpret_cast<__m128d&>(x); }
#endif
We discovered there was a problem with the version of Eigen3 I had installed via https://github.com/eigenteam/eigen-git-mirror, corresponding to this commit from 17 days ago: https://github.com/eigenteam/eigen-git-mirror/tree/08eb1921b89b1d826f8b699bc2e54d68451b3751
This version had an issue with the EIGEN_COMP_PGI
environment variable, which was fixed (https://bitbucket.org/eigen/eigen/commits/bf5052da0fca417007983107ba836d1d1ae6ae0a) after a few days.
We fixed the problem using the default Ubuntu 18.04 version of Eigen (3.3.4) instead (or also the most recent version as of today: 7805e962d9293578332e8b54f13f4a65a5faee11
), by running sudo apt-get install libeigen3-dev
and setting EIGEN_DIR = /usr/include/eigen3
in the DeepMimicCore
Makefile
cool, thanks for the note!
You're welcome!
Hello, thank you very much for making your code available.
I've read the DeepMimic paper and found it very interesting for my research. I would like to try the experiments myself.
After following the instructions I am currently stuck with the following build error and would like to ask for help. It may well be something trivial.
Thank you in advance.
Host system info
C++
USE_DOUBLE_PRECISION=OFF
Miscellanea
MPI4Py
Python3
Source directories settings
As specified in https://github.com/xbpeng/DeepMimic#linux by the author of DeepMimic, i specified the following installation directories before running
make python
:EIGEN_DIR
: Eigen include directory ==>../../eigen-git-mirror
BULLET_INC_DIR
: Bullet source directory ==>../../bullet3-2.87/src
PYTHON_INC
: python include directory ==>/usr/include/python3.6m
PYTHON_LIB
: python lib directory ==>/usr/lib/python3.6
Error