Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Groups
    • Search
    • 官网
    1. Home
    2. xuhui
    3. Posts
    X
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by xuhui

    • RE: C++链接xMath出错

      你这个很可能是因为在链接的时候没有加上xMath库?

      posted in 语言编译
      X
      xuhui
    • RE: C++链接xMath出错

      之前代码中,我指定了xMath的路径寻找路径,从而导致了上述错误。正确的使用xMath应该让系统自己寻找合适的xMath库。

      经过超算中心老师的指导,我把提交程序修改为

      # prepare
      clear
      rm *.o
      rm test_xMath
      
      # compile master core program
      sw5cc -host -c cg.c
      sw5cc -host -c spmv.c
      sw5cc -host -c cg.c
      sw5cc -host -c SunwayAthread.c
      sw5CC -host -c main.cpp
      
      # link
      # xMath path should not be assigned, should automatically find by system
      mpic++ -hybrid -o test_xMath main.o cg.o spmv.o SunwayAthread.o -lxMath_manycore -lfortran -lffio
      
      # submit
      bsub -I -b -N 1 -q q_sw_expr -cgsp 64 ./test_xMath
      

      就可以解决问题。

      posted in 语言编译
      X
      xuhui
    • RE: 在psn上使用VSCode Remote

      太赞了!!!感谢大佬。

      posted in 技术交流区
      X
      xuhui
    • C++链接xMath出错

      老师好:
      我已经看到了有关于xMath出错的讨论。

      • http://bbs.nsccwx.cn/topic/278/请问如何在c-的代码中链接xmath库

      我也想用链接xMath和我的C++程序,但是使用上述链接的办法不能正常使用。

      尝试1

      命令

      sw5cc -hybrid -o test_xMath main.o cg.o spmv.o SunwayAthread.o -L ${xMath_path} -lxMath -lstdc++
      

      报错

      /usr/sw-mpp/swcc/sw5gcc-binary/lib/libxMath.a(dcg_check.o): In function `dcg_check':/home/export/online1/systest/swzky/ABC123/xMath_manycore_v1.0/src/sparse_manycore/dcg_check.f:18: undefined reference to `_OPEN'
      :/home/export/online1/systest/swzky/ABC123/xMath_manycore_v1.0/src/sparse_manycore/dcg_check.f:18: undefined reference to `_OPEN'
      :/home/export/online1/systest/swzky/ABC123/xMath_manycore_v1.0/src/sparse_manycore/dcg_check.f:37: undefined reference to `_FWF'
      :/home/export/online1/systest/swzky/ABC123/xMath_manycore_v1.0/src/sparse_manycore/dcg_check.f:37: undefined reference to `_FWF'
      :/home/export/online1/systest/swzky/ABC123/xMath_manycore_v1.0/src/sparse_manycore/dcg_check.f:40: undefined reference to `_FWF'
      :/home/export/online1/systest/swzky/ABC123/xMath_manycore_v1.0/src/sparse_manycore/dcg_check.f:40: undefined reference to `_FWF'
      :/home/export/online1/systest/swzky/ABC123/xMath_manycore_v1.0/src/sparse_manycore/dcg_check.f:41: undefined reference to `_FWF'
      /usr/sw-mpp/swcc/sw5gcc-binary/lib/libxMath.a(dcg_check.o):/home/export/online1/systest/swzky/ABC123/xMath_manycore_v1.0/src/sparse_manycore/dcg_check.f:41: more undefined references to `_FWF' follow
      collect2: ld returned 1 exit status
      

      尝试2

      命令

      sw5cc -hybrid -o test_xMath main.o cg.o spmv.o SunwayAthread.o -L ${xMath_path} -lxMath -lstdc++ -lffio -lfortran
      

      报错

      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(opn.o): In function `findmatch': undefined reference to `_string_cmp'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(opn.o): In function `findmatch': undefined reference to `_string_cmp'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(opn.o): In function `__OPN': undefined reference to `__io_byteswap'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(opn.o): In function `__OPN': undefined reference to `__io_byteswap'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(wf90.o): In function `_FWF': undefined reference to `_string_cmp'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(wf90.o): In function `_FWF': undefined reference to `_string_cmp'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(wf90.o): In function `_FWF': undefined reference to `_string_cmp'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(wf90.o): In function `_FWF': undefined reference to `_string_cmp'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(wrfmt.o): In function `_wrfmt': undefined reference to `_unpack'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(wrfmt.o): In function `_wrfmt': undefined reference to `_unpack'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(wrfmt.o): In function `_wrfmt': undefined reference to `_unpack'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(wrfmt.o): In function `_wrfmt': undefined reference to `_unpack'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(wrfmt.o): In function `_wrfmt': undefined reference to `_unpack'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(wrfmt.o): more undefined references to `_unpack' follow
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(ferror.o): In function `_ferr': undefined reference to `_lmessage'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(ferror.o): In function `_ferr': undefined reference to `_lmessage'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(getdcparam.o): In function `_get_dc_param': undefined reference to `__fndc_ncfunc'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(getdcparam.o): In function `_get_dc_param': undefined reference to `__fndc_f77sz'
      ...
      

      尝试3

      命令

      sw5CC -hybrid -o test_xMath main.o cg.o spmv.o SunwayAthread.o -L ${xMath_path} -lxMath -lstdc++ -lffio -lfortran
      

      报错

      CC ERROR: cannot exec /usr/sw-mpp/swcc/sw5gcc-binary/bin/sw5g++: No such file or directory
      

      尝试4

      命令:

      mpiCC -hybrid -o test_xMath main.o cg.o spmv.o SunwayAthread.o -L ${xMath_path} -lxMath -lstdc++ -lffio -lfortran
      

      报错:

      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(opn.o): In function `findmatch': undefined reference to `_string_cmp'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(opn.o): In function `findmatch': undefined reference to `_string_cmp'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(opn.o): In function `__OPN': undefined reference to `__io_byteswap'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(opn.o): In function `__OPN': undefined reference to `__io_byteswap'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(wf90.o): In function `_FWF': undefined reference to `_string_cmp'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(wf90.o): In function `_FWF': undefined reference to `_string_cmp'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(wf90.o): In function `_FWF': undefined reference to `_string_cmp'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(wf90.o): In function `_FWF': undefined reference to `_string_cmp'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(wrfmt.o): In function `_wrfmt': undefined reference to `_unpack'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(wrfmt.o): In function `_wrfmt': undefined reference to `_unpack'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(wrfmt.o): In function `_wrfmt': undefined reference to `_unpack'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(wrfmt.o): In function `_wrfmt': undefined reference to `_unpack'
      /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-500/lib/libfortran.a(wrfmt.o): In function `_wrfmt': undefined reference to `_unpack'
      ...
      

      请问老师有什么好的建议嘛?谢谢!

      posted in 语言编译
      X
      xuhui
    • 如何快速提交一系列任务

      老师好:

      我想要一口气提交一大堆任务,例如 a1.out, a2.out, a3.out ... a100.out.每一个任务的计算时间非常短,只需要1ms.

      这一系列的任务被是软件的单元测试,需要反复,快速的执行。

      我现在的提交方式是

      bsub -I -b -N 1 -q q_sw_expr -cgsp 64 ./a1.out
      bsub -I -b -N 1 -q q_sw_expr -cgsp 64 ./a2.out
      bsub -I -b -N 1 -q q_sw_expr -cgsp 64 ./a3.out
      ...
      bsub -I -b -N 1 -q q_sw_expr -cgsp 64 ./a100.out
      

      这种方式大量的时间都花在了集群的任务调度上面(申请任务,等待分配资源,分配资源,计算,任务完成,释放资源),请问有没有什么方法一口气提交任务并快速执行?谢谢。

      posted in 作业提交报错
      X
      xuhui
    • 1 / 1