24小时热门版块排行榜    

CyRhmU.jpeg
查看: 2809  |  回复: 37
当前主题已经存档。

renren123123

金虫 (正式写手)

特别说明:
第七、八、九楼分别对应mpich2,ifc,mkl库的安装具体详细实践步骤
11楼2010-01-29 08:28:02
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

wuchenwf

荣誉版主 (职业作家)

★ ★ ★ ★ ★
余泽成(金币+5):替楼主谢谢wuchenwf斑斑! 2010-01-29 13:42
楼主为了大家散尽金币,太伟大了。
不过,网上教程很多的,为什么要单独散了这么多金币呢。
我转载了一个帖子http://lwg2001s.javaeye.com/blog/278945

这个是基于Ubuntu6.06写的帖子,其它系统基本上也适用。我实际做过,一般的集群组建、并行或者是单机按照这个帖子来完全没有问题。金币吗,楼主自己也没有多少了就不用给了,呵呵

Ubuntu 6.06安装MPICH(采用基于密钥的ssh认证)
关键字: ubuntu, ssh, authorized, rsa
1.linux安装
采用ubuntu 6.06.1 LTS 版本。


2.创建NFS服务
  sudo apt-get install nfs-common nfs-kernel-server
在服务器节点/home目录下建立mpi目录,并将其设置成NFS服务器,在/etc/exports
文件中加入一行:
  /home/mpi  node1(rw)  node2(rw)
在客户端节点的/etc/fstab文件中增加一行:
  node1:/home/mpi /home/mpi nfs  rw,bg,soft  0 0
将/home/mpi这个目录从服务器节点输出,并装载在各客户端的/home/mpi目录下,从而便于在各节点间分
发任务.

3.修改/etc/hosts文件,将所有节点名称极其ip地址填入。例如:
  127.0.0.1 localhost.localdomain localhost
  219.242.255.161 node1
  219.242.255.162 node2
  ......................
每个节点都进行类似的设置。这样做的目的是使节点之间能够通过node1 ... noden的名
称相互访问。你能通过ping noden 或 ssh noden进行测试。

4.安装设置ssh
  sudo apt-get install openssh-client openssh-server
以设定的用于启动mpi计算的用户登录,运行
  ssh-keygen -t rsa    #对于所有提示直接回车即可
这将生成一个密钥对,分别存放在~/.ssh/id_rsa和~/.ssh/id_rsa.pub文件内。
然后进行访问授权,运行:
  cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
  chmod go-rwx ~/.ssh/authorized_keys
  ssh-agent $SHELL
  ssh-add
在每个节点重复一遍。收集所有节点下的authorized_keys文件,合并为一个authorized_keys,然后再分发到每个节点的$HOME/.ssh目录下去。
试着在某一节点上登录所有节点(包含自身),ssh noden,则在$HOME/.ssh/下生成一个名为known_hosts的文件,里面放着访问该主机的身份指纹,也在各个节点上将known_hosts文件作同样的拷贝。
以上的目的是使各节点相互之间访问无需输入密码。


5.开启各项必需的服务
  ssh
  nfsd
  networking


6.在各节点编译、安装mpich2.(详情参考安装文件)
  ./configure --prefix=/usr/local
  make
  make install


7.设置
  在$HOME目录下执行
   touch ~/.mpd.conf
  在里面输入
   secretword=  #为任意你所想填写的字符串,如"mysecret"
  再执行
   chmod 600 ~/.mpd.conf
  编写一个mpd.hosts文件,内容如下:
   node1  #集群中各节点名,一行一个
   node2
   ......  
  
8.测试安装是否正确
   mpdboot -n number -f mpd.hosts  #number为要启动的节点数,mpd.hosts为包含机器名的文件
   mpdtrace                        #查看已启动的节点
   mpdallexit                      #所有节点退出
   
  拷贝/usr/local/share/examples_graphics 下的用例到其他目录,编译cpi.c:
   mpicc -o cpi cpi.c
  再执行:
   mpdboot -n 2 -f mpd.hosts
   mpiexec -n 2 cpi
  将会获得如下信息
   Process 0 on node1
   Process 1 on node2
   ..................
  单机上模拟多节点能用如下方式:
   mpd&   #启动mpi任务管理服务,只启动本节点的mpd
   mpiexec -n 2 cpi
  如果都能正常运行即证实集群环境安装成功。

[ Last edited by wuchenwf on 2010-1-29 at 09:46 ]
12楼2010-01-29 09:45:25
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

wuchenwf

荣誉版主 (职业作家)


jjdg(金币+1):感谢参与 2010-02-03 13:16
引用回帖:
Originally posted by wuchenwf at 2010-01-29 09:45:25:
楼主为了大家散尽金币,太伟大了。
不过,网上教程很多的,为什么要单独散了这么多金币呢。
我转载了一个帖子http://lwg2001s.javaeye.com/blog/278945

这个是基于Ubuntu6.06写的帖子,其它系统基 ...

Ubuntu的软件更新采用apt-get的方式,其它系统如suse、redhat与这个是不一样的。对于不同的系统只要安装同样的程序就行,具体安装的命令,百度一下即可。

