当导入数据到 CASA (Common Astronomy Software Applications) 时,
若台站不在 CASA 数据库中, 会得到如下报错:
RuntimeError: Exception: Telescope 21CMA is not recognized by CASA.
... thrown by casacore::MPosition casacore::MSMetaData::getObservatoryPosition(casacore::uInt) const at File: /source/casa6/casatools/casacore/ms/MSOper/MSMetaData.cc, line: 3305
从报错位置 MSMetaData.cc#L3305 可以追踪到 MeasTable.cc#L2905, MeasTable.cc#L2863, 得到关键词 “Observatories”,
“measures.observatory.directory”, “geodetic”.
经过一些搜索后注意到该文件是 casacore 下载得到的, 通常位于 ~/.casa/data/geodetic/Observatories
, 并且是类似 measurement set 的结构, 那么可用 Table 相关函数编辑.
注意 CASA 启动会加载该文件, 也就是加上读锁, 然后就无法获得写锁 (会死锁, 表现为程序卡死), 可以复制一份为 Observatories-bak
作为备份, 再复制一份为 Observatories-edit
编辑.
在 CASA 中使用
browsetable(tablename="/home/user/.casa/data/geodetic/Observatories-edit")
编辑加入台站参数即可. 记得退出 CASA 之后把 Observatories-edit
改回 Observatories
.
需求: 用 ASCII 字符作为用户文件夹的名称, 使得命令行比较方便, 并且其他位置 (比如用户界面) 的语言维持现状.
Motivation: use ASCII characters for user folder names (thus easier when using command line) while keeping other language settings (UI text, etc.)
解决方案:
Solution:
export LC_ALL=en_US.utf8
xdg-user-dirs-gtk-update
After upgrading from 22.04 to 24.04 through do-release-upgrade
,
GNOME keyring no longer manages ssh
key passwords when using Plasma.
(Still working on GNOME).
After some digging, it is noticed that SSH_ASKPASS
is set to /usr/bin/ksshaskpass
and didn’t find where it is set; however ssh-askpass isn’t working properly.
As said in https://wiki.archlinux.org/title/KDE_Wallet#Using_the_KDE_Wallet_to_store_ssh_key_passphrases,
will use this script in .bash_profile
as a workaround:
# https://wiki.archlinux.org/title/KDE_Wallet#Using_the_KDE_Wallet_to_store_ssh
if [ "$SSH_ASKPASS" == "/usr/bin/ksshaskpass" ]; then
export SSH_ASKPASS_REQUIRE=prefer
fi
• • • >>
本文假定安装软件到 $PREFIX
, 比如 PREFIX=/opt/$NAME
. 当然也可将不同软件安装到同一目录, 例如 PREFIX=$HOME/pulsar_software
. 以下内容中请把 $PREFIX
替换为你想要的值.
This article assumes installing software into $PREFIX
, e.g. PREFIX=/opt/$NAME
. Of course you can install into same directory, e.g. PREFIX=$HOME/pulsar_software
. Please replace $PREFIX
with the value you want in the following content.
本文以类 Debian 环境为例, 使用其他包管理器的用户可自行搜索软件包名. 对于 RHEL, 通常 -dev
-> -devel
.
This article uses Debian-like environment. Users with other package managers may search for package name by yourself. For RHEL, usually -dev
-> -devel
.
如有任何问题或评论, 可在 https://github.com/fxzjshm/fxzjshm.github.io/issues 提出.
If you have any question or comment, consider post it at https://github.com/fxzjshm/fxzjshm.github.io/issues.
相关环境变量 | Useful environment variables
PATH
LD_LIBRARY_PATH
LIBRARY_PATH
CPATH
构建需要的软件 | Dependencies of building
• • • >>
UCX bechmark
debug env vars
export UCX_LOG_LEVEL=info
export UCX_PROTO_INFO=y
compile UCX
./autogen.sh
./contrib/configure-release --prefix=/opt/ucx --enable-mt --with-verbs --enable-devel-headers --enable-examples --enable-cma --with-cuda=/usr/local/cuda --with-rocm=/opt/rocm
host memory: RoCEv2 w1 <-> w2 <-> w3 <-> w4 <-> w5 <-> w1: 10125 MB/s
- move network controller to appropriate PCIe position
- enable RoCEv2 (priority flow control, etc.) on switch
• • • >>
Device: Dell Powerswitch w/ BMC OS10
help:
enter config mode:
enter certain port group:
change port mode:
port 1/1/21 mode Eth 100g-1x
port 1/1/21 mode Eth 25g-4x
show current config:
change MTU of multiple ports
interface range ethernet 1/1/1-1/1/32
mtu 9216
save config:
Large languange model translated English version available below.
0. 引言
SNAP (Smart Network ADC Processor) 是 CASPER 开发的低成本采样装置, 更多信息可见 https://github.com/casper-astro/casper-hardware/blob/master/FPGA_Hosts/SNAP/README.md. 通常情况下需要使用树莓派来驱动 SNAP, 但一些已有的镜像可能无法在新版树莓派上使用, 或可考虑其他单板计算机来控制 SNAP, 本文可为构建过程提供参考.
1. 下载系统
对于树莓派, 可从 https://www.raspberrypi.com/software/ 下载其系统; 类似地其他单板计算机可从制造商处获取.
特别地, 如果已有可在旧版本树莓派中可启动的镜像但该镜像无法在新版树莓派上启动, 可以考虑仅替换引导/固件与内核, 此时请注意原先镜像中的系统是 32 位还是 64 位, 否则可能无法启动.
下载系统后, 按照其教程烧录系统到 SD 卡上.
新版内核可能缩小了 SPI 缓冲区的默认大小, 需要手动扩大.
在 bootfs 分区的 cmdline.txt (即 Linux 内核参数) 中添加
(参考 https://raspberrypi.stackexchange.com/questions/65595)
然后卸载 SD 卡, 装入树莓派并启动.
2. 安装 CASPER 相关软件
2.1 casperfpga
• • • >>
Manual English translation available below.
安装 Vivado 2021.1
- 安装
ncurses-devel
, ncurses-compat-libs
(RHEL 8 或衍生版本) 或 libncurses5-dev
libtinfo-dev
libtinfo5
(Ubuntu 20.04) 以安装 libncurses.so & libtinfo.so.5 两个库; 否则安装后的 “list system devices” 卡死无法结束, 可在安装器输出中看到类似 “cannot load libncurses.so.5: no such file or directory”
- 安装 Vivado 2021.1 & Vitis 2021.1
- 注意 2021.1 对应的 Model Composer 可能不支持 RHEL 8.x (检测系统后拒绝启动)
- 获取 Vivado license 放到
~/.Xilinx/Xilinx.lic
安装 Matlab 2021a
- 不要安装 “Matlab Compiler” and “Matlab Compiler SDK” 否则调用 Vivado 时会卡死
解决运行库依赖冲突
- 大部分情况是 Matlab 或 Vivado 的组件 A 依赖运行库 B, 运行库 B 依赖运行库 C, B 由系统提供, Matlab 或 Vivado 试图提供 C 但太老使得 B 无法加载, 故必须使用系统提供的 C’
• • • >>
The most recent version of Wine is named wine-development
in Ubuntu 22.04
repository, while in WineHQ repository it is named wine-devel
.
This causes problem when installing packages depending on Wine and want the
most recent version, e.g. carla-bridge-wine32
.
One workaround is to use a dummy package using “equivs”:
- install equivs
- run
equivs-control wine-devel-fixes
- edit control file, related lines:
Package: wine-devel-fixes
Depends: wine-devel
Provides: wine-development
Description: Fixes the Wine package rename on Ubuntu 22.04
- run
equivs-build wine-devel-fixes
- install the generated
wine-devel-fixes_1.0_all.deb
Reference: workaround ROCm installation on Ubuntu 22.04 (when it didn’t support): https://github.com/ROCm/ROCm/issues/1730#issuecomment-1205109513
It is known that there’s make rpm-pkg -j${nproc}
/ make deb-pkg -j${nproc}
that helps build and package Linux kernel,
but on RHEL-like distros the default package name is still kernel
and kernel-devel
, causing conflict with existing kernels from repository.
So renaming the output package seems required, and here is one kind of patch:
• • • >>