rdma-example installation tutorial

I am going to start learning about RDMA technology recently. I want to run it with the example code on Github. I chose rdma-example. Link to GitHub - animeshtrivedi/rdma-example: RDMA exmaple

First clone the code locally

mkdir workspace
cd workspace
git clone https://github.com/animeshtrivedi/rdma-example.git
cd rdma-example

Perform cmake according to the prompts of the code README. Before cmake, you need to check the cmake version of the virtual machine. Use the following command to view the cmake version information.

cmake --version

Check the CMakeLists.txt file of rdma-example. The minimum requirement for cmake version is 2.6. If it is not met, you need to update the cmake version.

sudo apt update
sudo apt install cmake

 After confirming that the cmake version meets the requirements, execute the following command

cmake .

Then I encountered the following problem when executing

 According to the error message, it is judged that the library file is missing. Next, install the library file.

apt install librdmacm1 librdmacm-dev
apt install libibverbs1 libibverbs-dev

After the installation was completed, an error was still reported, so I looked for a manual installation method and found the librdmacm and libibverbs libraries on github, but it still didn't work. The final solution was to find some header files included in the rdma-core code on github, and then make some magic changes to the source files under /usr/include/infiniband/, and add the header files that appear in the error message to rdma -core, and then copy it to the /usr/include/infiniband/ path and the source code path of rdma-example. You can try to modify it through the following code. It is recommended to back up before modifying.

find -name ib_user_ioctl_verbs.h
cp /rdma-core/kernel-headers/rdma/ib_user_ioctl_verbs.h /usr/include/infiniband/

Finally, the environment was successfully debugged on three virtual machines.

In addition, I uploaded the rdma-example source code program after adding some header files to the domestic warehouse . Students in need can use it by themselves. I hope it can help you.

Guess you like

Origin blog.csdn.net/eternal963/article/details/129362545