[ Last edited by wuchenwf on 2010-1-29 at 09:49 ]
13楼2010-01-29 09:48:32
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

yt_l

木虫 (小有名气)


jjdg(金币+1):感谢回帖交流 2010-02-03 13:16
非常不错,挺好的
14楼2010-01-29 13:01:06
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zyz1981

至尊木虫 (文坛精英)

医学物理

linux下intel的ifort编译器下载安装及配置详解


jjdg(金币+1):感谢参与 2010-02-03 13:16
ifort是一款非常不错的编译器,intel有非商业版,可以免费下载,虽不提供技术支持,但对于大多数普通用户来讲,已经够用了.下面我就ifort编译器的下载安装及配置过程介绍如下,希望对您有用。


1)下载。

http://www.intel.com/cd/software/products/asmo-na/eng/279831.htm下载Free Non-Commercial(非商业版)的ifort,很简单,只需要提供邮箱,然后按照步骤一步步来就行了,intel会把序列号和一个licence文件发到你邮箱里。这里以64位版本l_fc_p_10.1.015.tar.gz为例
2)安装。

a)以root身份登陆linux,tar -zxvf l_fc_p_10.1.015.tar.gz,解压缩.
b)|> cd l_fc_p_10.1.015
  > ./install.sh
c) 选择1,进入安装,然后有输入序列号的选择,如果直接输入序列号,就选1(推荐使用),然后输入序列号,如果不能上网,或网络认证太慢,可以提供licence文件的路径的话,选2,然后根据提示输入licence文件的
全部路径及文件名(以.lic结尾)
d)选择Typical install典型安装(推荐使用),如果是高级用户,可以选择advanced.
e)阅读协议,一路回车,到最后根据提示输入accept
f)然后都是默认安装,一路回车就安装完毕。


3)配置。进入安装目录下才/bin,默认路径为/opt/intel/fce/10.0.026/bin
source ifortvars.sh(.csh)
到此安装设置完毕。输入which ifort,如果能看到/opt/intel/fce/10.0.026/bin/ifort ,那么就安装设置成功了,赶紧用个fortran程序去测试吧。

转自:http://xbbian.blog.hexun.com/18379789_d.html
15楼2010-01-29 14:02:21
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zyz1981

至尊木虫 (文坛精英)

医学物理

linux下intel的ifort,icc编译器以及数学库MKL的下载安装及配置详解

★ ★
jjdg(金币+2):辛苦了 2010-02-03 13:17
关键字: icc linux 安装
ifort,icc是一款非常不错的编译器,intel有非商业版,可以免费下载,虽不提供技术支持,但对于大多数普通用户来讲,已经够用了.下面我就ifort,icc编译器的下载安装及配置过程介绍如下,另外还介绍了相应的数学库MKL(Math Kernel Library )的安装,希望对您有用。

我们的操作系统是Red Hat Enterprise Linux5-AS-X86-64。

1)下载:

http://www.intel.com/cd/software/products/asmo-na/eng/279831.htm下载Free Non-Commercial(非商业版)的ifort,icc 以及MKL。很简单,只需要提供邮箱,然后按照步骤一步步来就行了,intel会把序列号和一个licence文件发到你邮箱里。这里以64位版本 l_fc_p_10.1.015_intel64.tar.gz,l_cc_p_10.1.015_intel64,以及数学库 l_mkl_p_1.0..1.014.tgz为例。

2)安装:

a) 以root身份登陆linux,tar -zxvf l_fc_p_10.1.015.tar.gz,解压缩.

b) # cd  l_fc_p_10.1.015

# ./install.sh

c) 选择1,进入安装,然后有输入序列号的选择,如果直接输入序列号,就选1(推荐使用),然后输入序列号,如果不能上网,或网络认证太慢,可以提供licence文件的路径的话,选2,然后根据提示输入licence文件的全部路径及文件名(以.lic结尾)。

d)选择Typical install典型安装(推荐使用),如果是高级用户,可以选择advanced.

e)阅读协议,一路回车,到最后根据提示输入accept。

f)然后都是默认安装,一路回车就安装完毕。

l_cc_p_10.1.015_intel64,以及数学库l_mkl_p_1.0..1.014.tgz的安装步骤同上。

3)配置:

进入安装目录下才/bin,默认路径为/opt/intel/fce/10.0.008/bin,/opt/intel/cce/10.0.015/bin。

source ifortvars.sh(.csh)

source iccvars.sh

到此安装设置完毕。分别输入which ifort,which icc如果能看到/opt/intel/fce/10.0.008/bin/ifort ,/opt/intel/cce/10.0.015/bin/icc,那么就安装设置成功了,赶紧用个fortran程序去测试吧。

另外,还有一种定义环境变量的方法,切换到root用户下,vi /etc/profile/,在该文件中定义环境变量如下所示:

#intel compiler

source /opt/intel/cce/10.1.015/bin/iccvars.sh

