Broadband 宽带
在天文学中,术语”宽带“是指进行给定观测的频谱的宽度,用于区分连续体和光谱线观测(参见后者的窄带条目)。观测的带宽越宽,灵敏度越高,因此对于任何波长的连续观测或光度测量,都可以使用宽带(宽带)滤波器。
FLOPS is floating point operations per second. This is used as a measurement because historically floating point operations has been very expensive operations compared to other operations. 每秒浮点运算次数,亦称每秒峰值速度,(英语:Floating-point operations per second;缩写:FLOPS),即每秒所运行的浮点运算次数。浮点(floating-point)指的是带有小数的数值,浮点运算即是小数的四则运算,常用来测量电脑运算速度或被用来估算电脑性能,尤其是在使用到大量浮点运算的科学计算领域中。因为FLOPS后缀的那个S代表秒,而不是复数,所以不能够省略。在多数情况下,测算FLOPS比测算每秒指令数(IPS)要准确。
浮点运算实际上包括了所有涉及浮点数的运算,在某类应用软件中常常出现,比较整数运算更用时间。现今大部分的处理器中都有浮点运算器。因此每秒浮点运算次数所量测的实际上就是浮点运算器的运行速度。而最常用来测量每秒浮点运算次数的基准程序(benchmark)之一,是Linpack。
FLOPS在高性能计算机集群(超算)上可以使用这一公式得出:
${\displaystyle {\text{FLOPS}}={\text{racks}}\times {\frac {\text{nodes}}{\text{rack}}}\times {\frac {\text{sockets}}{\text{node}}}\times {\frac {\text{cores}}{\text{socket}}}\times {\frac {\text{cycles}}{\text{second}}}\times {\frac {\text{FLOPs}}{\text{cycle}}}}$
简化到计算机只拥有一块CPU的情况时,可以使用以下公式:
${\displaystyle {\text{FLOPS}}={\text{cores}}\times {\frac {\text{cycles}}{\text{second}}}\times {\frac {\text{FLOPs}}{\text{cycle}}}}$
Environment Modules 给用户提供了一个通过modulefiles动态的修改环境变量的方法。
通常,用户在登录时通过为会话期间要引用的每个应用程序设置环境信息来初始化其环境。Environment Modules包是一个简化shell初始化的工具,它允许用户在使用modulefile进行会话期间轻松地修改环境。
每个modulefile包含为应用程序配置shell所需的信息。初始化Modules包后,可以使用modulefiles的module命令在每个模块的基础上修改环境。通常,modulefiles 可以使用module命令更改或设置shell环境变量,如PATH、MANPATH等。modulefile可以由系统上的许多用户共享,用户可以有自己的集合来补充或替换共享的modulefile。
模块可以使用 loaded 和 unloaded 动态操作。支持所有主流的shell,比如 bash, ksh, zsh, sh, csh, tcsh, fish, 还有一些其他的脚本语言,如 perl, ruby, tcl, python, cmake 和 R.
模块在管理不同版本的应用程序时非常有用。模块也可以绑定到元模块中,元模块将加载一整套不同的应用程序。
Here is an example of loading a module on a Linux machine under bash.
1 | $ module load gcc/8.3 |
Now we’ll switch to a different version of the module
1 | $ module switch gcc gcc/9.2 |
And now we’ll unload the module altogether
1 | $ module unload gcc |
Now we’ll log into a different machine, using a different shell (tcsh).
1 | % module load gcc/9.2 |
Note that the command line is exactly the same, but the path has automatically configured to the correct architecture.
Download latest version of Modules. Learn how to install it on Unix or how to install it on Windows. You may alternatively automatically retrieve and install Modules with your preferred package manager as Environment Modules is widely available. If you are upgrading from an older version of Modules, read the MIGRATING guide to learn all new features recently introduced.
Reference manual page for the module(1) and ml(1) commands and for modulefile(4) script provide details on all supported options. If you have questions, comments or development suggestions for the Modules community, please read the CONTRIBUTING guide.
1 | #这个是关于引用博主和我自己的使用情况的一些总结: |
1 | #%Module1.0 |
屏幕错误提示
错误显示类似于:
1 | mount: mounting /dev/disk/by-uuid/***************************** on /root |
sudo fdisk -l
回车,目的是查看设备名称。输出类似于:1 | Disk /dev/sda: 250.1 GB, 250059350016 bytes |
sudo fsck /dev/sda1
回车;使用 git reset HEAD <file>...
来取消暂存。 所以,我们可以这样来取消暂存 CONTRIBUTING.md
文件:
1 | $ git reset HEAD CONTRIBUTING.md |
这个命令有点儿奇怪,但是起作用了。 CONTRIBUTING.md
文件已经是修改未暂存的状态了。
Note | git reset 确实是个危险的命令,如果加上了 --hard 选项则更是如此。 然而在上述场景中,工作目录中的文件尚未修改,因此相对安全一些。 |
---|---|
.. _python-venv-python3:
您还可以选择在虚拟环境(或应用程序虚拟环境)中安装各种软件,以保持环境清洁。
1 | $ python3 -m venv packenv |
创建后,通过从命令行运行来激活虚拟环境
1 | # Windows |
最后,安装所需的软件包,比如numpy
1 | $ pip3 install numpy |
同时也可以增加一个提示符,比如NAME
1 | $ python3 -m venv --prompt NAME virtual_name |
在Dockerfile中安装deb软件包时,某些软件将tzdata作为依赖项安装。
tzdata会以交互方式提醒用户选择使用位置。
Configuring tzdata
------------------
Please select the geographic area in which you live. Subsequent configuration
questions will narrow this down by presenting a list of cities, representing
the time zones in which they are located.
1. Africa 4. Australia 7. Atlantic 10. Pacific 13. Etc
2. America 5. Arctic 8. Europe 11. SystemV
3. Antarctica 6. Asia 9. Indian 12. US
Geographic area:
可能一直会卡在这个界面(我就遇到了)。
为了解决这个问题,我们需要将tzdata设置为非交互方式。
首选的方法是在Dockerfile的第一条RUN之前加入以下配置:
ENV DEBIAN_FRONTEND=noninteractive
第二个方法是,在DEBIAN_FRONTEND=noninteractive条件下使用命令apt install或apt-get install配置安装tzdata:
RUN DEBIAN_FRONTEND=noninteractive apt install -y tzdata
这将自动选择默认配置安装tzdata。
casacore 是一系列射电天文数据处理的C++库
1 | $ apt-get update |
1 | $ yum update |
1 | $ brew tap ska-sa/tap |
1 | $ docker pull quay.io/casacore/casacore:master |
python-casacore是casacore的python绑定。
在安装这个之前,需要先行安装casacore。
1 | $ pip install python-casacore |
1 | $ sudo apt-get install python-casacore |
此处为使用Ubuntu LTS系统的
1 | $ sudo apt-get install software-properties-common |
On Macs, you may need to create an /etc/sysctl.conf file
Put in it the following lines
重启后可以使用 sysctl kern.sysv来查看状态。
1 | $ sinfo |
比如这里我有一个test.py
的文件,内容如下:
1 | #!/usr/bin/env python |
执行如下命令:
1 | srun -p cpu -w x86-cpu01 python ./test.py |
slurm最基本的命令是srun,比如上面一行的参数如下:
squeue -u +用户
1 | ~> squeue -u name |