Giter Site home page Giter Site logo

Build error on Ubuntu 18.04 about deepmimic HOT 4 CLOSED

xbpeng avatar xbpeng commented on August 19, 2024
Build error on Ubuntu 18.04

from deepmimic.

Comments (4)

raffaello-camoriano avatar raffaello-camoriano commented on August 19, 2024 2

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

from deepmimic.

xbpeng avatar xbpeng commented on August 19, 2024 1

cool, thanks for the note!

from deepmimic.

raffaello-camoriano avatar raffaello-camoriano commented on August 19, 2024

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:

  • /usr/local/include/eigen3/Eigen/src/Core/arch/SSE/PacketMath.h
  • /usr/include/clang/6.0.0/include/emmintrin.h

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

from deepmimic.

raffaello-camoriano avatar raffaello-camoriano commented on August 19, 2024

You're welcome!

from deepmimic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.