source /opt/intel/fce/10.0.008/bin/ifortvars.sh然后,保存退出,source /etc/profile,到此为止,intel编译器安装完毕。


Note:
export CC=icc CXX=icpc LD=xild AR=xiar

转自:http://mryufeng.javaeye.com/blog/440590
16楼2010-01-29 14:04:03
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zyz1981

至尊木虫 (文坛精英)

医学物理

PGI安装问题汇总

PGI安装问题集锦
    PGI是Portland公司开发的编译器,可以编译高性能的fortran(77、9X)、C、C++,尤其是对AMD CPU优化非常好。这里汇总了安装过程中最常见的问题以及解决方案。

一、bash环境设置
相关问题:安装成功后,运行pgf90等命令显示“bash: pgf90: command not found”。
解决:在.bashrc或者.bash_profile中设置环境,做法如下(以我安装pgi6.0为例)
cd ~
vim .bashrc
然后在最后追加
PATH=/usr/pgi/linux86/6.0/bin:$PATH
export PATH
MANPATH=$MANPATH:/usr/pgi/linux86/6.0/man
export MANPATH

LM_LICENSE_FILE=/usr/pgi/license.dat
export LM_LICENSE_FILE
export PGI=/usr/pgi
保存退出
然后source .bashrc
可以使用了。

二、glibc、crtbegin.o问题
问题:受系统安装的gcc编译器版本的影响,安装pgi有时候会遇到,例如我在安装pgi6.0-5时出现 ERROR: unknown glibc version (2.4),或者还有朋友遇到安装完毕后用pgf90编译fortran程序提示找不到crtbegin.o文件,这属于同一问题。

实际上pgi各模块已经写在硬盘上了,但是环境没设置好,所以还是不能工作。

具体原因:

由于安装文件中的makelocalrc不能正确生成localrc,所以pgi不能正常工作,这与使用哪个发行版无关.

解决方案:
以我的系统为例,我用ubuntu edgy,安装pgi 6.0
1.手动编写一个文本文件localrc,放在/usr/pgi/linux86/6.0/bin目录下
set LFC=-lg2c;
set LDSO=/lib/ld-linux.so.2;
set GCCDIR=/usr/lib/gcc/i486-linux-gnu/4.1.2;
set GCCINC=;
set G77DIR=/usr/lib/gcc/i486-linux-gnu/3.4.6/;
set LOCALRC=YES;
set THROW=__THROW=;
set HAMMER=;
set X86_64=;

这一方案简单有效

2.用如下文件替换安装目录中的makelocalrc文件,然后重新安装(该文件需要设置为可执行)
(忘了抄的哪位高手的)

主要在66,267行附近,314行附近的改动是为了解决安装错误 : /usr/pgi/linux86/6.1/bin/makelocalrc: line 315: =安装: / u sr/l ib/gcc/i386-re dhat- linux/4.1.0/: 没有那个文件或目 录.

修改后的makelocalrc如下(修改部分已用整行长注释条标出):

#! /bin/sh
##
## Copyright 1990-2000, The Portland Group, Incorporated.
## Copyright 2000-2005, STMicroelectronics, Incorporated.
## All rights reserved.
##
## STMICROELECTRONICS, INCORPORATED PROPRIETARY INFORMATION
## This software is supplied under the terms of a license agreement
## or nondisclosure agreement with STMicroelectronics and may not be
## copied or disclosed except in accordance with the terms of that
## agreement.
##

# Just in case
PATH=/usr/bin:/bin:$PATH
TMPDIR=${TMPDIR:-/tmp}

usage() {
echo "Usage: $0 [-x|-n] installdir"
echo
echo "Example: $0 -x /usr/pgi/linux86/6.1"
quit 1
}

quit() {
# Cleanup scratch files.
rm -rf $scratch
exit $1
}

copy_files() {
# $1 is source dir, $2 is destination dir
if test -n "$1"; then
if test -d "$1"; then
if test ! -d $2 ; then
mkdir $2
fi
( cd $1 ; tar cf - * | ( cd $2; tar xpf - ))
fi
fi
}

pretty_print() {
echo $@ | awk -F^ '{printf("%20-s %s\n",$1,$2);}'
}

print_line() {
echo $1 $2 $3 $4 $5 $6 >> $newrc
}

get_glibc_version() {
# Determine the GNU LIBC version.

if test -r /lib64/libc.so.6 ; then
LIBC=/lib64/libc.so.6 # should only exist on a 64-bit Linux OS.
elif test -r /lib/libc.so.6 ; then
LIBC=/lib/libc.so.6 # should exist on any Linux OS.
else
echo "ERROR: /lib/libc.so.6: not found or no read permission"
quit
fi

x=`strings $LIBC | grep 'GNU C Library' | cut -d, -f1 | awk '{print $7}'`
if test -n "$x" ; then
#########################################################################################
GLIBC_VERSION=2.4.4 ##原来是"$x"
else
GLIBC_VERSION=2.4.4 ##原来是空的
########################################################################################
fi
unset x
return
}

