Windows subsystem Ubuntu 18.04LTS + Intel(R) Parallel Studio XE 2015 for Linux* OS + NetCDF

Windows subsystem Ubuntu 18.04LTS + Intel® Parallel Studio XE 2015 for Linux* OS + NetCDF 4.2 above Failed at the HDF5 build

@尝试在Windows subsystem Linux环境下搭建基于Intel Fortran+Netcdf 的高性能计算环境

Step one:在Microsoft Store里面搜索ubtuntu,安装最新版本18.04LTS,主要考虑是不懂底层架构,先用免费的试试,如果不行再考虑上付费版Centos。装好之后,记得给linux环境启动权限,请自行搜索。
Reference:https://www.jianshu.com/p/1da2ef53497e 或者
https://blog.csdn.net/wuermohuang/article/details/79983165
完事之后,用apt-get命令安装常用的GNU命令(如果which找不到),以及安装gcc、g++编译器和build-essential,m4(必须)。

Step two:购买或者通过其他渠道获得Intel® Parallel Studio XE(我用的是2015版本),解压之后通过sh install.sh命令安装套件,GUI没试。根据提示可能还需要安装依赖,我最后实在缺少lib32和libpython的情况下安装,所有编译器和套件均提示Unsupported OS,忽略继续。以sudo方式安装,过程中需要指定安装目录,通常是opt/intel***,另外还需要激活,激活方式因人而异。安装完成之后在~/.bashrc文件中加入source opt/intel***/composer_xe_20XX.版本号/bin/compilervars.sh intel64。执行source ~/.bashrc,which ifort测试环境变量,然后,写个简单的fortran程序测试,应是一把过。

Step Three:下载zlib、hdf5、netcdf-c和netcdf-fortan,解压之后顺序安装,我不需要netcdf的远程功能,因此不需要dap模块,也就没有下载curl。安装步骤网上一堆,请自行搜索。
Reference:https://blog.csdn.net/schumacher2016/article/details/80850240或者
https://www.unidata.ucar.edu/software/netcdf/docs/getting_and_building_netcdf.html

Failed Here:zlib安装成功之后安装hdf5(所有依赖均安装在$NC_PATH目录),

export NC_PATH=/opt/netcdf/  #your zlib directory as well as your planed nc dir
export CC=icc
export FC=ifort
./configure --prefix=$NC_PATH --with-zlib=$NC_PATH --enable-fortran
make

错误提示:

...:error:identifier "_LIB_VERSION_TYPE" is undefined _LIBIMF_EXT...

百度直接搜,得到intel官网的回复:请在intel推荐并测试过的系统中使用intel编译器(https://software.intel.com/en-us/forums/intel-c-compiler/topic/760979)!!!按照论坛后面的回复,尝试了两种dirty methods,make可以通过,然而make check还是不行,强行sudo make install。然鹅,在安装netcdf-c时,提示不能使用netcdf-4的功能,因为high-level hdf5-malfunction。。。(如果确实修改了intel/***/math.h文件,建议完事改回去或者做好标记,免得时间长了忘了!)

不死心啊,再搜,搜到了下帖:不兼容!!!
Ubuntu 18.04 与Intel parallel studio 2015 不兼容(事实上 除了2018update4 以及2019 update1 以及其以后的版本,其他的老版本都有这个问题),原因是libc-2.7更改了很多东西glibc 2.27 removed the ‘_LIB_VERSION_TYPE’ enum。

那么解决办法有两个,一是回退到1604去编译安装,我当时就是这么做的;二是安装最新编译器2018update4 或2019 update1 。

其他搜到的内容也都提示版本问题:https://software.intel.com/zh-cn/node/777990

搞了三天,人已经疲了!
版本问题,后续再战,收拾心情,准备过年。

老铁们,春节快乐!

发布了1 篇原创文章 · 获赞 0 · 访问量 74

猜你喜欢

转载自blog.csdn.net/weixin_41657302/article/details/104068671