IDL command line and workbench
There are two primary ways of using IDL: the command line (CLI*) and the Workbench (WB). The CLI allows direct access to the IDL interpreter. The WB is a separate program that sits on top of IDL and provides a slew of organizing, editing and debugging tools for working with IDL.
两种使用 IDL 的主流方法:命令行 CLI 和 GUI。命令行可以直接访问 IDL 编译器,GUI 是架构在 IDL 之上提供一系列组织,编辑调试工具。
CLI 和 GUI 的优缺点如下:
CLI Pros:
- Lightweight. 轻量级
- Fast. The CLI provides direct access to the IDL interpreter. 速度快
CLI Cons:
- Limited shell-like support; e.g., no color syntaxing, command completion or keybinding definition. (However, see rIDL.)
- An external editor is needed to develop and debug code. (For many, this may not be a negative.)
WB Pros:
- Integrated editor with command completion, color syntaxing, code formatting and code templates.
- Projects for organizing files and controlling IDL’s path.
- A consistent interface across platforms supported by IDL (Windows, Mac OS X, Linux).
WB Cons:
- The WB is built on Eclipse, which is a big, complex Java application. As the size and complexity of an application grows, the likelihood of bugs grows, as well.
- the Outline view for jumping between programs in a file, and
- the Open Resource dialog for opening files.
IDL 批处理
Batch processing with IDL
1 | $ nohup nice $IDL_DIR/bin/idl < in.pro > out.txt 2> err.txt & |
in.pro
1 | print, 'Job started' |
task1.pro
1 | pro task1, n |
mixed batch without window
1 | $ idl <in.pro >out.txt 2>err.txt |
in.pro
1 | print, 'job started' |
example_envi_batch_status_window.pro
1 | pro example_envi_batch_status_window |
A list of other resource
- 剑桥大学 Vasily Belokurov 的IDL教程
- Developer of rIDL & IDLdoc, Michael Galloy
- Coyote’s guide to IDL
IDL安装
Linux 系统 IDL88/ENVI56安装
安装ENVI/SARSCAPE
1 | ├── envi56 |
安装 envi56
1 | cd envi56 |
[option] libtinfo.so error when launching ENVI 5.6/IDL 8.8 on Linux
1 | sudo apt install libtinfo5 |
reference harris
安装 sarscape
sarscape 安装需要 opencl,这个比较麻烦后面单独说
1 | sudo ./install.sh /usr/local /usr/local/harris/envi56 |
安装 opencl
OPENCL 分 INTEL 和 AMD 处理器,根据 sarscape 官网说明,需要分别安装,这里先说 INTEL 处理器的安装过程:
INTEL
因特尔的opencl sdk CPU和GPU是分开的,需要先安装基于CPU的SDK,再安装基于GPU的 sdk
- 安装一个clinfo的软件可以看到服务器上目前支持的OpenCL设备
1 | sudo apt install clinfo |
NVIDIA缺失的库安装,使得基于NVIDIA的cl设备能够正常使用
1 | sudo apt install ocl-icd-libopencl1 |
安装lsb-core
,opencl sdk依赖于这个库
1 | sudo apt install lsb-core |
- CPU opencl SDK安装参考官网手册:官网链接,下载链接: OpenCL SDK (已下载 ENVI56/LINUX/opencl_p_18.1.0.015.tar.gz )
进入到l_opencl_p_18.1.0.015目录下,
1 | sudo ./install_GUI.sh |
测试
1 | liupei@T470:~/Downloads/linuxENVI$ clinfo |
参考文献:Huo的藏经阁, Joey’s Note
- GPU SDK安装
intel 的GPU opencl 是基于 Graphics Runtime,其相关安装文件在github中,Intel Graphics
目前用不是没有装,而且上一部后好像能找到 GPU platform
AMD
还没有装,好像很麻烦,因为 sarscape帮助文件所 几点几 之后就不开发了。。。
参考文献:1
激活
由于申请的试用版的,激活不是通过 license manager,而是通过 idl virtual machine
1 | sudo /usr/local/harris/envi56/idl88/bin/bin.linux.x86_64/idl -vm |
linux 系统 IDL8.3/ENVI5.1 安装
安装程序
安装路径:手动输入刚刚建立的/usr/local/exelis目录
1 | sudo mkdir /usr/local/exelis |
选项都选y,除了让DICOM开机启动选择n。
破解
把两个库文件解压,如果rpm2cpio没有就先安装
1 | sudo apt install rpm2cpio |
然后进入解压出来的目录usr/lib64,里面有4个文件libidn.so.11,libidn.so.11.6.8,libXp.so.6,libXp.so.6.2.0,全cp到程序目录中
1 | sudo cp * /usr/local/exelis/idl83/bin/bin.linux.x86_64 |
运行ifconfig,查看网卡名,我的网卡是enp5s0,运行以下代码修改网卡mac
1 | sudo ifconfig enp5s0 hw ether 08:9e:01:ba:03:4b |
记得每次开机都要运行一次
运行hostname,查看自己电脑名
1 | hostname |
在上面license.dat中修改
SERVER hostname 089e01ba034b 1700
这一行中的hostname为自己电脑名,编辑完毕cp license.dat文件
1 | sudo cp license.dat /usr/local/exelis/license/ |
运行程序
1 | idl |
破解等一键运行
startidl.sh
1 | alias sidl='/usr/local/exelis/idl/startidl.sh' |
1 | liupei@T470:/usr/local/exelis/idl$ cat startidl.sh |
1 | sudo ifconfig enp5s0 hw ether f0:2f:74:df:4f:30 |
可能出现的错误
提示未破解
就运行lmgrd
1 | cd /usr/local/exelis/idl83/bin/ |
如果提示,error: “lmgrd: not found”,
- for ubuntu 安装lsb-core
1 | sudo apt install lsb-core |
- for manjaro
1 | yay -S lmgrd |
参考文献:
- CSCD安装博客 here
- 官方帮助 here
- LINUX IDL 8.4安装
envi47安装
首先在/usr/local下建立文件夹itt, then
1 | sudo mkdir /usr/local/itt/ |