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

support AppleClang with openmp #1501

Merged
merged 6 commits into from
Jul 13, 2018
Merged

support AppleClang with openmp #1501

merged 6 commits into from
Jul 13, 2018

Conversation

levyfan
Copy link
Contributor

@levyfan levyfan commented Jul 10, 2018

support #1492
Tested with cmake 3.12.0-rc3 and Apple LLVM version 9.1.0 (clang-902.0.39.2) and libomp 5.0.1.

Howto

  • install libomp by homebrew brew install libomp
  • download and install cmake >= 3.12.0
  • mkdir build ; cd build
  • cmake ..
  • make -j

@henry0312
Copy link
Contributor

Oh, I didn't know AppleClang has supported OpenMP. Good news!

@levyfan
Copy link
Contributor Author

levyfan commented Jul 10, 2018

travis-ci says:

==> Installing gcc
==> Downloading /bottles/gcc-8.1.0.sierra.bottle.1.tar.gz
curl: (3) <url> malformed
Error: Failed to download resource "gcc"
Download failed: /bottles/gcc-8.1.0.sierra.bottle.1.tar.gz
Warning: Bottle installation failed: building from source.
==> Downloading https://ftp.gnu.org/gnu/gcc/gcc-8.1.0/gcc-8.1.0.tar.xz
==> ../configure --build=x86_64-apple-darwin16.7.0 --prefix=/usr/local/Cellar/gc
==> make
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
The build has been terminated

It seems installing gcc on macos exceed ci timeout.

@StrikerRUS
Copy link
Collaborator

StrikerRUS commented Jul 10, 2018

master fails too :(

Travis problems... again!

UPD:

VSTS macOS builds are running more than one hour too. So I suppose the problem is in brew.

@henry0312
Copy link
Contributor

henry0312 commented Jul 11, 2018

There is something wrong with OSX on Travis.
I don't know why curl: (3) <url> malformed happens.

==> Installing gcc
==> Downloading /bottles/gcc-8.1.0.sierra.bottle.1.tar.gz
curl: (3) <url> malformed
Error: Failed to download resource "gcc"
Download failed: /bottles/gcc-8.1.0.sierra.bottle.1.tar.gz
Warning: Bottle installation failed: building from source.
==> Downloading https://ftp.gnu.org/gnu/gcc/gcc-8.1.0/gcc-8.1.0.tar.xz
==> ../configure --build=x86_64-apple-darwin16.7.0 --prefix=/usr/local/Cellar/gc
==> make

@StrikerRUS
Copy link
Collaborator

For issue tracking:

travis-ci/travis-ci#9865

@StrikerRUS
Copy link
Collaborator

Travis seems to be OK now. Rerunning builds.

CMakeLists.txt Outdated
@@ -24,7 +24,7 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
message(FATAL_ERROR "Insufficient Clang version")
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
message(FATAL_ERROR "AppleClang isn't supported. Please see https://github.com/Microsoft/LightGBM/blob/master/docs/Installation-Guide.rst#macos")
cmake_minimum_required(VERSION 3.12)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's better to move this to the top of the file where other cmake_minimum_required are listed?

@chivee
Copy link
Collaborator

chivee commented Jul 12, 2018

@levyfan , could you also help with the updating of Documents?

@msftclas
Copy link

msftclas commented Jul 12, 2018

CLA assistant check
All CLA requirements met.

Apple Clang
***********

1. Install `CMake`_ (3.12 or higher).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be nice if the certain version of AppleClang been specified.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not very certain about the minimal version. I know
macOS >= el_capitan is supported by https://github.com/Homebrew/homebrew-core/blob/master/Formula/libomp.rb

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A reasonable guess would be 9.0 (since 10.12).

@chivee
Copy link
Collaborator

chivee commented Jul 12, 2018

I think we could update the Travis for macOS to using AppleClang as default. I' ll create related PR

@chivee chivee closed this Jul 12, 2018
@chivee chivee reopened this Jul 12, 2018
@StrikerRUS
Copy link
Collaborator

@chivee

I think we could update the Travis for macOS to using AppleClang as default. I' ll create related PR

Don't it too early, because CMake 3.12 is Release Candidate now? I mean, can we install it via brew at Travis?

@levyfan
Copy link
Contributor Author

levyfan commented Jul 12, 2018

@StrikerRUS we could use brew --HEAD for cmake now and switch to stable release later.

@levyfan
Copy link
Contributor Author

levyfan commented Jul 13, 2018

Why is VSTS: LightGBM-Build-CI still running? 😿

@guolinke guolinke closed this Jul 13, 2018
@guolinke guolinke reopened this Jul 13, 2018
@guolinke
Copy link
Collaborator

@levyfan levyfan deleted the 1492 branch July 15, 2018 07:21
@lock lock bot locked as resolved and limited conversation to collaborators Mar 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants