GAMIT/GLOBK 安装攻略(Cygwin 下成功,Slackware 下失败)(欢迎转载,解救被 GAMIT/GLOBK 郁闷的造业的人)

GAMIT/GLOBK 果然是相当的不好装,不过今天貌似搞定了。网上的资料不多,谈及奇怪问题的情况的文章更少,因此想起写这篇文章。

1. 操作系统

其实我一直就不明白,一个科学计算的程序干嘛用那么多平台相关的代码(Doris 也是这副德行,很让人不爽)。本来就捉襟见肘的硬盘空间还要分杯羹给*nix系统,真的很麻烦(别看我网名linuxmao,这个是有历史因素的)。我先用的是 Slackware,一个以开发著称的 Linux 发行版(当然还用过 FreeBSD 和 Ubuntu,很可惜,这二者装 g77 不方便)。在 Cygwin 的情况下务必请大家断网,关 Kaspersky,关360安全卫士,关360保险箱,否则 Cygwin 的 dlls 会中途出错,无法继续。

 2. X11

Slackware 在默认的情况下,貌似 X11LIBPATH 和 X11INCPATH 是空的。这个问题开始你不会发现,只有在 make_gamit 这步中才会出问题。因为 make_gamit 会检查这两个变量对应的路径,如果为空,会失败(我把安装脚本给改了,让 make_gamit 不去检查 X11 是否存在。这么做会不会有后遗症我不知道,因为在那之前就失败了)。在 Cygwin 下面,你如果在安装时选择了 X11 的相关头文件和库文件,X11INCPATH 会被自动找到(/usr/X11R6/include),但是 X11LIBPATH 不会被找到。为什么呢?这个查找过程实际上是自动搜索 Xlib.h 和 libX11.a 两个文件的路径。但是 Cygwin 下没有 libX11.a,相应的是一个叫做 libX11.dll.a 的文件。用 ln -s libX11.dll.a libX11.a 命令做一符号链接就好了。

 3. g77

 Slackware 的 g77 是有瑕疵——没有 idate() 函数(反正我没找到,网上也语焉不详)。国外的新闻组上有篇文章给了一个方案,将 date_and_time() 函数转化为 idate()。由于对 Fortran 不熟,所以只得作罢。我推测是 Slackware 的 g77 是4.x版的,Cygwin 是3.4.4,反正 GCC 每次大升级都不怎么保证向下兼容。

另外,不知道为什么,Cygwin 下运行 install_soft 没有传递编译器类型,这点真的很无语,只得再次改了安装脚本。

 4. uname -a

这个大家应该知道是什么,就是看系统的版本了。Cygwin 得出来的是“CYGWIN_NT-5.1 <username> 1.5.18(0.132/4/2) <date> <time> i686 unknown unknown Cygwin”。unimake 会 name mangle 一下,把它变成 OS_ID <system> <version> 的形式,比如 SunOS 4.1.10 就是 OS_ID SunOS 4110。这个会和 makefile.config 中的块对应,比如 OS_ID SunOS 4110 4131,也就是说任何 SunOS,版本在4.1.10和4.1.31之间的都可以使用下面的命令。对于 Linux,采用的是 OS_ID Linux 0000 3000,由于 Linux 目前只有2.6.26版,所以都是可以执行的。问题在于没有一个叫做 OS_ID CYGWIN_NT-5.1 的条目,自然 Cygwin 下安装会报错。不过 Cygwin 号称是和 Linux 兼容的(因为 Linux 正式称谓是 GNU/Linux,也就是说 GNU 的软件系统 + Linux 内核,而 Cygwin 就是推出 GNU 在 Windows 下的兼容,自然二者是兼容),因此要么把配置文件中原本的 CYGWIN_NT-5.1 改为 Linux,抑或对着 Linux 条目的样式假造一个 OS_ID CYGWIN_NT-5.1 0000 3000 就好了。

大部分的内容我想已经覆盖到了,以后再想到什么欢迎交流。                                                 

                                                                                 2008.5 于 汉口

Overview These tools are provided as a means to help users understand the quality of the results being obtained from GLOBK analyses of GPS data. Their primary aim is to improve the quality and understanding of the results from large GPS analysis projects. Installation The latest tsview/velview mfiles are saved in GGMatlab_mfiles.tar. When running from MATLAB this verion of the m-files should be downloaded. The m-files are in a folder called matlab and in this folder are folders for tsview and velview. To run the velview and tsview programs you should download the Matlab® mfiles for either x86_64 (GGMatlab_x86_64.tar) or for Intel Mac OSX (GGMatlab_maci.tar). These tar files are identical except that each tar file contains the executable program for their respective systems (see details below). The tar files contain directories for velview and tsview. If you have a license for Matlab you can go to the section Running under Matlab® after the files have been untarred. If you do not have a license for Matlab, you should download MCRInstaller.bin for x86_64 systems or MCRInstaller.dmg for Intel Max OSX (These files are each 300Mbytes). Once the appropriate file is downloaded, follow the instructions in the Running as standalone programs section after the tar files above have been untarred. The tar files contain directories for tsview and velview. The executaubles are in these directories along with the Matlab m-files. The tar files can be untarred in any convenient directory. For GAMIT/GLOBK users, the untarred directory can be put at the level of gamit, kf, and library directories. Also available is an example case saved as Example.tar. The examples below use the data in the Example directory. This directory can be placed anywhere in your system.
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值