Files
rocm-systems/README.md
T

153 řádky
7.8 KiB
Markdown
Surový Normální zobrazení Historie

2020-08-31 21:13:15 -04:00
# ROCm<sup>TM</sup> Data Center Tool (RDC)
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
The ROCm™ Data Center Tool simplifies the administration and addresses key infrastructure challenges in AMD GPUs in cluster and datacenter environments. The main features are:
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
- GPU telemetry
- GPU statistics for jobs
- Integration with third-party tools
- Open source
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
For complete list of features and how to start using RDC from pre-built packages, please refer to [**user guide**](docs/AMD_ROCm_Data_Center_Tool_User_Guide.pdf)
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
# Supported platforms
Ubuntu 18.04.5 (Kernel 5.3)
CentOS v7.7 (Using devtoolset-7 runtime support)
RHEL v7.7 (Using devtoolset-7 runtime support)
SLES 15 SP1
CentOS and RHEL 8.1(Kernel 4.18.0-147)
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
# Building RDC from source
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
## Dependencies
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
CMake 3.15 ## 3.15 or greater is required for gRPC
g++ (5.4.0)
Doxygen (1.8.11) ## required to build the latest documentation
Latex (pdfTeX 3.14159265-2.6-1.40.16) ## required to build the latest documentation
gRPC and protoc ## required for communication
2021-02-12 15:36:13 -05:00
libcap-dev ## required to manage the privileges.
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
AMD ROCm platform (https://github.com/RadeonOpenCompute/ROCm)
* It is recommended to install the complete AMD ROCm platform.
For installation instruction see https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html
* At the minimum, these two components are required
(i) AMD ROCm SMI Library (https://github.com/RadeonOpenCompute/rocm_smi_lib)
(ii) AMD ROCk Kernel driver (https://github.com/RadeonOpenCompute/ROCK-Kernel-Driver)
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
## Building gRPC and protoc
2020-09-11 08:47:33 -05:00
**NOTE:** gRPC and protoc compiler must be built when building RDC from source as pre-built packages are not available. When installing RDC from a package, gRPC and protoc will be installed from the package.
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
**IMPORTANT:** Building gRPC and protocol buffers requires CMake 3.15 or greater. With an older version build will quietly succeed with a *message*. However, all components of gRPC will not be installed and RDC will ***fail*** to run
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
The following tools are required for gRPC build & installation
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
automake make g++ unzip build-essential autoconf libtool pkg-config libgflags-dev libgtest-dev clang-5.0 libc++-dev curl
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
Download and build gRPC
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
$ git clone -b v1.28.1 https://github.com/grpc/grpc
$ cd grpc
$ git submodule update --init
$ mkdir -p cmake/build
$ cd cmake/build
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
## By default (without using CMAKE_INSTALL_PREFIX option), the following will install to /usr/local lib, include and bin directories
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
$ cmake -DgRPC_INSTALL=ON -DBUILD_SHARED_LIBS=ON <-DCMAKE_INSTALL_PREFIX=<install dir>> ../..
$ make
$ sudo make install
$ echo "<install dir>/lib" | sudo tee /etc/ld.so.conf.d/grpc.conf
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
## Building RDC
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
Clone the RDC source code from GitHub and use CMake to build and install
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
$ git clone https://github.com/RadeonOpenCompute/rdc
$ cd rdc
$ mkdir -p build; cd build
$ cmake -DROCM_DIR=/opt/rocm -DGRPC_ROOT="$GRPC_PROTOC_ROOT" <-DCMAKE_INSTALL_PREFIX=<install dir>> ..
$ make
$ make install ## default installation location is /opt/rocm
2020-08-16 11:38:09 -05:00
## Building RDC library only without gRPC (optional)
If only the RDC libraries are needed (i.e. only "embedded mode" is required), the user can choose to not build rdci and rdcd. This will eliminate the need for gRPC and protoc. To build in this way, -DBUILD_STANDALONE=off should be passed on the the cmake command line:
$ cmake -DROCM_DIR=/opt/rocm -DBUILD_STANDALONE=off <-DCMAKE_INSTALL_PREFIX=<install dir>> ..
## Building RDC library without ROCM Run time (optional)
The user can choose to not build RDC diagnostic ROCM Run time. This will eliminate the need for ROCM Run time. To build in this way, -DBUILD_ROCRTEST=off should be passed on the the cmake command line:
$ cmake -DROCM_DIR=/opt/rocm -DBUILD_ROCRTEST=off <-DCMAKE_INSTALL_PREFIX=<install dir>> ..
2020-09-14 17:29:53 -05:00
## Update System Library Path
The following commands need to be executed as root (sudo). It may be easiest to put them into a script and then run that script as root:
$ RDC_LIB_DIR=<RDC install dir>/lib
$ GRPC_LIB_DIR=<gRPC install dir>/lib
$ echo "$GRPC_LIB_DIR" > /etc/ld.so.conf.d/x86_64-librdc_client.conf
$ echo "$GRPC_LIB_DIR"64 >> /etc/ld.so.conf.d/x86_64-librdc_client.conf
$ echo "$RDC_LIB_DIR" >> /etc/ld.so.conf.d/x86_64-librdc_client.conf
$ echo "$RDC_LIB_DIR"64 >> /etc/ld.so.conf.d/x86_64-librdc_client.conf
$ ldconfig
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
# Running RDC
RDC supports encrypted communications between clients and servers. The
communication can be configured to be *authenticated* or *not authenticated*. The [**user guide**](docs/AMD_ROCm_Data_Center_Tool_User_Guide.pdf) has information on how to generate and install SSL keys and certificates for authentication. By default, authentication is enabled.
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
## Starting ROCm™ Data Center Daemon (RDCD)
For an RDC client application to monitor and/or control a remote system, the RDC server daemon, *rdcd*, must be running on the remote system. *rdcd* can be configured to run with (a) full-capabilities which includes ability to set or change GPU configuration or (b) monitor-only capabilities which limits to monitoring GPU metrics.
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
### Start RDCD from command-line
When *rdcd* is started from a command-line the *capabilities* are determined by privilege of the *user* starting *rdcd*
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
$ cd rdc_install_prefix ## If specified in Building RDC section
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
## To run with authentication. Ensure SSL keys are setup properly
2020-11-13 16:13:25 -08:00
## version will be the version number(ex:3.10.0) of ROCm where RDC was pacakged with
$ /opt/rocm-<version>/rdc/bin/rdcd ## rdcd is started with monitor-only capabilities
$ sudo /opt/rocm-<version>/rdc/bin/rdcd ## rdcd is started will full-capabilities
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
## To run without authentication. SSL key & certificates are not required.
2020-11-13 16:13:25 -08:00
## version will be the version number(ex:3.10.0) of ROCm where RDC was pacakged with
$ /opt/rocm-<version>/rdc/bin/rdcd -u ## rdcd is started with monitor-only capabilities
$ sudo /opt/rocm-<version>/rdc/bin/rdcd -u ## rdcd is started will full-capabilities
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
### Start RDCD using systemd
*rdcd* can be started by using the systemctl command. systemctl will read /lib/systemd/system/rdc.service, which is installed with rdc. This file has 2 lines that control what *capabilities* with which *rdcd* will run. If left uncommented, rdcd will run with full-capabilities.
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
## file: /lib/systemd/system/rdc.service
## Comment the following two lines to run with monitor-only capabilities
2020-08-16 11:38:09 -05:00
CapabilityBoundingSet=CAP_DAC_OVERRIDE
AmbientCapabilities=CAP_DAC_OVERRIDE
2020-08-31 21:13:15 -04:00
systemctl start rdc ## start rdc as systemd service
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
## Invoke RDC using ROCm™ Data Center Interface (RDCI)
RDCI provides command-line interface to all RDC features. This CLI can be run locally or remotely. Refer to [**user guide**](docs/AMD_ROCm_Data_Center_Tool_User_Guide) for the current list of features.
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
## sample rdci commands to test RDC functionality
## discover devices in a local or remote compute node
## NOTE: option -u (for unauthenticated) is required is rdcd was started in this mode
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
$ cd rdc_install_prefix ## If specified in Building RDC section
./opt/rocm/rdc/bin/rdci discovery -l <-u> ## list available GPUs in localhost
./opt/rocm/rdc/bin/rdci discovery <host> -l <-u> ## list available GPUs in host machine
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
## Troubleshooting rdcd
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
Log messages that can provide useful debug information.
2020-08-16 11:38:09 -05:00
2020-08-31 21:13:15 -04:00
## If rdcd was started as a systemd service, then use journalctl to view rdcd logs
2020-08-16 11:38:09 -05:00
journalctl -u rdc
2020-08-31 21:13:15 -04:00
## To run rdcd with debug log from command-line use
2020-11-13 16:13:25 -08:00
## version will be the version number(ex:3.10.0) of ROCm where RDC was pacakged with
RDC_LOG=DEBUG /opt/rocm-<version>/rdc/bin/rdcd