当前位置: 首页 > 第一原理 >help---------openmpi

help---------openmpi

作者 板桥霜
来源: 小木虫 1300 26 举报帖子
+关注

hello every, I've got some problems when I try to compile hello_c.c, one sample of openmpi1.8 examples, the  messages are here:
./Makefile hello_c.c
./Makefile: line 27: CC: command not found
./Makefile: line 28: CXX: command not found
./Makefile: line 29: CCC: command not found
./Makefile: line 30: FC: command not found
./Makefile: line 31: JAVAC: command not found
./Makefile: line 32: SHMEMCC: command not found
./Makefile: line 33: SHMEMFC: command not found
./Makefile: line 40: CFLAGS: command not found
./Makefile: line 41: CXXFLAGS: command not found
./Makefile: line 42: CCFLAGS: command not found
./Makefile: line 43: FCFLAGS: command not found
./Makefile: line 47: EXAMPLES: command not found
./Makefile: line 70: all:: command not found
./Makefile: line 71: syntax error near unexpected token `then'
./Makefile: line 71: `        @ if which ompi_info >/dev/null 2>&1 ; then \'
[root@lab-host examples]# which mpicc
/home/han/program/openmpi/bin/mpicc
I have add the path of mpicc, mpic++ and mifort to PATH, what should I do?
Thanks alot 返回小木虫查看更多

今日热帖
  • 精华评论
  • 板桥霜

    waiting online..............

  • liliangfang

    在root下试试
    yum install gcc*

  • 板桥霜

    引用回帖:
    3楼: Originally posted by liliangfang at 2014-08-29 07:54:58
    在root下试试
    yum install gcc*

    I've tried using root, still wrong.
    and it's not about gcc, cause
    $ rpm -qa |grep gcc
    gcc-c++-4.4.6-3.el6.i686
    gcc-gfortran-4.4.6-3.el6.i686
    gcc-4.4.6-3.el6.i686
    libgcc-4.4.6-3.el6.i686
    The program was complied with icc, ifort
    thanks anyway~
    ==================================================
    The work was carried out in a cluster composed of 1 server(lib-host), 2 nodes(lib-p1 and lib-p2).
    NFS, NIS, RSH, and ip ruls were set up.
    now,  when I login the server as user (username han):
    [han@lab-host ~]$ which mpicc
    ~/program/openmpi/bin/mpicc
    [han@lab-host ~]$ which mpic++
    ~/program/openmpi/bin/mpic++
    [han@lab-host ~]$ which mpifort
    ~/program/openmpi/bin/mpifort
    [han@lab-host ~]$ which mpiexec
    ~/program/openmpi/bin/mpiexec
    [han@lab-host ~]$ which mpirun
    ~/program/openmpi/bin/mpirun
    ===================================
    I can locate the file here:
    [han@lab-host ~]$ locate libsvml.so
    /home/han/program/icc/composer_xe_2013_sp1.2.144/compiler/lib/ia32/libsvml.so
    ===================================
    but when I log in the node , sth was wrong:

    the program of "which " was correct
    [han@lab-host ~]$ locate libsvml.so
    /home/han/program/icc/composer_xe_2013_sp1.2.144/compiler/lib/ia32/libsvml.so
    ======================================
    when I use the program of "locate"
    [han@lab-p1 ~]$ locate libsvml.so
    [han@lab-p1 ~]$
    nothing was located
    the enveriment variables of PATH, LD_LIBARARY_PATH was added. what' wrong with my cluster.....


    thank you

  • liqizuiyang

    It seems that the corresponding environmental variables are not correctly set. You may set them by "export CC=icc" "export CXX=icpc" etc. .

    Anyway, there is no need to bother running the examples distributed along with the source code. Just try the testsuite by "make test". If it passes all the tests, then the compilation is successful.

    It happened to me that openmpi with version number > 1.6.4 did not work well. On the contrary, the 1.6.4 version was proved to very robust. In fact, all the computers in our group employ this version.

  • 板桥霜

    引用回帖:
    5楼: Originally posted by liqizuiyang at 2014-08-29 09:24:41
    It seems that the corresponding environmental variables are not correctly set. You may set them by "export CC=icc" "export CXX=icpc" etc. .

    Anyway, there is no need to bother r ...

    [han@lab-host examples]$ make test
    make: *** No rule to make target `test'.  Stop.
    [han@lab-host examples]$

  • 板桥霜

    引用回帖:
    7楼: Originally posted by busstop at 2014-08-30 10:58:39
    5L已经指出问题了,应该是楼主环境变量没设好。
    export PATH=……/bin:$PATH
    export LD_LIBRARY_PATH=……/lib:$LD_LIBRARY_PATH
    export LD_LIBRARY_PATH=……/lib/openmpi:$LD_LIBRARY_PATH
    lz,2、3行填了么 ...

    [han@lab-host examples]$ echo $PATH
    /home/han/program/icc/bin:/home/han/program/openmpi/bin:/home/han/program/openmpi/bin:/home/han/program/icc/bin:/usr/lib/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/han/bin
    [han@lab-host examples]$ echo $LD_LIBRARY_PATH
    /home/han/program/icc/lib/ia32:/home/han/program/icc/composer_xe_2013_sp1.2.144/compiler/lib/ia32:/home/han/program/openmpi/lib:/home/han/program/icc/lib/ia32:/home/han/program/openmpi/lib:
    These are my environmental variables.............

猜你喜欢
下载小木虫APP
与700万科研达人随时交流
  • 二维码
  • IOS
  • 安卓