get_linker_version() {
x=`grep collect2 $out | sed q | sed -e 's/.* -dynamic-linker //' -e 's/ .*//'`
if test -n "$x" ; then
LINKER=$x
else
LINKER=
fi
unset x
return
}

get_specs_file() {
# This command pipeline should be I18N-capable.
x=`awk '/gcc.*specs/ {print $NF}' $out`
if test -n "$x" ; then
SPECSFILE=$x
else
SPECSFILE=
fi
unset x
return
}

# Stop if not Linux.

opsys=`uname -s | tr '[A-Z]' '[a-z]'`
if test "$opsys" != "linux" ; then
echo
echo "$0: `uname -n` is not running Linux"
quit 1
fi

pgi50=1
noexec=1
ofile=0
use_pthreads=1
no_m32_support=0
check_crt_files=0
set_hammer_empty=0
gcc=gcc
g77=g77
scratch=$TMPDIR/PGI-INSTALL.$$
if test ! -d $scratch ; then
mkdir $scratch
fi

while test -n "$1"; do
case $1 in
-n ) noexec=1 ;;
-x ) noexec=0 ;;
-o ) ofile=1 ; noexec=0 ;;
-gcc ) shift; gcc=$1 ;;
-g77 ) shift; g77=$1 ;;
* ) start=$1 ;;
esac
shift
done

if test -z "$start" ; then
usage
fi

if test ! -d $start ; then
echo "$0: $start: directory not found"
usage
fi

if test "$start" = "." ; then
start=`pwd`
fi

if test "$pgi50" -eq 1 ; then
# Example: 5.0 and above:
# start = /usr/pgi/linux86/5.0
# installdir = /usr/pgi/linux86
# version = 5.0
# base = /usr/pgi/linux86/5.0
# target = linux86
installdir=`dirname $start`
version=`basename $start`
base=$start
target=`basename $installdir`
else
# Example: 4.1 and below:
# start = /usr/pgi
# installdir = /usr/pgi
# base = /usr/pgi/linux
# version = 5.0
# target = linux86
installdir=$start
version=`cat $start/.release`
base=$start/linux86
target="linux86"
fi

# Define target-specific options needed below.

arch=`uname -m`
case "${target}:${arch}" in
linux86:x86_64 )
gccopt="-o $scratch/a.out -m32 -v"
g77opt=$gccopt
subdir="/32"
check_crt_files=1
use_64bit_rcfiles=11
install_64_bit=0
lib=/lib
usrlib=/usr/lib
;;
linux86:* )
set_hammer_empty=1
gccopt="-o $scratch/a.out -v"
g77opt=$gccopt
use_64bit_rcfiles=10
install_64_bit=0
lib=/lib
usrlib=/usr/lib
;;
linux86-64:x86_64 )
gccopt="-o $scratch/a.out -v"
g77opt=$gccopt
lib=/lib64
usrlib=/usr/lib64
install_64_bit=1
use_64bit_rcfiles=0
;;
linux86-64:* )
echo "ERROR: target doesn't match architecture"
exit 1
;;
esac

localrc=$base/bin/localrc
newrc=$scratch/localrc.$$

# Find the version of GLIBC used on this system so that the appropriate
# files are copied from lib-linux86-g* to lib and/or liblf.

LIBC=$lib/libc.so.6
if test ! -f $LIBC ; then
echo "ERROR: file $LIBC: not found."
quit 1
fi

get_glibc_version # sets GLIBC_VERSION

case "$GLIBC_VERSION" in
2.3.* )
glibc=232
LIB=$base/lib-linux86-g232
LIBLF=$LIB-lf
INC=$base/include-g23
;;
2.2.9* )
glibc=2293
LIB=$base/lib-linux86-g2293
LIBLF=$LIB-lf
INC=$base/include-g222
;;
2.2.5 )
glibc=225
LIB=$base/lib-linux86-g225
LIBLF=$LIB-lf
INC=$base/include-g222
;;
2.2.4 )
glibc=224
LIB=$base/lib-linux86-g224
LIBLF=$LIB-lf
INC=$base/include-g222
;;
2.2.2 )
glibc=222
LIB=$base/lib-linux86-g22
LIBLF=$LIB-lf
INC=$base/include-g222
;;
2.1.9* | 2.2*)
glibc=22
LIB=$base/lib-linux86-g22
LIBLF=$LIB-lf
INC=$base/include-g22
;;
2.1.[23] )
glibc=212
LIB=$base/lib-linux86-g212
;;
2.1.1 )
glibc=211
LIB=$base/lib-linux86-g211
;;
####################################################################################
2.4.4) ##这都是加上的 其实只要改GLIBC_VERSION
glibc=232 ##对应上面半括号中较新版本版本号即可
LIB=$base/lib-linux86-g232
LIBLF=$LIB-lf
INC=$base/include-g23
;;
#####################################################################################
* )
echo "ERROR: unknown glibc version ($GLIBC_VERSION)."
quit 1
;;
esac

# PGI software needs some of the gcc libraries. Run gcc to determine
# to determine which linker and libraries are actually being used.

