• 【转】安装PGI到Fedora,WRF运行


    安装PGI到Fedora

    (2010-06-24 19:48:29)
    标签:

    it

    分类: LINUX

    (1)将文件pgilinux86-64-702.tar.gz下载到 /home/zhww的某一个目录下解压
    [sxk@localhost pgi707]$ tar -zxf pgilinux86-64-707.tar.gz
    [sxk@localhost pgi707]$ ls
    common install INSTALL.txt linux86 linux86-64 pgilinux86-64-707.tar.gz postinstall

    (2)编译并安装
    [sxk@localhost pgi707]$ su root     !需要用到root权限
    [root@localhost pgi707]# ./install
    Do you accept these terms? [accept,decline]
    accept
    Install the ACML? [y/n]
    n
    Installation directory? [/opt/pgi]
    /opt/pgi/

    Note: created directory /opt/pgi/
    Installation directory? [/opt/pgi]
    /opt/pgi/
    Note: created directory /opt/pgi/

    Installing software into /opt/pgi/ (this may take some time).
    ##########################
    Unknown glibc version (2.7); treating like 2.4
    ERROR: directory 安装:/usr/lib/gcc/i386-redhat-linux/4.1.2: not found;
    successful use of compilers requires existence of gcc libraries

    If you don't already have permanent keys for this product/release, a
    fifteen-day evaluation license can be created now.

    Create an evaluation license? [y/n]
    n
    Making symbolic links in /opt/pgi//linux86[-64]/7.0

    Do you want the files in the install directory to be read-only? [y,n]
    n
    Create an evaluation license? [y/n]
    n
    Do you want the files in the install directory to be read-only? [y,n]
    n
    Installation complete.

    If you purchased a software subscription, please note that the ST
    support services to you are limited to the terms described in the
    file /opt/pgi//SUBSCRIPTION_SERVICE. A copy of this file
    can be found at http://www.pgroup.com/support/SUBSCRIPTION_SERVICE.

    Please check the FAQ at http://www.pgroup.com/support/faq.htm for a
    current listing of customer support concerns, including installation,
    use of PGI software, and other questions or problems.

    This product uses the STLport Standard Template Library for ANSI C++.
    The STLport license can be found at http://www.stlport.com/doc/license.html.

    (3)用root用户把license.dat(在使用期范围的其他版本的license.dat也可以用)复制(cp)到/[/opt/pgi下

    (4)把以下几行放到/home/用户名/.bash_profile的最后

    export PGI=/usr/pgi
    export PATH=$PGI/linux86/7.0/bin:$PATH
    export MANPATH=$MANPATH:$PGI/linux86/man
    export LM_LICENSE_FILE=$PGI/license.dat
    export LD_LIBRARY_PATH=$PGI/linux86/7.0/lib:$LD_LIBRARY_PATH


    并执行:
    [root@localhost pgi707]# source /home/用户名/.bash_profile

    (5)测试PGI:
    [root@localhost pgi707]# pgf90
    pgf90-Warning-No files to process
    以上说明PGI安装成功!

    一、准备工作
    二、安装PGI编译器
    三、安装NetCDF
    四、安装NCARG
    五、安装 WRF-v2.2相关
    (1),安装 WRF
    (2),安装 WPS
    (3),安装 WRF-3DVAR

    一、 软件下载
    http://www.pgroup.com/support/downloads.phphttp://www.unidata.ucar.edu/down ... cdf-3_6_2/index.jsphttp://ngwww.ucar.edu/cgi/getsrc.cgi分别下载 pgilinux86-64-707.tar.gz(以及获得license.dat文件),netcdf.tar.gz(版本v3.6.2)和ncarg_src-4.4.2.tar.gz。

    http://www.mmm.ucar.edu/wrf/users/download/get_source.html注册下载wpsv2.2.tar.gz、wrfv2.2.tar.gz和 wrfvar.tar.gz(以及 3dvar_obsproc_v2.2beta.tar.gz、wrf_bc_v2.1.tar.gz和wrfvar-testdata.tar.gz)

    二、安装PGI编译器

    (1)将文件pgilinux86-64-707.tar.gz下载到/home/sxk/Download/pgi707目录下解压
    [sxk@localhost pgi707]$ tar -zxf pgilinux86-64-707.tar.gz
    [sxk@localhost pgi707]$ ls
    common install INSTALL.txt linux86 linux86-64 pgilinux86-64-707.tar.gz postinstall

    (2)编译并安装
    [sxk@localhost pgi707]$ su root
    [root@localhost pgi707]# ./install
    Do you accept these terms? [accept,decline]
    accept
    Install the ACML? [y/n]
    n
    Installation directory? [/usr/pgi]
    /usr/local/pgi
    Create an evaluation license? [y/n]
    n
    Do you want the files in the install directory to be read-only? [y,n]
    n

    (3)用root用户把license.dat(在使用期范围的其他版本的license.dat也可以用)复制(cp)到/usr/local/pgi 下

    (4)把以下几行放到/home/sxk/.bash_profile的最后
    export PGI=/usr/local/pgi/linux86/7.0-7
    export PATH=$PGI/bin:$PATH
    export MANPATH=$PGI/man:$MANPATH
    export LM_LICENSE_FILE=/usr/local/pgi/license.dat
    并执行:
    [root@localhost pgi707]# source /home/sxk/.bash_profile

    (5)测试PGI:
    [root@localhost pgi707]# pgf90
    pgf90-Warning-No files to process
    以上说明PGI安装成功!

    三、安装NetCDF

    (1)将文件netcdf.tar.gz下载到/home/sxk/Download/netcdf362下解压
    [sxk@localhost netcdf362]$ tar -zxf netcdf.tar.gz
    [sxk@localhost netcdf362]$ ls
    netcdf-3.6.2 netcdf.tar.gz

    (2)编译并安装
    [sxk@localhost netcdf362]$ cd netcdf-3.6.2/
    [sxk@localhost netcdf-3.6.2]$ su root
    [root@localhost netcdf-3.6.2]# mkdir /usr/local/netcdf/lib
    [root@localhost netcdf-3.6.2]# ./configure --prefix=/usr/local/netcdf FC=pgf90
    [root@localhost netcdf-3.6.2]# make
    [root@localhost netcdf-3.6.2]# make install

    (3)把以下几行放到/home/sxk/.bash_profile的最后
    export NETCDF=/usr/local/netcdf
    export PATH=$NETCDF/bin:$PATH
    并执行:
    [root@localhost netcdf-3.6.2]# source /home/sxk/.bash_profile
    这样NetCDF安装成功!

    四、安装NCARG

    (1)将文件ncarg_src-4.4.2.tar.gz下载到/home/sxk/Download/ncarg442下解压
    [sxk@localhost ncarg442]$ tar -zxf ncarg_src-4.4.2.tar.gz
    [sxk@localhost ncarg442]$ ls
    ncarg-4.4.2 ncarg_src-4.4.2.tar.gz

    (2)编译并安装
    [sxk@localhost ncarg442]$ cd ncarg-4.4.2/
    [sxk@localhost ncarg-4.4.2]$ cp config/LINUX.32.PGI config/LINUX
    [sxk@localhost ncarg-4.4.2]$ Configure -v
    安装到/usr/local/ncarg
    编译器pgf90
    [sxk@localhost ncarg-4.4.2]$ make Info
    [sxk@localhost ncarg-4.4.2]$ su root
    [root@localhost ncarg-4.4.2]# make Everthing >& make-output &
    [root@localhost ncarg-4.4.2]# tail -f make-output

    (3)把以下几行放到/home/sxk/.bash_profile的最后
    export NCARG_ROOT=/usr/local/ncarg
    export PATH=$NCARG_ROOT/bin:$PATH
    export MANPATH=$NCARG_ROOT/man:$MANPATH
    并执行:
    [root@localhost ncarg-4.4.2]# source /home/sxk/.bash_profile

    (4)检验
    [root@localhost ncarg-4.4.2]# ncargversion
    [root@localhost ncarg-4.4.2]# ncargex cpex08
    [root@localhost ncarg-4.4.2]# ctrans -d X11 cpex08.ncgm
    出现图片,ok

    五、安装 WRF相关

    (1)安装 WRF
    (1.1)将文件WRFV2.2.TAR.gz和WPSV2.2.TAR.gz在目录/home/sxk/home/wrf/wrf_model下解压,两个必须在同一目录下。
    [sxk@localhost wrf_model]$ tar -zxf WRFV2.2.TAR.gz
    [sxk@localhost wrf_model]$ tar -zxf WPSV2.2.TAR.gz
    [sxk@localhost wrf_model]$ ls
    WPS WPSV2.2.TAR.gz WRFV2 WRFV2.2.TAR.gz

    (1.2)安装
    [sxk@localhost wrf_model]$ cd WRFV2
    [sxk@localhost WRFV2]$ ./configure
    1
    [sxk@localhost WRFV2]$ ls -il configure.wrf
    8749977 -rw-rw-r-- 1 sxk sxk 10232 10-12 19:14 configure.wrf
    [sxk@localhost WRFV2]$ ./compile em_real
    [sxk@localhost WRFV2]$ ls -il main/real.exe main/wrf.exe main/ndown.exe main/nup.exe
    8750704 -rwxrwxr-x 1 sxk sxk 9519150 10-12 19:23 main/ndown.exe
    6127617 -rwxrwxr-x 1 sxk sxk 9467406 10-12 19:23 main/nup.exe
    8750691 -rwxrwxr-x 1 sxk sxk 8347789 10-12 19:23 main/real.exe
    8750689 -rwxrwxr-x 1 sxk sxk 9198294 10-12 19:22 main/wrf.exe

    (2)安装WPS
    (2.1)修改默认设置
    [sxk@localhost WPS]$ vi arch/configure.defaults
    修改为
    ###########################################################
    #ARCH PC Linux i486 i586 i686, PGI compiler serial, NO GRIB2
    #
    ........
    NCARG_LIBS2 = -L${PGI}/linux86/7.0-7/lib -lpgftnrtl -lpgc \
    -L/usr/lib/gcc/i386-redhat-linux/4.1.2 -lgcc

    ###########################################################
    [sxk@localhost WPS]$ vi arch/preamble
    修改为
    ......
    NCARG_LIBS = -L$(NCARG_ROOT)/lib -lncarg -lncarg_gks -lncarg_c \
    -L/usr/lib -lX11
    ......

    (2.2)安装
    [sxk@localhost WPS]$ ./configure
    1
    [sxk@localhost WPS]$ ls -il configure.wps
    8880179 -rw-rw-r-- 1 sxk sxk 2532 10-12 23:10 configure.wps
    [sxk@localhost WPS]$ ./compile
    [sxk@localhost WPS]$ ls -il geogrid.exe ungrib.exe metgrid.exe
    8880729 lrwxrwxrwx 1 sxk sxk 23 10-12 23:11 geogrid.exe -> geogrid/src/geogrid.exe
    8880964 lrwxrwxrwx 1 sxk sxk 23 10-12 23:11 metgrid.exe -> metgrid/src/metgrid.exe
    8880911 lrwxrwxrwx 1 sxk sxk 21 10-12 23:11 ungrib.exe -> ungrib/src/ungrib.exe

    (3)安装 WRF-3DVAR
    (3.1)将文件 wrfvar_v2.2beta.tar.gz,3DVAR_OBSPROC_v2.2beta.tar.gz,WRF_BC_v2.1.tar.gz和 wrfvar-testdata.tar.gz在目录/home/sxk/home/wrf/wrf_var_code_and_test_data下解压,
    [sxk@localhost wrf_var_code_and_test_data]$ tar -zxf wrfvar_v2.2beta.tar.gz
    [sxk@localhost wrf_var_code_and_test_data]$ tar -zxf 3DVAR_OBSPROC_v2.2beta.tar.gz
    [sxk@localhost wrf_var_code_and_test_data]$ tar -zxf WRF_BC_v2.1.tar.gz
    [sxk@localhost wrf_var_code_and_test_data]$ tar -zxf wrfvar-testdata.tar.gz
    [sxk@localhost wrf_var_code_and_test_data]$ ls
    3DVAR_OBSPROC be.cv_3 obs_gts.3dvar.2003010112 wrfbdy_d01.2003010112 wrfvar-testdata.tar.gz
    3DVAR_OBSPROC_v2.2beta.tar.gz be.cv_5 WRF_BC_v2.1 wrfinput_d01.2003010112 wrfvar_v2.2beta
    be.cv_2 ob.little_r WRF_BC_v2.1.tar.gz wrf-var wrfvar_v2.2beta.tar.gz

    (3.2)安装
    [sxk@localhost wrf_var_code_and_test_data]$ cd 3DVAR_OBSPROC
    [sxk@localhost 3DVAR_OBSPROC]$ make
    [sxk@localhost 3DVAR_OBSPROC]$ ls -il 3dvar_obs.exe
    8489976 lrwxrwxrwx 1 sxk sxk 17 10-08 21:37 3dvar_obs.exe -> src/3dvar_obs.exe
    [sxk@localhost 3DVAR_OBSPROC]$ cd ../wrfvar_v2.2beta
    [sxk@localhost wrfvar_v2.2beta]$ ./configure var
    1
    [sxk@localhost wrfvar_v2.2beta]$ ls -il configure.wrf
    8718200 -rw-rw-r-- 1 sxk sxk 8067 10-09 23:27 configure.wrf
    [sxk@localhost wrfvar_v2.2beta]$ ./compile var
    [sxk@localhost wrfvar_v2.2beta]$ ls -il main/wrfvar.exe
    8718773 -rwxrwxr-x 1 sxk sxk 10287064 10-09 23:40 main/wrfvar.exe
    [sxk@localhost wrfvar_v2.2beta]$ cd ../WRF_BC_v2.1
    [sxk@localhost WRF_BC_v2.1]$ make
    [sxk@localhost WRF_BC_v2.1]$ ls -il update_wrf_bc.exe
    8880168 lrwxrwxrwx 1 sxk sxk 21 10-10 01:32 update_wrf_bc.exe -> src/update_wrf_bc.exe
  • 相关阅读:
    ejs不能读取js变量??????
    技术架构
    测试框架那些事儿
    如何跨团队带项目?
    自定义网址导航站-聚享导航
    vue+node+mongodb前后端分离博客系统
    聚享导航chrome插件发布
    NuxtJS实战,一个博客系统
    Essay3.0发布,基于JavaScript的前后端同构博客系统
    小程序开发中的一些坑和技巧
  • 原文地址:https://www.cnblogs.com/HOUST/p/2980411.html
Copyright © 2020-2023  润新知