Specify the search path for pkg_check_modules
: Solution
1 | set(ENV{PKG_CONFIG_PATH} "${CMAKE_SOURCE_DIR}/libs/opencv-install/lib/pkgconfig") |
Specify the search path for pkg_check_modules
: Solution
1 | set(ENV{PKG_CONFIG_PATH} "${CMAKE_SOURCE_DIR}/libs/opencv-install/lib/pkgconfig") |
参考博客
https://blog.ligos.net/2016-07-25/Writing-Content-On-Hexo.html
https://medium.com/employbl/create-a-custom-blog-theme-with-hexo-js-b24c82eb9271#.viurzqeac
https://hexo.io/docs/themes
https://hexo.io/docs/templates
https://hexo.io/docs/helpers
Commands
1 | # The following command generate a 'categories/index.md' file |
Refers to Hexo NeXT Theme categories and tags page
Documentation: RDMA Aware Networks Programming User Manual v1.6
Sun Network QDR InfiniBand Gateway Switch Topic Set
用户态的Verbs API手册跟代码在一个仓库维护,手册地址:https://github.com/linux-rdma/rdma-core/tree/master/libibverbs/man
有很多在线的man page网站可以查阅这些接口的说明,比如官方的连接:https://man7.org/linux/man-pages/man3/ibv_post_send.3.html
也有一些其他非官方网页,支持在线搜索:https://linux.die.net/man/3/ibv
查阅系统man page
如果你使用的商用OS安装了rdma-core或者libibverbs库,那么可以直接用man命令查询接口:
1 | man ibv_post_send |
查询Mellanox的编程手册
《RDMA Aware Networks Programming User Manual Rev 1.7》,最新版是2015年更新的。该手册写的比较详尽,并且附有示例程序,但是可能与最新的接口有一些差异。Mellanox VPI®(Virtual Procotol Interconnect)架构为同时支持InfiniBand和以太网语义的网络适配器和交换机提供高性能、低延迟和可靠的方法。
Book: Linux Kernel Networking - Implementation and Theory
Dotan’s blog: Dotan Barak, an InfiniBand Expert. Dotan is a Senior Software Manager at Mellanox Technologies working on RDMA Technologies.
Blog: Tips and tricks to optimize your RDMA code
RDMA - Remote Direct Memory Access 远程直接内存存取。
InfiniBand是一种高性能计算机网络通信标准,它具有极高的吞吐量和极低的延迟。如果您需要使用InfiniBand进行编程,您需要使用支持InfiniBand的编程语言(如C++)来编写代码。
机构和组织:
OFA: Open Fabrics Alliance.
IBTA: InfiniBand Trade Association.
CQ
- Complete Queue 完成队列WQ
- Work Queue 工作队列WR
- Work Request 工作请求QP
- Queue Pairs 队列对(Send-Receive)SQ
- Send Queue 发送队列RQ
- Receive Queue 接收队列PD
- Protection Domain 保护域,将QP和MR结合在一起MR
- Memory Region 内存区域。一块经注册过的且本地网卡可以读写的内存区域。包含R_Key和L_Key。SGE
- Scatter/Gather Elements 分散/聚集元素。R_Key
- Remote KeyL_Key
- Local KeyCA
- (Host) Channel Adapter, an inifiniband network interface card.NIC
- Network Interface Card 网卡。LID
- Local Identifier.CM
- Connection Manager.其他常见缩写:
RC
- reliable connected.SCSI
- Small Computer System Interface 小型计算机系统接口。SRP
- SCSI RDMA Protocol. / Secure Remote Password.博客:https://blog.51cto.com/liangchaoxi/4044818
sudo apt-get install infiniband-diags
sudo apt install ibverbs-utils
以下是一些支持InfiniBand的C++库:
Infinity:这是一个轻量级的C++ RDMA库,用于InfiniBand网络。它提供了对两侧(发送/接收)和单侧(读/写/原子)操作的支持,并且是一个简单而强大的面向对象的ibVerbs抽象。该库使用户能够构建使用RDMA的复杂应用程序,而不会影响性能1。
OFED:这是一个开放式Fabrics Enterprise Distribution,它提供了对InfiniBand和RoCE(RDMA over Converged Ethernet)技术的支持。OFED提供了一组用户空间库和驱动程序,可用于构建支持RDMA的应用程序2。
以下是使用Infinity库编写支持InfiniBand的C++代码示例:
1 | // 创建新上下文 |
以下是使用OFED库编写支持InfiniBand的C++代码示例:
1 | // 创建新上下文 |
文档:https://docs.nvidia.com/networking/pages/viewpage.action?pageId=43719572
ibstat
ibhosts
- 查看所有的IB hosts。
ibnetdiscover
- discover InfiniBand topology.
ibv_devices
- list RDMA devices.
ibv_devinof
- Print information about RDMA devices available for use from userspace.
ibv_rc_pingpong
- Run a simple ping-pong test over InfiniBand via the reliable connected (RC) transport.
targetcli
- administration shell for storage targets
targetcli
is a shell for viewing, editing, and saving the configuration of the kernel’s target subsystem,
also known as LIO. It enables the administrator to assign local storage resources backed by either files,
volumes, local SCSI devices, or ramdisk, and export them to remote systems via network fabrics, such as iSCSI or FCoE.
srp_daemon
- Discovers and connects to InfiniBand SCSI RDMA Protocol (SRP) targets in an IB fabric.
ibsrpdm
- List InfiniBand SCSI RDMA Protocol (SRP) targets on an IB fabric.
devid: device ID library. Refer to here.
ibverbs: 使得用户空间进程能够使用RDMA verbs(即进行RDMA操作)。Refer to here.
dl: Dynamic Loader.
https://cpp.hotexamples.com/zh/examples/-/-/lprintf/cpp-lprintf-function-examples.html
字符串处理函数
bcopy
1
char str[] = "\x1E"; // "0x1E" 是一个非打印字符
See here.
@:
See here.
This works fine for me:
1 | # If the first argument is "run"... |
参考:
1 | all: |
其中,”-/bin/rm
“的短划线”-
“是一个特殊前缀,表示忽略命令执行过程的错误。
1 | SRCS = $(wildcard *.c) |
最后两行其实不需要,默认规则已经足够了。
其中,$(SRCS:.c=.o)
表示将变量SRCS
中的每个单词(以空格分割)中的.c
替换为.o
。以上代码则是将所有.c
都去掉。
引用变量时,Shell使用大括号,Makefile则大括号和小括号都行。但是在命令中使用Shell变量就需要使用大括号。
Refer to the link.
Add these three lines to ~/.bashrc
1 | $ vi ~/.bashrc |
resident set size (RSS)
/proc/self/statm
TIME+1 | TIME |
---|---|
5432:01 means “5432 minutes and 1 second” |
90,32 means “90 hours and 32 minutes” |
25:15.20 means “25 minutes, 15 seconds and 20% of 1 second” |
25:15 means “25 minutes and 15 seconds” |
TIME
: the cumulated CPU time in [DD-]hh:mm:ss format (time=TIME)
Field | value & means |
---|---|
TIME |
1-18:09:38 means “1 day, 18 hours, 9 minutes and 38 seconds” |
See the article: Prefixes for binary multiples
Table:
Prefixes for binary multiples |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
|