type $gcc > /dev/null 2>&1
if test $? -eq 1 ; then
echo "ERROR: gcc not found;"
echo " successful use of compilers requires existence of gcc libraries"
quit 1
fi

cfile=$scratch/hello-$$.c
ffile=$scratch/hello-$$.f

cat > $cfile < #include
#include
main(){ printf("Hello world!\n"; exit(0); }
EOF_HELLO_C

cat > $ffile < program hello
write(*,100)
100 format('Hello world!')
end
EOF_HELLO_F

out=$scratch/gccrun.$$
$gcc $gccopt $cfile > $out 2>&1

if test ! -s $out ; then
echo "ERROR: gcc failed to execute for reasons unknown."
quit 1
fi
########################################################################
####$gccbase=`$gcc -print-search-dirs | sed -e 's/^install: //' -e 1q`
####if test -d $gccbase$subdir ; then
#### GCCDIR="$gccbase$subdir" ##原有的
####fi
####gccversion=`$gcc -dumpversion`
#######################################################################
libgcc=`$gcc -print-libgcc-file-name`
gccbase=`dirname $libgcc`
GCCDIR="$gccbase$subdir" ##自己加的
gccversion=`basename $gccbase`

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

# Check and see whether directory that gcc claims to exist actually
# does exist.

if test ! -d $gccbase ; then
echo "ERROR: directory $gccbase: not found;"
echo " successful use of compilers requires existence of gcc libraries!"
quit 1
fi

if test -d ${gccbase}include ; then
GCCINC=${gccbase}include
else
unset GCCINC
fi

# Find the linker

get_linker_version # returns LINKER
if test ! -x $LINKER ; then
echo "ERROR: Linker $LINKER: not found"
quit 1
fi

# Which g77? PGI software needs the g77 libraries, so look for the g77 libs.

type $g77 >/dev/null 2>&1
if test $? -eq 1 ; then
echo "WARNING: g77 not found; this may cause problems during use"
G77DIR='""'
else
out=$scratch/g77run.$$
$g77 $g77opt $ffile > $out 2>&1
libgcc=`$g77 -print-libgcc-file-name`
g77base=`$g77 -print-search-dirs | sed -e 's/^install: //' -e 1q`
if test -d $g77base$subdir ; then
G77DIR="$g77base$subdir"
else
G77DIR='""'
fi
f2c=`cat $out | grep lf2c`
g2c=`cat $out | grep lg2c`
if test -n "$f2c" ; then
G77LIB="-lf2c"
fi
if test -n "$g2c" ; then
G77LIB="-lg2c"
fi
fi

if test -n "$G77LIB" ; then
print_line "set LFC=$G77LIB;"
fi

# Which dynamic linker?

if test "$LINKER" != "/lib/ld-linux.so.1" ; then
print_line "set LDSO=$LINKER;"
fi

# CDK uses its own libmpich.a.

if test -f "$base/bin/mpirun" ; then
print_line "set MPILIB=$base/lib;"
MPILIB=$base/lib/libmpich.a
fi

print_line "set GCCDIR=$GCCDIR;"
print_line "set GCCINC=$GCCINC;"
print_line "set G77DIR=$G77DIR;"

#Add setaff_bind.o and -lnuma at link line
x=$base
x=`echo $x | sed -e 's/.*86-64.*/86-64/'`
if test "$x" = "86-64" ; then
if test -e $usrlib/libnuma.so ; then
print_line 'set NUMAOBJS=$COMPLIBOBJ/setaff_bind.o;'
print_line "set NUMALIBS=-lnuma;"
fi
fi

if test $pgi50 -eq 0 ; then
print_line "set STDRPATH=-rpath \$PGI/linux86/lib;"
fi

print_line 'set LOCALRC=YES;'

if test "$noexec" -eq 1 ; then
pretty_print 'PGI directory' ^ $installdir
pretty_print 'PGI version' ^ $version
pretty_print 'PATH entry' ^ "$base/bin"
pretty_print 'System linker' ^ $LINKER
pretty_print 'GCC directory' ^ $GCCDIR
pretty_print 'GCC headers' ^ $GCCINC
pretty_print 'G77 directory' ^ $G77DIR
pretty_print 'G77 headers' ^ $G77LIB

if test -n "$GLIBC_VERSION" ; then
pretty_print 'GNU C version' ^ $GLIBC_VERSION
pretty_print 'PGI glibc libs' ^ $LIB
pretty_print 'PGI glibc headers' ^ $INC
else
pretty_print 'Glibc version' ^ 'no'
fi

if test -n "$LIBLF" ; then
pretty_print 'Large file support' ^ $LIBLF
else
pretty_print 'Large file support' ^ 'no'
fi

if test -n "$MPILIB" ; then
pretty_print 'MPILIB' ^ $MPILIB
fi

if test $use_pthreads -eq 1 ; then
pretty_print 'Threads' ^ "$usrlib/libpthread.{a,so}"
else
pretty_print 'Threads' ^ "$base/lib/libpgthread.{a,so}"
fi

if test $no_m32_support -eq 1 ; then
pretty_print 'gcc supports -m32' ^ 'no'
else
pretty_print 'gcc supports -m32' ^ 'yes'
fi

quit 0
fi

# Make the necessary changes to meet glibc dependencies.

if test -n "$glibc" ; then
copy_files $LIB $base/lib

case "$glibc" in
22* | 23* )
copy_files $INC $base/include
print_line "set THROW=__THROW=;"
;;
21* )
;;
esac

