Skip to content

Commit

Permalink
Fix internal compiler error during JNI Docker build (#7645)
Browse files Browse the repository at this point in the history
This updates the JNI Docker build to devtoolset-8 to work around an internal compiler error crash with gcc 7.3.1.  The JNI Docker build is also updated to use the dlpack and RMM sources that were pulled down by CPM during the libcudf build rather than pulling and building them separately.

Authors:
  - Jason Lowe (@jlowe)

Approvers:
  - Raza Jafri (@razajafri)
  - Mike Wilson (@hyperbolic2346)

URL: #7645
  • Loading branch information
jlowe authored Mar 18, 2021
1 parent ec5364c commit a568432
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 32 deletions.
6 changes: 3 additions & 3 deletions java/ci/Dockerfile.centos7
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -25,7 +25,7 @@ FROM nvidia/cuda:$CUDA_VERSION-devel-centos7

### Install basic requirements
RUN yum install -y centos-release-scl
RUN yum install -y devtoolset-7 epel-release
RUN yum install -y devtoolset-8 epel-release
RUN yum install -y git zlib-devel maven tar wget patch

## pre-create the CMAKE_INSTALL_PREFIX folder, set writable by any user for Jenkins
Expand All @@ -34,7 +34,7 @@ RUN mkdir /usr/local/rapids && mkdir /rapids && chmod 777 /usr/local/rapids && c
RUN cd /rapids/ && wget https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.gz && \
tar zxf boost_1_72_0.tar.gz && \
cd boost_1_72_0 && \
scl enable devtoolset-7 "./bootstrap.sh --prefix=/usr && ./b2 install --with-filesystem threading=multi link=static cxxflags=-fPIC; exit 0"
scl enable devtoolset-8 "./bootstrap.sh --prefix=/usr && ./b2 install --with-filesystem threading=multi link=static cxxflags=-fPIC; exit 0"

RUN cd /usr/local/ && wget --quiet https://github.com/Kitware/CMake/releases/download/v3.19.0/cmake-3.19.0-Linux-x86_64.tar.gz && \
tar zxf cmake-3.19.0-Linux-x86_64.tar.gz
4 changes: 2 additions & 2 deletions java/ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ Here I choose to download again in the container.
git clone --recursive https://github.com/rapidsai/cudf.git -b branch-0.19
```

### Build cuDF jar
### Build cuDF jar with devtoolset

```bash
cd cudf
export WORKSPACE=`pwd`
scl enable devtoolset-7 "java/ci/build-in-docker.sh"
scl enable devtoolset-8 "java/ci/build-in-docker.sh"
```

### The output
Expand Down
26 changes: 1 addition & 25 deletions java/ci/build-in-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,7 @@ SIGN_FILE=$1
OUT_PATH=$WORKSPACE/$OUT

# set on Jenkins parameter
if [ -z $RMM_VERSION ]
then
RMM_VERSION=`git describe --tags | grep -o -E '([0-9]+\.[0-9]+)'`
fi
echo "RMM_VERSION: $RMM_VERSION,\
SIGN_FILE: $SIGN_FILE,\
echo "SIGN_FILE: $SIGN_FILE,\
SKIP_JAVA_TESTS: $SKIP_JAVA_TESTS,\
BUILD_CPP_TESTS: $BUILD_CPP_TESTS,\
ENABLED_PTDS: $ENABLE_PTDS,\
Expand All @@ -47,30 +42,11 @@ INSTALL_PREFIX=/usr/local/rapids
export GIT_COMMITTER_NAME="ci"
export GIT_COMMITTER_EMAIL="[email protected]"
export CUDACXX=/usr/local/cuda/bin/nvcc
export RMM_ROOT=$INSTALL_PREFIX
export DLPACK_ROOT=$INSTALL_PREFIX
export LIBCUDF_KERNEL_CACHE_PATH=/rapids

# add cmake 3.19 to PATH
export PATH=/usr/local/cmake-3.19.0-Linux-x86_64/bin:$PATH

cd /rapids/
git clone --recurse-submodules https://github.com/rapidsai/rmm.git -b branch-$RMM_VERSION
git clone --recurse-submodules https://github.com/rapidsai/dlpack.git -b cudf

###### Build rmm/dlpack ######
mkdir -p /rapids/rmm/build
cd /rapids/rmm/build
echo "RMM SHA: `git rev-parse HEAD`"
cmake .. -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DBUILD_TESTS=$BUILD_CPP_TESTS
make -j$PARALLEL_LEVEL install

mkdir -p /rapids/dlpack/build
cd /rapids/dlpack/build
echo "DLPACK SHA: `git rev-parse HEAD`"
cmake .. -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DBUILD_TESTS=$BUILD_CPP_TESTS
make -j$PARALLEL_LEVEL install

###### Build libcudf ######
rm -rf $WORKSPACE/cpp/build
mkdir -p $WORKSPACE/cpp/build
Expand Down
6 changes: 4 additions & 2 deletions java/src/main/native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ find_path(LIBCUDACXX_INCLUDE "cuda"
"${CUDF_CPP_BUILD_DIR}/_deps/libcudacxx-src/include")

find_path(SPDLOG_INCLUDE "spdlog"
HINTS "$ENV{RMM_ROOT}/_deps/spdlog-src/include"
HINTS "${CUDF_CPP_BUILD_DIR}/_deps/spdlog-src/include"
"$ENV{RMM_ROOT}/_deps/spdlog-src/include"
"$ENV{RMM_ROOT}/include"
"$ENV{CONDA_PREFIX}/include")

Expand All @@ -147,7 +148,8 @@ find_library(CUDF_LIB "cudf" REQUIRED HINTS ${CUDF_LIB_HINTS})
# - RMM -------------------------------------------------------------------------------------------

find_path(RMM_INCLUDE "rmm"
HINTS "$ENV{RMM_ROOT}/include"
HINTS "${CUDF_CPP_BUILD_DIR}/_deps/rmm-src/include"
"$ENV{RMM_ROOT}/include"
"$ENV{RMM_HOME}/include"
"$ENV{CONDA_PREFIX}/include/rmm"
"$ENV{CONDA_PREFIX}/include")
Expand Down

0 comments on commit a568432

Please sign in to comment.