Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSX Version Requirement #405

Closed
szha opened this issue Feb 5, 2019 · 11 comments
Closed

OSX Version Requirement #405

szha opened this issue Feb 5, 2019 · 11 comments
Assignees
Labels
bug A confirmed library bug

Comments

@szha
Copy link

szha commented Feb 5, 2019

At Apache MXNet (Incubating) we want to make sure that it's easy for users to install our framework. On the other hand, the recent requirement on OSX 10.13 prevents us from offering hassle-free binary distribution on Mac with MKL-DNN option. Would it be feasible to extend the compatibility to earlier OSX/Xcode? (xcode 8, OSX 10.11 is what we currently offer)

@nathan-greeneltch-intel
Copy link
Contributor

We don't have a requirement for OSX 10.13, but it is the version we validate against. Are you seeing errors with 10.11? If so, this is unexpected from our end.

@vpirogov vpirogov added the sighting Suspicious library behavior. Should be promoted to a bug when confirmed label Feb 6, 2019
@szha
Copy link
Author

szha commented Feb 7, 2019

...

Downloaded and unpacked Intel(R) MKL small libraries to /Users/travis/build/dmlc/mxnet-distro/mxnet-build/3rdparty/mkldnn/external

-- CMAKE_BUILD_TYPE is unset, defaulting to Release

-- Detecting Intel(R) MKL: trying mklml_intel

-- Intel(R) MKL: include /Users/travis/build/dmlc/mxnet-distro/mxnet-build/3rdparty/mkldnn/build/install/include

-- Intel(R) MKL: lib /Users/travis/build/dmlc/mxnet-distro/mxnet-build/3rdparty/mkldnn/build/install/lib/libmklml.dylib

-- Try OpenMP C flag = [-fopenmp=libomp]

-- Performing Test OpenMP_FLAG_DETECTED

-- Performing Test OpenMP_FLAG_DETECTED - Failed

-- Try OpenMP C flag = [ ]

-- Performing Test OpenMP_FLAG_DETECTED

-- Performing Test OpenMP_FLAG_DETECTED - Failed

-- Try OpenMP C flag = [-fopenmp]

-- Performing Test OpenMP_FLAG_DETECTED

-- Performing Test OpenMP_FLAG_DETECTED - Failed

-- Try OpenMP C flag = [/openmp]

-- Performing Test OpenMP_FLAG_DETECTED

-- Performing Test OpenMP_FLAG_DETECTED - Failed

-- Try OpenMP C flag = [-Qopenmp]

-- Performing Test OpenMP_FLAG_DETECTED

-- Performing Test OpenMP_FLAG_DETECTED - Failed

-- Try OpenMP C flag = [-openmp]

-- Performing Test OpenMP_FLAG_DETECTED

-- Performing Test OpenMP_FLAG_DETECTED - Failed

-- Try OpenMP C flag = [-xopenmp]

-- Performing Test OpenMP_FLAG_DETECTED

-- Performing Test OpenMP_FLAG_DETECTED - Failed

-- Try OpenMP C flag = [+Oopenmp]

-- Performing Test OpenMP_FLAG_DETECTED

-- Performing Test OpenMP_FLAG_DETECTED - Failed

-- Try OpenMP C flag = [-qsmp]

-- Performing Test OpenMP_FLAG_DETECTED

-- Performing Test OpenMP_FLAG_DETECTED - Failed

-- Try OpenMP C flag = [-mp]

-- Performing Test OpenMP_FLAG_DETECTED

-- Performing Test OpenMP_FLAG_DETECTED - Failed

-- Try OpenMP CXX flag = [-fopenmp=libomp]

-- Performing Test OpenMP_FLAG_DETECTED

-- Performing Test OpenMP_FLAG_DETECTED - Failed

-- Try OpenMP CXX flag = [ ]

-- Performing Test OpenMP_FLAG_DETECTED

-- Performing Test OpenMP_FLAG_DETECTED - Failed

-- Try OpenMP CXX flag = [-fopenmp]

-- Performing Test OpenMP_FLAG_DETECTED

-- Performing Test OpenMP_FLAG_DETECTED - Failed

-- Try OpenMP CXX flag = [/openmp]

-- Performing Test OpenMP_FLAG_DETECTED

-- Performing Test OpenMP_FLAG_DETECTED - Failed

-- Try OpenMP CXX flag = [-Qopenmp]

-- Performing Test OpenMP_FLAG_DETECTED

-- Performing Test OpenMP_FLAG_DETECTED - Failed

-- Try OpenMP CXX flag = [-openmp]

-- Performing Test OpenMP_FLAG_DETECTED

-- Performing Test OpenMP_FLAG_DETECTED - Failed

-- Try OpenMP CXX flag = [-xopenmp]

-- Performing Test OpenMP_FLAG_DETECTED

-- Performing Test OpenMP_FLAG_DETECTED - Failed

-- Try OpenMP CXX flag = [+Oopenmp]

-- Performing Test OpenMP_FLAG_DETECTED

-- Performing Test OpenMP_FLAG_DETECTED - Failed

-- Try OpenMP CXX flag = [-qsmp]

-- Performing Test OpenMP_FLAG_DETECTED

clang: warning: optimization flag '-finline-functions' is not supported

-- Performing Test OpenMP_FLAG_DETECTED - Failed

