Linux C compiler: error: off_t undefined
大概是ld没配置好的原因
在ld的配置文件环境里加入以下几行:
/usr/local/lib64
/usr/local/lib
/usr/lib64
/usr/lib
推荐在/etc/ld.so.conf.d/里新建一个conf文件,然后写入以上几行
(在下用的是Intel C Compiler, 故取icc.conf)
然后ldconfig -v重新配置动态链接库即可。
大概是ld没配置好的原因
在ld的配置文件环境里加入以下几行:
/usr/local/lib64
/usr/local/lib
/usr/lib64
/usr/lib
推荐在/etc/ld.so.conf.d/里新建一个conf文件,然后写入以上几行
(在下用的是Intel C Compiler, 故取icc.conf)
然后ldconfig -v重新配置动态链接库即可。
https://blog.csdn.net/levy_cui/article/details/51143180
此时需要清理以下rpm的临时文件
# rm -rf /var/lib/rpm/__db.* 安装过程
tar xf mft-4.11.0-103-x86_64-rpm.tgz
cd mft-4.11.0-103-x86_64-rpm
sudo ./install.sh
接下来会自动检测环境,提示用户补充安装缺少的软件包。
CentOS 7 Core缺少的如下:
sudo yum install -y gcc rpm-build kernel-devel
系统环境是CentOS 7.6,但是ib卡的固件版本只有2.33.5000,处于各种原因,既不打算换系统,也不打算烧固件,于是打算强上老驱动试试。 然后。。炸了,编译错误,还是C语言层面的,不管了,直接上最新驱动
不更新固件 -> --without-fw-update
mxm需要gui,丢掉 -> --without-mxm
缺失的软件包:
sudo yum install -y tcl tcsh tk lsof libxml2-python pciutils perl
然后就开始安装,应该没有问题了 配ip,方法就跟配Ethernet一样的
sudo service openibd restart
sudo ip addr add <ip-addr>/<netmask> dev <devname>
用netperf测试网络质量:
直接用github上的源码编译安装(推荐使用release),需要在被连接测试的服务器上运行netserver命令,该命令自带于已安装好的netperf中。
然后在主动连接的主机上运行以下命令:
netperf -H 10.0.0.30 -t omni -- -d rr -O "THROUGHPUT, THROUGHPUT_UNITS, MIN_LATENCY, MAX_LATENCY, MEAN_LATENCY"
-H选项用于指定主机。
给家里的旧电脑换了块主板,尝试不重装系统(Windows 7)作业,失败,“正在启动Windows”时出现0x0000007B蓝屏。
期间得出以下结论:
SYSTEM部分可以强制系统进入sysprep阶段,但是会在启动服务部分无限重启;SYSTEM文件至原系统,可以使其在开机阶段不蓝屏,但是在出现鼠标以后无限重启。当然,可能是因为这两项尝试是我已经在多次蓝屏之后再做尝试时,之前的遗留症状。
然后因为各种原因,决定重装系统,还是Windows 7。在安装更新时出现了0x8007000E错误。 被坑爹的某度带着绕了好大的弯,最后终于在巨硬官方论坛里找到了解决方案(还好,起码这次绕回来了):安装KB3102810补丁即可。
下载链接如下: https://support.microsoft.com/en-us/help/3102810/installing-and-searching-for-updates-is-slow-and-high-cpu-usage-occurs 往下翻,在Method 2的表格里面,选择Operating System对应的Update,进入下载界面。 32位选x86,64位选x64,Embedded和Server基本上见不到就不用选了。 下载后双击安装,提示重启电脑生效。重启后,Windows Update正常工作。
http://detexify.kirelabs.org/classify.html 手写字符转latex
加粗段落中的非加粗文字
\textnormal{yout-text} % 不仅取消加粗,还会还原成默认字体
\textmd{your-text} % 仅取消加粗,适用于\texttt混用于普通文字的情况
IEEEtran模板,conference样式的页码显示
https://tex.stackexchange.com/questions/542925/show-page-numbers-in-ieeetran-document-class
原因是在IEEEtran.cls中,如果选中了conference样式的话,默认是隐藏页码的。解决方法是在\maketitle之后立即加上:
\setcounter{page}{1}
\pagestyle{plain}
\thispagestyle{plain}
代码段
\begin{lstlisting}[language=bash,frame=none,%numbers=left,numberstyle=\small,
rulesepcolor=\color{red!20!green!20!blue!20},
keywordstyle=\color{blue!70!black},
commentstyle=\color{blue!90!},
basicstyle=\footnotesize\ttfamily,
breaklines=true,showstringspaces=false]
...
\end{lstlisting}
在enumerate环境中进行两端对齐:
\usepackage{ragged2e}
\usepackage{enumerate}
...
\begin{enumerate}
\justifying
\item ...
\end{enumerate}
caption居中
全局的设置方式是在usepackage中添加选项:
\usepackage[justification=centering]{caption}
BibTeX引用网页
@misc{visualprofiler,
author = {NVIDIA Corporation},
title = {NVIDIA Visual Profiler | NVIDIA Developer},
note = {\url{https://developer.nvidia.com/nvidia-visual-profiler}},
}
手动跨页的图表,使用相同的表头:使用captcont包
\usepackage{captcont}
...
\caption{title} %这是定义的图表标题
...
\captcont*{title} %使用与上面相同的标题,在手动截断图表进行换页的时候,在新图表块中用这个代替caption即可
article中,方程按照章节号编号
\numberwithin{equation}{section}
listing
自动换行:加参数breaklines=true
调整tab宽度:加参数tabsize=
去除string中的空格标记:加参数showstringspaces=false
TiKZ画树状图 http://www.texample.net/tikz/examples/filesystem-tree/
% Author: Frantisek Burian \documentclass{minimal} \usepackage{tikz} \usetikzlibrary{trees} \begin{document} \tikzstyle{every node}=[draw=black,thick,anchor=west] \tikzstyle{selected}=[draw=red,fill=red!30] \tikzstyle{optional}=[dashed,fill=gray!50] \begin{tikzpicture}[% grow via three points={one child at (0.5,-0.7) and two children at (0.5,-0.7) and (0.5,-1.4)}, edge from parent path={(\tikzparentnode.south) |- (\tikzchildnode.west)}] \node {texmf} child { node {doc}} child { node {fonts}} child { node {source}} child { node [selected] {tex} child { node {generic}} child { node [optional] {latex}} child { node {plain}} } child [missing] {} child [missing] {} child [missing] {} child { node {texdoc}}; \end{tikzpicture} \end{document}
被文字环绕的图片
\usepackage{wrapfigre}
...
<text>
\begin{wrapfig}{l}{0.1}
\includegraphics{...}
\end{wrapfigure}
wrapfigure后要带两个参数,分别是布局和宽度
按照上述代码,text会显示在图像的左侧。
控制水平和垂直间距的命令
\vspace{10pt}
\hspace*{10pt} %我也不知道为什么要加一个*,反正在figure里面加了才有用
表格设置每行最小长度
\setlength{\tabcolsep}{0.08\linewidth}
排版器生成caption的原理:
\tablename + \thetable + 根据CaptionFormat/CaptionLabelFormat/CaptionTextFormat生成的标题文字
用\Declare***定义对应的样式。(详情参见下面caption宏包使用一栏的pdf)
强行在ieeetrans模板中使用数字章节编号
\usepackage{caption}
% 改变引用的章节编号格式
\renewcommand\thesection{\arabic{section}}
\renewcommand\thesubsection{\thesection.\arabic{subsection}}
\renewcommand\thesubsubsection{\thesubsection.\arabic{subsubsection}}
% 改变标题的章节编号格式
\renewcommand\thesectiondis{\arabic{section}}
\renewcommand\thesubsectiondis{\thesectiondis.\arabic{subsection}}
\renewcommand\thesubsubsectiondis{\thesubsectiondis.\arabic{subsubsection}}
强行只在某个标题后启用第一段缩进
\begin{minipage}[h]{\linewidth} % 确定位置用的htbp和minipage宽度的n倍linewidth,数字n写在\linewidth前即可
\setlength{\parindent}{15pt}
...
\end{minipage}
规范地使用appendix
\usepackage[toc, page]{appendix}
...
\begin{appendices}
...
\end{appendices}
caption宏包使用说明 http://ftp.jaist.ac.jp/pub/CTAN/macros/latex/contrib/caption/caption-eng.pdf
设置图表的标头缩写(Figure 1. -> Fig. 1., Table 1. -> Tab. 1.)
% LaTeX生成标题时通过\figurename和\tablename获得标头,因此把这两个命令的返回值重写一下就好
\renewcommand \figurename{Fig.}
\renewcommand \tablename{Tab.}
IEEEtrans的模板中,只有conference才会提供caption的居中。(QAQ
加粗的标题
\usepackage{enumerate}
...
\begin{enumerate}[\bfseries 1.] % A, a, I, i, 1分别产生以该样式编号起头的标题列。
\item % 切记这些标记不能再被其他的大括号包含,否则将被视作普通的字符
\item % 例如这里不能用\textbf{}只能用\bfseries
...
\end{enumerate}
太阳和他的母亲
\usepackage{amssymb}
$\circledR$, $\texttrademark$
对于有上下文的块,其label一定要放在caption之后,否则引用时会出现意料之外的结果。
表格中的整行横线用\hline来绘制。
\cline{x-y}用于绘制第x列至第y列的横线。起始列号为1。
caption内换行
\protect\\
链接到图表首部而不是它正下方的标题
\usepackage{hyperref}
\usepackage[all]{hypcap}
论文中生成的参考文献顺序,与对应bib文件中参考文献顺序无关,只与引用顺序有关,也就是说bib文件内的参考文献可以随意乱放,顺序可以打乱。
空心字母
\usepackage{amsfonts, amssymb}
$\mathbb{N}$