From 9e2a0c2ce5d7bc2fee009e981ddfd3735553dfd6 Mon Sep 17 00:00:00 2001 From: Eiden Yoshida <47196116+eidenyoshida@users.noreply.github.com> Date: Tue, 19 May 2020 09:50:44 -0600 Subject: [PATCH 1/2] Fixing multiple inclusion of hip causing compile error (#97) SWDEV-236878 Co-authored-by: Ashutosh Mishra --- rocsolver/clients/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rocsolver/clients/CMakeLists.txt b/rocsolver/clients/CMakeLists.txt index db3b412de..cc604139d 100755 --- a/rocsolver/clients/CMakeLists.txt +++ b/rocsolver/clients/CMakeLists.txt @@ -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 From 2a5190406579545630f2461b979f5ae91ddb9fcc Mon Sep 17 00:00:00 2001 From: Eiden Yoshida <47196116+eidenyoshida@users.noreply.github.com> Date: Tue, 19 May 2020 11:49:54 -0600 Subject: [PATCH 2/2] Centos8 additions to install script and CI (#94) --- .jenkins/precheckin.groovy | 4 +-- docker/dockerfile-build-centos8 | 52 +++++++++++++++++++++++++++++++++ install.sh | 29 +++++++++++++----- 3 files changed, 76 insertions(+), 9 deletions(-) create mode 100644 docker/dockerfile-build-centos8 diff --git a/.jenkins/precheckin.groovy b/.jenkins/precheckin.groovy index e40dbabd4..ca97a66a8 100644 --- a/.jenkins/precheckin.groovy +++ b/.jenkins/precheckin.groovy @@ -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 { diff --git a/docker/dockerfile-build-centos8 b/docker/dockerfile-build-centos8 new file mode 100644 index 000000000..7b380e96e --- /dev/null +++ b/docker/dockerfile-build-centos8 @@ -0,0 +1,52 @@ +# Parameters related to building rocsolver +ARG base_image + +FROM ${base_image} +LABEL maintainer="rocsolver.maintainer@amd.com" + +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} diff --git a/install.sh b/install.sh index 1cd0a542c..5786cde58 100755 --- a/install.sh +++ b/install.sh @@ -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" ) @@ -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" ) @@ -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 ;; @@ -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