sw5CC遇到p*gemv_时的一个诡异错误



  • 举个例子,下面的代码保存命名成test.cpp ,运行mpiCC -host -c test.cpp,无事发生;把pzgemv_那行注释去掉, 再运行就会得到一堆报错。(sw5CC也一样)

    我试过了只有使用scalapack中的p*gemv_时会出现报错,其他都没问题。哪位大佬可以来解释一下?☹

    1   #include <complex>                                                                                                                                                                   
      1 
      2 extern "C"{
      3 
      4 void pzgemv_(char *, int *, int *, std::complex<double> *,
      5 const std::complex<double> *, int *, int *, const int *,
      6 const std::complex<double> *, int *, int *, const int *, int *,
      7 std::complex<double> *, std::complex<double> *, int *, int *,
      8 const int *, int *);
      9 
     10 void pzgemm_(char *, char *, int *, int *, int *, std::complex<double> *,
     11 const std::complex<double> *, int *, int *, const int *,
     12 const std::complex<double> *, int *, int *, const int *,
     13 std::complex<double> *, std::complex<double> *, int *, int *,
     14 const int *);
     15 
     16 }
     17 
     18 void pgemv(char ta, int m, int n, std::complex<double> alpha,
     19  const std::complex<double> *a, int ia, int ja, const int *desca,
     20  const std::complex<double> *x, int ix, int jx, const int *descx,
     21  int incx, std::complex<double> beta, std::complex<double> *y, int iy,
     22  int jy, const int *descy, int incy) {
     23   //pzgemv_(&ta, &m, &n, &alpha, a, &ia, &ja, desca, x, &ix, &jx, descx, &incx, &beta, y, &iy, &jy, descy, &incy);
     24 }
     25 
     26 
     27 void pgemm(char ta, char tb, int m, int n, int k, std::complex<double> alpha,
     28  const std::complex<double> *a, int ia, int ja, const int *desca,
     29  const std::complex<double> *b, int ib, int jb, const int *descb,
     30  std::complex<double> beta, std::complex<double> *c, int ic, int jc,
     31  const int *descC) {
     32   pzgemm_(&ta, &tb, &m, &n, &k, &alpha, a, &ia, &ja, desca, b, &ib, &jb, descb, &beta, c, &ic, &jc, descC);
     33 }
    
    

    报错信息:

    Signal: Segmentation fault in Assembly phase.
    Error: Signal Segmentation fault in phase Assembly -- processing aborted
    *** Internal stack backtrace:
        /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-496/be.so(+0x32a1ca) [0x2b41922881ca]
        /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-496/be.so(+0x32a258) [0x2b4192288258]
        /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-496/be.so(+0x32b93b) [0x2b419228993b]
        /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-496/be.so(+0x32ba2f) [0x2b4192289a2f]
        /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-496/be.so(ErrMsgLine+0xce) [0x2b4192289bfe]
        /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-496/be.so(+0x329933) [0x2b4192287933]
        /lib64/libc.so.6() [0x358c2326a0]
        /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-496/cg.so(_Z25Build_Fde_For_Proc_C_plusP15Dwarf_P_Debug_sP2bbmmmmmmiii+0x1a9) [0x2b4192cb6fe7]
        /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-496/cg.so(_Z19Cg_Dwarf_Process_PUjjjPjS_S_S_S_S_iiP2ST7DST_idxjiii+0x585) [0x2b4192d6ef06]
        /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-496/cg.so(_Z11EMT_Emit_PUP2ST7DST_idxP2WN+0xea7) [0x2b4192d8584c]
        /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-496/cg.so(CG_Generate_Code+0x1c3a) [0x2b4192d2ce73]
        /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-496/be() [0x40dff2]
        /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-496/be() [0x40e862]
        /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-496/be() [0x40f599]
        /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-496/be(main+0x6a8) [0x4100f9]
        /lib64/libc.so.6(__libc_start_main+0xfd) [0x358c21ed5d]
        /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-496/be() [0x40b9e9]
    CC INTERNAL ERROR: /usr/sw-mpp/swcc/lib/gcc-lib/sw_64-swcc-linux/5.421-sw-496/be died due to signal 4
    CC ERROR: core dumped
    
    

Log in to reply