Skip to content

Commit

Permalink
Merge pull request #98 from eidenyoshida/35cherrypick
Browse files Browse the repository at this point in the history
* Fixing multiple inclusion of hip causing compile error (#97)

* Centos8 additions to install script and CI (#94)
  • Loading branch information
eidenyoshida authored May 19, 2020
2 parents be5ba48 + 2a51904 commit 5cbd8a8
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .jenkins/precheckin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ ci: {
propertyList = auxiliary.appendPropertyList(propertyList)

def jobNameList = ["compute-rocm-dkms-no-npi":([ubuntu16:['gfx900'],centos7:['gfx906'],sles15sp1:['gfx906']]),
"compute-rocm-dkms-no-npi-hipclang":([ubuntu16:['gfx900'],centos7:['gfx906'],sles15sp1:['gfx906']]),
"compute-rocm-dkms-no-npi-hipclang":([ubuntu16:['gfx900'],centos7:['gfx906'],centos8:['gfx906'],sles15sp1:['gfx906']]),
"rocm-docker":([ubuntu16:['gfx900'],ubuntu18:['gfx900'],centos7:['gfx906'],sles15sp1:['gfx906']])]
jobNameList = auxiliary.appendJobNameList(jobNameList)
jobNameList = auxiliary.appendJobNameList(jobNameList, 'rocSOLVER')

propertyList.each
{
Expand Down
52 changes: 52 additions & 0 deletions docker/dockerfile-build-centos8
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Parameters related to building rocsolver
ARG base_image

FROM ${base_image}
LABEL maintainer="[email protected]"

ARG user_uid

# Install dependent packages
RUN yum install -y --nogpgcheck\
sudo \
ca-certificates \
git \
cmake3 \
make \
gcc-c++ \
gcc-gfortran \
pkgconfig \
python27 \
python3 \
python3-devel \
python3-pip \
python3-pytest \
python3-setuptools \
python3-virtualenv \
python3-pyyaml \
llvm-devel \
llvm-static \
libcxx-devel \
boost-devel \
zlib-devel \
libgomp \
numactl-libs \
rpm-build

RUN yum remove -y rocblas *gtest*

# Grant any member of sudo group password-less sudo privileges
RUN useradd --create-home -u ${user_uid} -o -G video --shell /bin/bash jenkins && \
echo '%video ALL=(ALL) NOPASSWD:ALL' | tee /etc/sudoers.d/sudo-nopasswd && \
chmod 400 /etc/sudoers.d/sudo-nopasswd

ARG ROCBLAS_SRC_ROOT=/usr/local/src/rocBLAS

# Clone rocblas repo
# Build client dependencies and install into /usr/local (LAPACK & GTEST)
RUN mkdir -p ${ROCBLAS_SRC_ROOT} && cd ${ROCBLAS_SRC_ROOT} && \
git clone -b develop --depth=1 https://github.com/ROCmSoftwarePlatform/rocBLAS . && \
mkdir -p build/deps && cd build/deps && \
cmake3 -DBUILD_BOOST=OFF ${ROCBLAS_SRC_ROOT}/deps && \
make -j $(nproc) install && \
rm -rf ${ROCBLAS_SRC_ROOT}
29 changes: 22 additions & 7 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,14 @@ install_packages( )
local library_dependencies_ubuntu=( "make" "cmake-curses-gui" "pkg-config"
"python2.7" "python3" "python-yaml" "python3-yaml" "python3*-distutils"
"llvm-6.0-dev" "zlib1g-dev" "wget")
local library_dependencies_centos=( "epel-release"
local library_dependencies_centos_7=( "epel-release"
"make" "cmake3" "rpm-build"
"python34" "PyYAML" "python3*-PyYAML" "python3*-distutils-extra"
"gcc-c++" "llvm7.0-devel" "llvm7.0-static"
"zlib-devel" "wget" )
local library_dependencies_centos_8=( "epel-release"
"make" "rpm-build" "cmake3"
"python3" "python3-pyyaml" "gcc-c++" "zlib-devel" "wget" )
local library_dependencies_fedora=( "make" "cmake" "rpm-build"
"python34" "PyYAML" "python3*-PyYAML" "python3*-distutils-extra"
"gcc-c++" "libcxx-devel" "zlib-devel" "wget" )
Expand All @@ -178,14 +181,16 @@ install_packages( )
if [[ "${build_hip_clang}" == false ]]; then
# Installing rocm-dev installs hip-hcc, which overwrites the hip-vdi runtime
library_dependencies_ubuntu+=( "rocm-dev" )
library_dependencies_centos+=( "rocm-dev" )
library_dependencies_centos_7+=( "rocm-dev" )
library_dependencies_centos_8+=( "rocm-dev" )
library_dependencies_fedora+=( "rocm-dev" )
library_dependencies_sles+=( "rocm-dev" )
fi

# dependencies to build the client
local client_dependencies_ubuntu=( "gfortran" "libomp-dev" "libboost-program-options-dev")
local client_dependencies_centos=( "devtoolset-7-gcc-gfortran" "libgomp" "boost-devel" )
local client_dependencies_centos_7=( "devtoolset-7-gcc-gfortran" "libgomp" "boost-devel" )
local client_dependencies_centos_8=( "gcc-gfortran" "libgomp" "boost-devel" )
local client_dependencies_fedora=( "gcc-gfortran" "libgomp" "boost-devel" )
local client_dependencies_sles=( "gcc-fortran" "libgomp1" "libboost_program_options1_66_0-devel" )

Expand All @@ -200,10 +205,18 @@ install_packages( )
;;

centos|rhel)
install_yum_packages "${library_dependencies_centos[@]}"
if [[ ( "${VERSION_ID}" -ge 8 ) ]]; then
install_yum_packages "${library_dependencies_centos_8[@]}"

if [[ "${build_clients}" == true ]]; then
install_yum_packages "${client_dependencies_centos[@]}"
if [[ "${build_clients}" == true ]]; then
install_yum_packages "${client_dependencies_centos_8[@]}"
fi
elif [[ ( "${VERSION_ID}" -ge 7 ) ]]; then
install_yum_packages "${library_dependencies_centos_7[@]}"

if [[ "${build_clients}" == true ]]; then
install_yum_packages "${client_dependencies_centos_7[@]}"
fi
fi
;;

Expand Down Expand Up @@ -433,7 +446,9 @@ fi

case "${ID}" in
centos|rhel)
cmake_common_options="${cmake_common_options} -DCMAKE_FIND_ROOT_PATH=/usr/lib64/llvm7.0/lib/cmake/"
if [[ ( "${VERSION_ID}" -ge 7 ) ]]; then
cmake_common_options="${cmake_common_options} -DCMAKE_FIND_ROOT_PATH=/usr/lib64/llvm7.0/lib/cmake/"
fi
;;
esac

Expand Down
6 changes: 5 additions & 1 deletion rocsolver/clients/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ endif( )

# Hip headers required of all clients; clients use hip to allocate device memory
list( APPEND CMAKE_PREFIX_PATH ${ROCM_PATH} /opt/rocm )
find_package( hip REQUIRED CONFIG PATHS ${ROCM_PATH} )

#Don't search for hip package again if it's already found
if(NOT hip_FOUND)
find_package( hip REQUIRED CONFIG PATHS ${ROCM_PATH} )
endif()

# Quietly look for CUDA, but if not found it's not an error
# The presense of hip is not sufficient to determine if we want a rocm or cuda backend
Expand Down

0 comments on commit 5cbd8a8

Please sign in to comment.