# Large file support.

if test -n "$LIBLF" ; then
copy_files $LIBLF $base/liblf
else
rm -rf $base/liblf
fi

# Newer distributions of Linux do not need PGI-compiled versions of
# threads libraries.

if test $use_pthreads -eq 1 ; then
# Only create a symlink if the target file exists and
# the link does not.
if test -e $usrlib/libpthread.a ; then
if test ! -h $base/lib/libpgthread.a ; then
ln -s $usrlib/libpthread.a $base/lib/libpgthread.a
fi
fi
if test -e $lib/libpthread.so.0 ; then
if test ! -h $base/lib/libpgthread.so ; then
ln -s $lib/libpthread.so.0 $base/lib/libpgthread.so
fi
fi
fi

# Adjust header files based on the gcc version.

need_stddef=1
case "$gccversion" in
3.3* )
copy_files $base/include-gcc33 $base/include
;;
3.4* )
copy_files $base/include-gcc34 $base/include
need_stddef=0
;;
4.* )
copy_files $base/include-gcc40 $base/include
need_stddef=1
;;
* )
;;
esac

if test $need_stddef -eq 0 ; then
rm -f $base/include/stddef.h
fi

# Changes for 32-bit installs.

if test $set_hammer_empty -eq 1 ; then
print_line "set HAMMER=;"
print_line "set X86_64=;"
fi

if test $install_64_bit -eq 0 ; then
if test -f /etc/redhat-release ; then
grep 'release 9' /etc/redhat-release > /dev/null 2>&1
if test $? -eq 0; then
print_line "set LBSTAT=-lpthread -lpthread_nonshared;"
fi
fi
fi

# Stock distributions may need extra help in finding crt files.

if test $check_crt_files -eq 1 ; then
if test ! -f /usr/lib64/32/crt1.o ; then
print_line "set DEFLIBDIR=/usr/lib;"
print_line "set DEFSTDOBJDIR=/usr/lib;"
print_line "set EXTRAASARGS=--32;"
fi
fi

# For production installations, recover some space by unneeded files.

if test "$version" != "dev" ; then
rm -rf $base/include-g*
echo $GLIBC_VERSION > $base/glibc_version
fi

# Fix the 32/64-bit .*rc files.

if test $use_64bit_rcfiles -eq 11 ; then
files=`ls -1 $base/bin/.pg*-64 2>/dev/null`
for i in $files ; do
x=`echo $i | sed -e 's/-64$//'`
mv -f $i $x
done
rm -f $base/bin/.pg*-32 > /dev/null 2>&1
elif test $use_64bit_rcfiles -eq 10; then
files=`ls -1 $base/bin/.pg*-32 2>/dev/null`
for i in $files ; do
x=`echo $i | sed -e 's/-32$//'`
mv -f $i $x
done
rm -f $base/bin/.pg*-64 > /dev/null 2>&1
fi
fi

# Add timestamp and username.

print_line '# makelocalrc executed by ' `whoami` `date`

# If $ofile is set, then display the file to stdout. Otherwise, write
# it to $localrc.

if test $ofile -eq 1 ; then
echo "##### localrc contents #####"
cat $newrc
echo "############################"
rm -f $newrc
else
if test -f $localrc ; then
mv -f $localrc $localrc.bak
chmod -f 0644 $localrc.bak
fi
mv -f $newrc $localrc
chmod -f 0644 $localrc
fi

# Copy omp_lib.mod from lib directory to include directory
echo
if test -f $base/lib/omp_lib.mod ; then
cp -f $base/lib/omp_lib.mod $base/include/omp_lib.mod
fi
if test -f $base/lib/omp_lib_kinds.mod ; then
cp -f $base/lib/omp_lib_kinds.mod $base/include/omp_lib_kinds.mod
fi
quit 0

(过程中注意:找到软件包中的makelocalrc文件(linux86/bin下),用新的文件替换,同时应该增加makelocalrc可执行权限:chmod +x makelocalrc,很明显,无此步骤照样不成功)

转自:http://quantumv.blog.sohu.com/23690256.html
17楼2010-01-29 14:08:01
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dic213

木虫 (著名写手)

第三军团儿童团团长

1 PETSc(Portable, Extensible Toolkit for Scientific computation)的安装与使用,
2 BLAS
3 LAPACK
4 MPI
有笔记和算例说明安装使用方法

[ Last edited by dic213 on 2010-1-29 at 14:11 ]
春梦随云散, 飞花逐水流. 寄言众儿女, 何必觅闲愁.
18楼2010-01-29 14:08:01
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zyz1981

至尊木虫 (文坛精英)

医学物理

pgi编译器的安装

