分享

ifort 安装

 day_day__UP 2014-12-16


以安装ifort(l_cprof_p_11.1.072_intel64.tgz)为例:

1、将l_cprof_p_11.1.072_intel64.tgzh和*.lic文件拷到一个临时的目录里面(如:tem)
2、解压文件:$tar -zxvf  l_cprof_p_11.1.072_intel64.tgz
3. 进入解压后的目录:$cd             l_cprof_p_11.1.072
4. 启动安装:$./install.sh

(这个过程中若是提示Your system is protected with Security-enhanced Linux (SELinux),只需进入/etc/sysconfig/selinux 让SELINUX=enforcing变为SELINUX=permissive)

5.其他,看提示即可,注意第四步
Step no: 4 of 7 | Installation configuration - Missing Critical Pre-requisite
--------------------------------------------------------------------------------
There is one or more critical unresolved issue which prevents installation to
continue. You can fix it without exiting from the installation and re-check. Or
you can quit from the installation, fix it and run the installation again.
--------------------------------------------------------------------------------
Missing critical pre-requisite
-- missing system commands
--------------------------------------------------------------------------------
    1. Show the detailed info about issue(s) [default]
    2. Re-check the pre-requisites

    h. Help
    b. Back to the previous menu
    q. Quit
--------------------------------------------------------------------------------
Please type a selection or press "Enter" to accept default choice [1]: 1


Step no: 4 of 7 | Installation configuration - Missing Critical Pre-requisite
--------------------------------------------------------------------------------
The following required for installation commands are missing:
libstdc++.so.5 (library)
--------------------------------------------------------------------------------
    1. Finish with prerequisites and back to Critical Pre-requisites dialog
[default]
    2. Back to Pre-requisite summary dialog

    h. Help
    b. Back to the previous menu
    q. Quit
--------------------------------------------------------------------------------
Please type a selection or press "Enter" to accept default choice [1]:Sample Text

解决办法是:
     我的系统是fedora13,下载compat-libstdc++-33-3.2.3-68.i686.rpm
大家根据自己的系统下载对应的程序包!下载地址:http:///linux/rpm2html/search.php?query=libstdc+ +.so.5
  安装ifort完成,
但在环境设置后又出现问题:找不到ifort命令
[xxxx@xxx]$ vi .bashrc
//添加source /opt/intel/Compiler/11.1/072/bin/ifortvars.sh
          有的说在上面后加ia32也不行
[xxxx@xxx]$ ifort
命令没有找到

有尝试网上的其他方法,没改动vi .bashrc,改动了vi /home/bjwang/bash_profile,发现是个新文件,就直接改了
保存:   ./opt/intel/Compiler/11.1/072/bin/ifortvars.sh intel64
$ ifort
ifort: command line error: no files specified; for help type "ifort -help"


是不是说明成功了呢?还可怎么验证呢?
执行命令$ifort-v
[xxxx@xxx]$ ifort -v
Version 11.1

####################################################
在suse LED 11下编译,
1.若出现
    The following required for installation commands are missing:
libstdc++.so.5 (library)
安装suse自带libstdc++33即可,方法:计算机》》》“安装软件”》》搜索libstdc,找到安装之;

2.若出现
Missing optional pre-requisite
No compatible Java* Runtime Environment (JRE) found
-- operating system type is not supported.
-- system glibc or kernel version not supported or not detectable
-- binutils version not supported or not detectable
//////////////////////////////////////////////////////////////////////////////////////////////////////////
缺少可选的先决条件
*不兼容的Java运行时环境(JRE)的发现
- 操作系统类型不支持。
- 系统的内核版本的glibc或者不支持或不得检出
- binutils的版本不支持或不得检出
方法:
    无视之,看提示,直接安装!!!!!!!!!!!!!
3.环境设置
[xxxx@xxx]$ vi .bashrc
//添加source /home/bjwang/intel/Compiler/11.1/072/bin/ifortvars.sh ia32
有人用intel64 代替ia32,看系统/机子吧!!,不行两个都试一试。

4记住:最后为了是设置起作用 执行 [xxxx@xxx]$ source .bashrc
      而每改动一次都要source .bashrc一次;

  5..验证
$ ifort
ifort: command line error: no files specified; for help type "ifort -he
测试,which ifort,会显示安装路径。。。。。。

编辑个简单的hello.f90程序,文本如下:
program main
write(*,*) "hello"
stop
end
编译执行
ifort -o hello hello.f90
出现一个hello的文件
运行./hello 结果出来了!

再算个平均值和开方(pj.f90)
PROGRAM Example_1_1
      REAL a, b, av1, av2
      READ (*,*) a, b
      av1 = (a + b)/2
      av2 = sqrt(a*b)
      WRITE(*,*) av1, av2
      END

xxx@linux-xx16:~/tem> ifort -o pj pj.f90
xxx@linux-xx16:~/tem> ./pj
45 69
   57.00000       55.72253
成功!!!!!!!!!!!

6.卸载:$/home/bjwang/intel/Compile/11.1.072/bin/intel64/./uninstall_cpof.sh       -----ifort11
或$/home/bjwang/intel/fce/10.1.012/bin/ ./uninstall.sh     -----ifort10

1.

下载编辑器,为了方便大家使用建议大家使用我提供的下载链接,如果你不放心也可以去官方下载。

32位版本

64位版本

官方下载链接:https://registrationcenter.intel.com/regcenter/register.aspx

2.

如果你不想注册,可以用我下面提供的序列号 (后面安装过程需要用到):

NC5M-DTMCVD69

3.

解压缩并进入解压的文件夹 :

tar xzvf  ***.tgz   (***是你所下载的编辑器名)

4.

OK,进入root用户开始安装

sudo -i

./install.sh

按照提示一路回车即可(并按提示安装相关软件包,如g++等,安装方式:sudo apt-get install g++).

5.

Ubuntu9.04以及以前的版本可以一路回车下来基本不会出问题,但之后的版本将会遇到 libstdc++5安装不上的问题,原因在于新的系统已升级到libstdc++6,自行安装自是不可行,不急,我可以提供给你。

compat-libstdc++-33_3.2.3-48.3_i386.deb

下载完毕后运行

sudo dpkg -i  compat-libstdc++-33_3.2.3-48.3_i386.deb

6.

安装后退出,再编辑一下 .bashrc

vi ~/.bashrc

在最后一行加入下面语句

(64位)

source /opt/intel/Compiler/11.0/084/bin/ifortvars.sh intel64

(32位)

source /opt/intel/Compiler/11.1/072/bin/ifortvars.sh ia32(我装的是12.00 所以路径要自己该过来)

保存退出。

7.

source ~/.bashrc

Enjoy !



    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多