-- Try OpenMP CXX flag = [-mp]

-- Performing Test OpenMP_FLAG_DETECTED

-- Performing Test OpenMP_FLAG_DETECTED - Failed

-- Could NOT find OpenMP (missing:  OpenMP_C_FLAGS OpenMP_CXX_FLAGS) 

CMake Warning at cmake/OpenMP.cmake:107 (message):

  OpenMP library could not be found.  Proceeding might lead to highly

  sub-optimal performance.

Call Stack (most recent call first):

  CMakeLists.txt:69 (include)





CMake Error at cmake/OpenMP.cmake:39 (set_if):

  set_if Macro invoked with incorrect arguments for macro named: set_if

Call Stack (most recent call first):

  cmake/OpenMP.cmake:57 (forbid_link_compiler_omp_rt)

  cmake/OpenMP.cmake:115 (use_intel_omp_rt)

  CMakeLists.txt:69 (include)





CMake Error at cmake/OpenMP.cmake:40 (set_if):

  set_if Macro invoked with incorrect arguments for macro named: set_if

Call Stack (most recent call first):

  cmake/OpenMP.cmake:57 (forbid_link_compiler_omp_rt)

  cmake/OpenMP.cmake:115 (use_intel_omp_rt)

  CMakeLists.txt:69 (include)





-- OpenMP lib: /Users/travis/build/dmlc/mxnet-distro/mxnet-build/3rdparty/mkldnn/build/install/lib/libiomp5.dylib

-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 

-- VTune profiling environment is unset

-- Configuring incomplete, errors occurred!

See also "/Users/travis/build/dmlc/mxnet-distro/mxnet-build/3rdparty/mkldnn/build/CMakeFiles/CMakeOutput.log".

See also "/Users/travis/build/dmlc/mxnet-distro/mxnet-build/3rdparty/mkldnn/build/CMakeFiles/CMakeError.log".

@nathan-greeneltch-intel
Copy link
Contributor

Can you help me with steps leading up to this output? are you following the "build from source" section of https://software.intel.com/en-us/articles/apache-mxnet-v120-released-with-intel-optimized-cpu-backend

In the meantime, I will look for a machine with 10.11 OS to try and reproduce.

@rsdubtso
Copy link

rsdubtso commented Feb 7, 2019

Also, can you please share cmake version? I tried 3.9.4 (the oldest I have on our mac machine) and it seems to work...

@szha
Copy link
Author

szha commented Feb 8, 2019

The environment is on the travis-ci, osx_image: xcode8, with cmake version is 3.6.1. Though maybe not relevant, I have the following before_install/install steps:

before_install: |
  if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
    travis_wait rvm get head --auto-dotfiles;
    travis_wait brew update;
    travis_wait brew install pyenv openssl automake pkg-config nasm;
    travis_wait brew upgrade pyenv openssl automake pkg-config nasm --quiet;
    pyenv --version
    travis_wait pyenv install -s $PYTHON_VERSION
    export PATH=$HOME/.pyenv/versions/$PYTHON_VERSION/bin:$PATH
    python --version
    if [[ -z $(command -v pip) ]]; then
      travis_wait curl -L -O https://bootstrap.pypa.io/get-pip.py
      travis_wait python get-pip.py
    fi
    pip --version
  fi

install: |
  travis_wait sudo -H pip install -U pip "setuptools==36.2.0" wheel pypandoc twine nose numpy mock

I'm simply building mxnet with USE_MKLDNN=1 using make. MKLDNN related build logic is here. If you need other details on how building mkldnn works in mxnet, @pengzhao-intel and team should have it.

@pengzhao-intel
Copy link

pengzhao-intel commented Feb 8, 2019

thanks the helps @nathan-greeneltch-intel @rsdubtso

The build cmd for MKL-DNN as below:
https://github.com/apache/incubator-mxnet/blob/master/mkldnn.mk#L40

build from source:

git clone --recursive https://github.com/apache/incubator-mxnet/
cd incubator-mxnet
make USE_OPENCV=1 USE_MKLDNN=1 USE_BLAS=apple 

@vpirogov vpirogov added bug A confirmed library bug and removed sighting Suspicious library behavior. Should be promoted to a bug when confirmed labels Feb 11, 2019
@rsdubtso
Copy link

rsdubtso commented Feb 11, 2019

This is a bug in our build system that seems to be only triggered with some versions of CMake (like 3.6.1 in the travis configuraiton mentioned above) when the compiler does not support OpenMP (like the Apple's version of Clang). The fix is to quote macro arguments. It is working its way through the system and probably be in all the relevant branches by the end of the day today.

@vpirogov
Copy link
Member

@szha, Considering that we have v0.18 with this fix coming in 1-2 weeks do you need it backported to v0.17 branch?

@szha
Copy link
Author

szha commented Feb 11, 2019

Backport would be great. I’d love to get the fix into 1.4 release of mxnet is which will need the fix immediately.

mkl-dnn pushed a commit that referenced this issue Feb 11, 2019
mkl-dnn pushed a commit that referenced this issue Feb 11, 2019
@vpirogov
Copy link
Member

@szha, the fix is now available in v0.17, v0.18 and master.

@vpirogov
Copy link
Member

v0.17.4 with this fix for v0.17 branch is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A confirmed library bug
Projects
None yet
Development

No branches or pull requests

5 participants