下面以安装pgi6.1编译器为例简单说明:
1.解压:tar -xzvf pgi-linux86-6.1.tar.gz
2.进入解压后的pgi目录,运行安装命令:./install
3.创建临时license(如果你有有效的license,这一步就选择No,否则就要用临时license而下面的步骤5就可以省略)
4.设置路径(假如你安装在/usr目录下):
PATH=/usr/pgi/linux86/6.1/bin:$PATH
export PATH
5.将你的lincese文件放到pgi安装目录
6.测试
1)编写一个简单的Fortran程序A.F:
PROGRAM TEST
READ(*,*) "THIS IS A TEST PROGRAM"
END
2)用装好的pgi编译:
pgf90 -v A.F
编译成功后会生成a.out的可执行文件
3)运行:./a.out
如果显示结果为“THIS IS A TEST PROGRAM" 则说明你的pgi已经安装成功啦!
以上过程可以参照pgi代码包中的INSTALL说明文件进行!


转自:http://hi.baidu.com/xctgu123/blo ... 95ff6fd1164e2a.html
19楼2010-01-29 14:10:23
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zyz1981

至尊木虫 (文坛精英)

医学物理

GeoCluster 2.1和PGI的安装

  说明:此套geocluster 2100软件来源于一个已经成功安装的拷贝,解压后需要修改一些文件名,以及一些文件中的参数。

一、准备工作:
  建立新组geovect,组号为1000。
  userdel cgg 删除建立有些问题的用户cgg
  useradd -d /home/cgg/ -g 1000 -u 129 -s /bin/csh cgg
  useradd -d /home/cgg/ -g 1000 -u 129 -s /bin/csh cgg
  passwd cgg
  参数来源于原来Unix系统。
  之后,可以查看/etc/passwd和/etc/shadow。

二、解压压缩包:
  此软件包以tar形式存在,文件名为/sw/cgg2100.tar
  解压后产生两个文件:gct21.tar.Z和pgi4_zmtar.gz。分别为geovecteur软件和PGI集群并行处理管理软件。
  分别解压:
  tar xzvf gct21.tar.Z
  gunzip pgi4_zm.tar
  并把针对ibm01的许可文件cgg1.dat和pgi1.dat拷贝到相应目录并改名:
  其中cgg1.dat拷贝为/cgg/license/license.dat。
  其中pgi1.dat拷贝为/usr/local/flexlm72/license.dat。
  许可文件中的mac地址与ifconfig命令显示的内容一致,而不是与hostid命令显示的内容一致。
三、安装PGI:
  installcdk
  accept
  1
  y
  安装路径选择为 /usr/pgi (缺省设置)
  之后,出现一个主机列表编辑环境,加入主机名ibm01。
  在/etc/hosts.equiv中加入ibm01一行。
  在/root/.rhosts中加入ibm01一行。
  正常情况下,进入到/usr/pgi/linux86中可见mpirun。

