Ubuntu12.04安装OmpSs环境

来源:互联网 发布:电动机绕组数据大全 编辑:程序博客网 时间:2024/06/06 03:55

此篇博客是接着上两篇的内容

目的是为了实现OmpSs环境以及DLB环境的搭建

前两篇的内容在这里

分别是关于在NVIDIA双显卡环境下ubuntu12.04的CUDA以及OpenCL的搭建方法

地址在这里

http://blog.csdn.net/xianbt/article/details/18871851

http://blog.csdn.net/xianbt/article/details/18894597 



为了实现DLB的搭建,我们需要

MPI+OmpSS环境


现在先开始安装OpenMPI

看了看README

发现可以先安装hwloc,所以我先安装了hwloc-1.4.2

./configure --prefix=/usr/local/hwloc-1.4.2

make

make install


现在开始安装OpenMPI

www.open-mpi.org/software/ompi/v1.6/ 

下载源码包


./configure --prefix=/usr/local/openmpi-1.6.5 --with-hwloc=/usr/local/hwloc-1.4.2

make

make install


然后配置一下环境变量就可以使用了

在~/.bashrc中加上这这个命令


export OPENMPI=/usr/local/openmpi-1.6.5

export LD_LIBRARY_PATH=$OPENMPI/lib:$LD_LIBRARY_PATH


export PATH=$OPENMPI/bin:$PATH

然后执行source ~/.bashrc

注意在root和你自己的用户中的bashrc中都要加上才好


安装好了以后

现在测试一下是不是能用

cd example

make

mpirun -np 4 hello_c

可以看到程序正常执行了


到这里OpenMPI安装成功


接下来就是比较困难的了

要安装OMPSs

这里主要是按照这个网站进行配置的

http://pm.bsc.es/ompss-docs/user-guide/installation.html#installation-of-nanos 

首先下载需要的安装包


首先安装extrace

下载安装包

http://www.bsc.es/computer-sciences/performance-tools/downloads 


并且编译,在这里会遇到非常多的依赖问题

成功了最好

不成功也不影响下面的继续安装


这里是一些依赖关系

Dependencies: libxml2 2.5.0; libunwind for linux x86/x86-64/ia64/ARM.

Optional: PAPI; DynInst; liberty and libbfd; MPI; OpenMP

先安装

libunwind


./configure --prefix=/usr/local/libunwind-1.1
make

make install


再安装libxml2 2.5.0

apt-get install libxml2

接下来安装

dyninst

这个的安装可以安装这个

apt-get isntall vargrind

其它的都不用安装了


是这样配置的

./configure --prefix=$TARGET --without-papi --without-liberty --without-libbfd --without-openmp --with-mpi=/usr/local/openmpi-1.6.5 --without-libz --with-unwind=/usr/local/libunwind-1.1 --without-dyninst --with-cuda=/usr/local/cuda-5.5 --with-opencl-include=/usr/include/CL --with-opencl-lib=/usr/lib --with-hwloc=/usr/local/hwloc-1.4.2


make

make install


不出意外是可以成功的

但是配置有问题,说是没找到xml2-config

所以

再安装

apt-get install xml

apt-get install libxml2-dev

再进行一次配置

又出问题了

说是要安装这个

apt-get install binutils-dev

再进行一次配置

最后的配置结果


Package configuration for Extrae 2.4.1:
-----------------------
Installation prefix: /usr/local/ompss
Cross compilation: no
CC: gcc
CXX: g++
Binary type: 64 bits

MPI instrumentation: yes
    MPI home: /usr/local/openmpi-1.6.5
    Fortran decoration: 0 underscores
    peruse available? no
    mixed C/Fortran libraries? no
    shared libraries? yes
    1-sided operations? yes
    MPI I/O operations? yes
PACX instrumentation: no
OpenMP instrumentation: yes
pThread instrumentation: yes
CUDA instrumentation: yes, through LD_PRELOAD
    CUDA home : /usr/local/cuda-5.5
OpenCL instrumentation: no

Performance counters at instrumentation: no

libbfd available: yes (/usr)
libiberty available: yes (/usr)
zlib available: no
libxml2 available: yes (/usr)
BOOST available: no
callstack access: through libunwind (/usr/local/libunwind-1.1)

Dynamic instrumentation: no

Optional features:
------------------
On-line analysis: no
Clock routine: POSIX / clock_gettime, library in /lib/x86_64-linux-gnu/librt-2.15.so
Heterogeneous support: no
Parallel merge: yes


然后

make


但是make这里出了问题

大概原因是

这里/usr/lib/libmpi.so这些库用不了了,所以我们需要重新把他们链接到/usr/local/openmpi-1.6.5/lib里面

的libmpi.so文件上,对应修改一下就好了

修改了一下,现在又可以继续编译了,以后再遇到有关

/usr/lib/libmpi.so等这些问题的时候就到这里来更改就好了

make成功后

执行

make install


到这里就安装成功了extrace

然后是安装

nanos++

注意安装extrace成功以后在接下来的安装中不要忘记传递这个

flags

--with-extrace=$TARGET


首先确定一下环境要求

主要是确定有cuda

按照下面的步骤进行配置


./configure --prefix=$TARGET --with-extrae=$TARGET --with-cuda=/usr/local/cuda-5.5 --with-opencl-include=/usr/include/CL --with-opencl-lib=/usr/lib --with-hwloc=/usr/local/hwloc-1.4.2

make

make install

到此

nanos++也安装成功了


现在开始安装mercurium


首先看看是否满足环境要求


首先安装

apt-get install bison

apt-get install flex

apt-get install gperf

apt-get install sqlite3

apt-get install libsqlite3-dev


现在开始安装mercurium

./configure --prefix=$TARGET --enable-ompss --with-nanox=$TARGET  --enable-nanox-fpga-device  --with-nanox=$TARGET --with-cuda=/usr/local/cuda-5.5 --with-mpi=/usr/local/openmpi-1.6.5


错误提示:

configure: error: Fortran compiler not found


安装

apt-get install fortran-compiler

apt-get install git

再配置

配置结果如下


 * Tools configured:

   Flex : flex
   GNU bison : bison
   GNU gperf : gperf
   git content tracker: (not found)
   SQLite 3 cflags:  
   SQLite 3 libs: -lsqlite3  
   nVidia CUDA compiler : /usr/local/cuda/bin/nvcc
   Intel C compiler: (not found)
   Intel C++ compiler: (not found)
   Intel Fortran compiler: (not found)
   IBM XL C compiler : (not found)
   IBM XL C++ compiler : (not found)
   IBM XL Fortran compiler : (not found)

 * Default type environment :  linux-x86_64

   Host supports __float128 and quadmath.h :  yes
   Host supports __int128 :  yes
   SIMD Support:  SSE4.2 (SVML not detected)
   Intel Xeon Phi compilation support:  no
   Intel Xeon Phi remote device used for testing:  no

   Fortran tests enabled:  yes

 * TL Examples will be built : no

 * Nanos++ OpenMP : yes

   Nanos++ includes : /usr/local/ompss/include/nanox
   Nanos++ libraries: /usr/local/ompss/lib
   Nanos++ tests regions support:

 * Intel OpenMP RTL : no

   MPI testing enabled: no
   GPU testing enabled: yes
   OpenCL testing enabled: yes

 * OpenMP static profile mode:  no

 * Optional phases :

   Vectorization build and install disabled
   Analysis build and install enabled

make

make install

修改一些环境变量

export  $PATH=$TARGET/bin:$PATH

source ~/.bashrc

对root和自己用户都执行一次就可以了


最后还有DLB的安装


 ./configure --with-mpi=/usr/local/openmpi-1.6.5 --prefix=/usr/local/dlb-1.0 --with-hwloc=/usr/local/hwloc-1.4.2

这里hwloc是必须的

DLB 1.0 configuration summary
=============================

 Installation prefix       : /usr/local/dlb-1.0
 Debug version             : yes
 Instrumentation version   : yes
 Instr + debug version     : yes

 Extra Packages:
 * MPI CONFIGURED: yes
    MPI home: /usr/local/openmpi-1.6.5
    MPI includes: /usr/local/openmpi-1.6.5/include
    MPI libs: /usr/local/openmpi-1.6.5/lib, -lmpi
 * HWLOC CONFIGURED: yes
    HWLOC home: /usr/local/hwloc-1.4.2
    HWLOC includes: /usr/local/hwloc-1.4.2/include
    HWLOC libs: /usr/local/hwloc-1.4.2/lib, -lhwloc




make

make install


到这里就算安装完成了,关于环境测试明天再进行



0 0
原创粉丝点击