红联Linux门户
Linux帮助

Ubuntu 10.10下安装PGI Fortran 10.2

发布时间:2015-02-07 09:41:29来源:linux网站作者:kindrabbit@yeah

前段时间跟朋友学习WRF,需要并行计算在linux集群上,单位的集群速度其实也一般,峰值也就2T FLOPS,如果能去天津计算中心用一下天河一号该多好,想体验一下3000多T的快感。当然也只是想想,好,言归正传……

闲来无事正好在自己的“笔记本Linux服务器”上安装一下PGI,为过几天运行HYCOM做准备。步骤如下:

第一步,先去官网下载编译器,本人手里有一个10.2的license,所以直接去下载10.2版本,最新的版本有2011的,喜欢的朋友可以去下载使用,具体功能有哪些改进我暂时也不清楚。

前面的下载、解压缩等步骤前面的博客里提到过,在此就不再赘述

截取key point

Address:The Portland Group, Inc.

STMicroelectronics, Inc.

Two Centerpointe Drive, Suite 320

Lake Oswego, OR  97035

USA

Do you accept these terms? [accept,decline]

Accept

A network installation will save disk space by having only one

copy of the compilers and most of the libraries for all systems

on the network, and the main installation needs to be done once

for all systems on the network.

1. Single system install

2. Network install

Please choose install option(1-2):

1

More information about the ACML can be found at the ACML web site:

http://www.developwithamd.com/acml

Install the ACML? [y/n]

n

Installation directory? [/opt/pgi]

(回车之后)提示

ERROR: no write permission in installation directory (/opt/pgi)

Exiting...

此时切换root用户

coffee@coffee:~/soft/pgi$ ./install

Do you accept these terms? [accept,decline]

!!!!!!!!!中间步骤同上!!!!!!!!!

Installation directory? [/opt/pgi]

Installing software into ……

#####################

重要提示:(此处先过,后面有步骤解决……)

ERROR: unknown glibc version (stable).

Making symbolic links in ……

Do you wish to install MPICH1?(y/n)

n

FLEXlm hostid is empty. Unfortunately, we cannot generate license without hostid.

For further information, please go to http://www.pgroup.com/support/faq.htm.

Do you want the files in the install directory to be read-only? [y,n]

n

Installation complete.

这时请不要忘记把 “license.dat ”拷到相应位置,任意……否则以后会提示各种错误的……

安装暂时告一段落

下面安装补丁包

补丁包是在我的10.2-linux-crack文件夹里,需要破解PGI可以到网上各大编程里找,应该都会找到。还有安装补丁的步骤和主程序的步骤几乎一摸一样,也不再赘述。

最后一步提示是这样的……

!!!!!!!!!press <enter> to close !!!!!!!!!!!!!!!!!!!!

当然不要忘记修改环境变量

使用命令gedit ~/.bashrc

(不想打字了,拷贝别人,除了路径都一样)

coffee@coffee:~$ source .bashrc

coffee@coffee:~$ pgf90

如果版本正常的话,现在就已经安装完毕了,可是……

pgf90-Error-Please run makelocalrc to complete your installation

原因就是我的操作系统的glibc库是12.0.2版本的,而PGI得库版本非常低,识别不了,所以就有了下面的提示:

ERROR: unknown glibc version (stable).

解决方案: 在别的地方安装了一个PGI2011版本,找到makelocalrc文件拿来借用一下就OK,其差别主要是多了下面这段语言。(当然还有一些别的,根据网上的修改方法也是可以实现的,我都试了,请大家放心使用)

2.1[0-9]* )

glibc=232

LIB=lib-linux86-g232

LIBLF=$LIB-lf

INC=include-g23

;;

若出现cannot find -lpgc”的错误是因为找不到库文件,请从其它机器拷贝缺失文件libpgc.so到lib文件夹。

最后出现

coffee@coffee:~$ pgf90

pgf90-Warning-No files to process

终于完成了。