四、调整和修改geovecteur的有关参数:
  主要过程是要以cgg的身份执行的,但有些修改文件属性的操作等需要用root身份。
  cd /sw/gct21
  chgrp -R geovect /sw/gct21
  ln -s /cgg/jobmgr /cgg/jobmgr_2100
  cd /cgg/jobmgr/data
  在此修改一些文件后缀为主机名ibm01。
  gvr_tapedrives.ibm01
  logd.acct.ibm01
  logd.config.ibm01
  logd.config.ibm01-15
  logd.config.ibm01-30
  logd.config.ibm01.ascii
  logd.log.ibm01
  修改一些文件的内容,修改前把要改的文件备份,建议备份文件名以old_开头。
  1,修改clu30.descr,在其中加上ibm01  #rshmaster一行。
  2,修改clu30_env,修改为如下内容:
  3,setenv LM_LICENSE_FILE 2700@ibm01:7496@ibm01
     setenv CLUSTER_DESCR /cgg/jobmgr/data/clu30.descr
     setenv CLUSTER_SCR /scr
     其中,第一行中的2700根据/cgg/license/license.dat中第一行得来;7496根据pgi1.dat中得来,称作断口号/通道号。
  4,修改ddam.config为以下内容:
    #
    # This section gives info about the mag types as known by geovecteur
    #
    
    *mag0  :  File     spool    STG1-format file
    *mag40 :  Stg2_File  spool    STG2-format file
    
    *mag1  :  Mag800   spool    9-track round tape, density=800bpi
    *mag2  :  Mag1600  spool    9-track round tape, density=1600bpi
    *mag3  :  Mag6200  spool    9-track round tape, density=6250bpi

    *mag4  :  Car200   spool    3480 cartridge, 200Mbyte capacity
    *mag5  :  Exa2Gb   nospool    Exabyte 8200 8mm cartridge, 2Gbyte capacity
    *mag6  :  Exa5Gb   nospool    Exabyte 8500 8mm cartridge, 5Gbyte capacity


    *mag8  :  Car400   spool    3490 drive + 3480  media = 400Mbyte capacity
    *mag9  :  Car800   spool    3490 drive + 3490  media = 800Mbyte capacity
    *mag10 :  Car250   spool    3480 drive + 3480L media = 250Mbyte capacity
    *mag11 :  Car500   spool    3490 drive + 3480L media = 500Mbyte capacity
    *mag20 :  IBM30Gb  spool    3590 cartridge, 30Gbyte capacity
    *mag13 :  NTP10Gb  nospool    3590 cartridge, 10Gbyte capacity
    *mag12 :  DLT20Gb  nospool    DLT4000 + DLTTapeIV, native = 20Gbyte capacity
    *mag14 :  DLT35Gb  nospool    DLT7000 + DLTTapeIV, native = 35Gbyte capacity
    *mag19 :  DLT40Gb  nospool    DLT8000 + DLTTapeIV, native = 40Gbyte capacity
    *mag15 :  3590     spool    Gvt-segmented 3590;  10 x 0.8Gb segments = 10Gb
    *mag16 :  3590     spool    Gvt-segmented 3590;   5 x 1.6Gb segments = 10Gb
    *mag17 :  3590     spool    Gvt-segmented 3590E; 20 x 0.8Gb segments = 20Gb
    *mag18 :  3590     spool    Gvt-segmented 3590E; 10 x 1.6Gb segments = 20Gb


    #
    # This section tells dscand what are the DataSources
    #

    dscand*source : Stage0  ibm01   TY_STG ibm01   /stage0
    dscand*source : Stage0F  ibm01  TY_FLE ibm01   /stage0

    dscand*source : AVRdrives ibm01   TY_AVR ibm01  /tmp

    最后三行为修改后内容。
  5,修改lin.env为以下内容:
    setenv LM_LICENSE_FILE 2700@ibm01:7496@ibm01

  6,修改Net_list为以下内容:
    NODES    NETWORK  FMT
    123456789012345678901234567890
    LOCAL    LOCAL   IEEE
    ibm01    TCPIP   IEEE
    头三行为说明性文字,每列字符开始列数固定。
  7,修改/cgg/jobmgr/init/gvt_login中的下列内容:
    #================= SITE DEPENDANT PART 1  =========================#
    #-----> Adapt the following variables to your own site :
    setenv  gvr_root  /cgg     # Root for Geocluster installation  #
    setenv  proj_root /proj    # Project root directory      #
    setenv  LOGGER  ibm01    # Name of the logger machine    #
    setenv  SITE    JLWT  # JobManager site name (no space allowed) #
    setenv LM_LICENSE_FILE 7496@ibm01:/cgg/license/license.dat
    其中,SITE可以通过查看/cgg/license/license.dat许可得来。
  8,修改/cgg/license/license.dat中的VENDOR一行为:
    VENDOR cggflexd /sw/gct21/others_2100/FLEXLM72_2100/i86_r6/cggflexd
  9,创建链文件:
    ln -s /usr/pgi /PGI 以匹配gvt_login中的setenv PGI /PGI一行。
  10,把/cgg/jobmgr/init/下的gvt_cshrc和gvt_login分别拷贝为/home/cgg下的.cshrc和.login。
  11,修改/usr/local/flexlm72/license.dat中的DAEMON一行为:
    DAEMON pgroupd /PGI/linux86/bin/pgroupd
  12,在/PGI/linux86/share中建立文件:machines.LINUX,在其中添加:
    imb01:2
    并行处理时使用,其中2为CPU的个数,也可以理解为线程的个数。
  13,在/home下建一组目录:
    spool1 local1 scr1
    并把如下目录的主人改为geovect中的cgg。
    chown -R cgg:geovect cgg local1 proj scr1 spool1 stage0
    做链:
    ln -s /home/scr1 /scr1
    ln -s /home/spool1 /spool1
    ln -s /home/local1 /local1
  14,修改/etc/rc.local为:
    #!/bin/sh
    #
    # This script will be executed *after* all the other init scripts.
    # You can put your own initialization stuff in here if you don't
    # want to do the full Sys V style init stuff.
      /usr/local/flexlm72/lmgrd -c /usr/local/flexlm72/license.dat >/tmp/pgi.err
      /sw/gct21/others_2100/FLEXLM72_2100/i86_r6/lmgrd -c
        /cgg/license/license.dat   >/tmp/cgg.err
      touch /var/lock/subsys/local
    倒数第二三行为增加内容。
  15,修改/cgg/jogmgr/admin/gvrsetaccess的属主为cgg:geovect,属性为777。
  16,建/proj/9000/1006400,作为默认工区目录。
  17,拷贝/tcl-2000/bin/.gvtProject到/proj/9000/1006400
    修改其中的*Level一行为2100;
    Geovecteur*Home一行为ibm01:/proj/9000/1006400
  18,通过lmklog定义SITE等。
  19,配置sysctl.conf文件。
    增加如下一行:
    set shmsys:shminfo-sharemem...
 

转自:http://zetabeta.bokee.com/2373343.html
20楼2010-01-29 14:11:34
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 maomao1210 的主题更新
普通表情 高级回复(可上传附件)
信息提示
请填处理意见