分类 technique 下的文章

BLAS : basic linear algebra subprograms (low level)
LAPACK : linear algebra package (high level,在 BLAS 之上)
ScaLAPACK : scalable LAPACK,支持 MPI 的 LAPACK

Intel MKL : 包含 BLAS, LAPACK, ScaLAPACK

ELPA : eigenvalue solvers for petaflop applications

cuBLAS

使用 cublasCreate 创建 cuBLAS library context 的 handle,
一个 context 关联一个 device
cuBLAS library context 绑定 CUDA context

用来记一些 tmux 之类工具的奇妙用法

tmux

ctrl+b s : 切换panel
Ctrl+b :set synchronize-panes : 多窗口同步输入

开一个坑整理linux的奇妙命令

kill -s 9 $pid  # 强行停止
ps -aux #显示所有进程
watch -n 0.1 [exec] #间隔0.1s运行exec显示输出
chmod -R #对所有子文件夹chmod
nohup [command] & #将指令放在后台运行
~/.bash_history #bash历史,向下为更新
file [file] #查看文件信息
ln -s $SOURCE_DIR $TAR_DIR #创建软链接
pstree [username] #查看进程树
sudo netstat -tulpn #查看开放端口(t:tcp,u:udp,l:listening socket,p:pid and name, n:numerical address)
ls -d .v* #所有符合表达式的文件
ls -d .v*/ #所有符合表达式的目录
ls -Sl #按文件大小排序
[exec] >> [file] #追加输出
[exec] > /dev/null #抛弃输出
find [path] -name "*.c" #按文件名查找目录
find [path] -name "*.c" -exec grep  "str" {} + #查找目录下指定文件名的文件中包含的字符串str
env #查看目前环境变量
sudo systemctl start [service] #启动服务
readlink [file] #读取符号链接file的指向,-f 递归查找直到实际文件
dmesg #查看ring message 信息,包含开机信息及异常信息
nl [file] #将文件每行前添加行号,并输出
apropos [func] #查找man page
lsof [file] #查看打开文件的进程
lsof -t [file] | xargs kill -9 #kill所有打开文件file的进程
wall "[message]" #向所有用户终端发送信息 message
wget -e "https_proxy=127.0.0.1:10987" [url] #wget使用代理
cloc #统计目录代码行数

- 阅读剩余部分 -

legacy 体系:

SysVinit :
初始化脚本位于 /etc/init.d/,初始化脚本需要支持 start, stop, status 等命令
使用 service 命令运行初始化脚本
SysVinit 只启动一次,在之后不跟踪单个服务

新体系:

systemd 用于代替 SysVinit ,在初始化结束时, systemd 仍然作为守护进程运行。
使用 systemctlsystemd 交互,运行服务。

sudo systemctl enable [service] 开机启动服务
sudo systemctl disable [service] 不开机启动服务
sudo systemctl start [service]
sudo systemctl stop [service]
sudo systemctl restart [service]

systemd

systemd 是 boot 阶段第一个运行的 userspace 程序,在 kernel 初始化硬件后马上获得控制
systemd 通过 unit configuration file 管理资源
unit 包括 .service, .mount, .device 等文件
unit 保存在 /etc/systemd/system, /lib/systemd/system 等目录
/etc/systemd/system 优先级最高
通过 systemctl 与 systemd 交互
systemd 与 systemctl 之间通过 D-Bus 交互

journald 收集和管理 systemd 的 log
通过 journalctl 查询 log