problem of compile matrixMul error of compilation

hello, every body

i try to create my own code of multiplication of square matrix ,but when i would compile it

the message appear :

matrixMul.cu(96): error: a host function call can not be configured

1 error detected in the compilation of “/tmp/tmpxft_0000211c_00000000-4_matrixMul.cpp1.ii”.

you can view the link attached to my post

so if somebody can help me

Declare your kernel as [font=“Courier New”]global void MatrixMulKernel(float * Md, float * Nd, float * Pd, int Width)[/font].

Declare your kernel as [font=“Courier New”]global void MatrixMulKernel(float * Md, float * Nd, float * Pd, int Width)[/font].

thank’s now there are no error of complitaion, but I have an other error when i run my program :

*** glibc detected *** ./vectMat: free(): invalid next size (normal): 0x0834f958 ***

======= Backtrace: =========

/lib/tls/i686/cmov/libc.so.6[0xb7d213f4]

/lib/tls/i686/cmov/libc.so.6(cfree+0x96)[0xb7d23456]

/lib/tls/i686/cmov/libc.so.6(fclose+0x144)[0xb7d11004]

/lib/tls/i686/cmov/libc.so.6(get_nprocs+0x16e)[0xb7d92e1e]

/usr/lib/libcuda.so[0xb78e16a0]

/usr/lib/libcuda.so[0xb78d75c1]

/usr/lib/libcuda.so(cuInit+0x41)[0xb793adc1]

/usr/lib/libcudart.so.2[0xb7f6a6a3]

/usr/lib/libcudart.so.2[0xb7f6ab2f]

/usr/lib/libcudart.so.2(cudaMalloc+0x29)[0xb7f4f289]

./vectMat[0x8048ce1]

./vectMat[0x8048ea8]

/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7cc8685]

./vectMat[0x80487c1]

======= Memory map: ========

08048000-0804b000 r-xp 00000000 08:07 876635 /root/NVIDIA_GPU_Computing_SDK/C/bin/linux/release/vectMat

0804b000-0804c000 r–p 00002000 08:07 876635 /root/NVIDIA_GPU_Computing_SDK/C/bin/linux/release/vectMat

0804c000-0804d000 rw-p 00003000 08:07 876635 /root/NVIDIA_GPU_Computing_SDK/C/bin/linux/release/vectMat

0834f000-08370000 rw-p 0834f000 00:00 0 [heap]

b7700000-b7721000 rw-p b7700000 00:00 0

b7721000-b7800000 —p b7721000 00:00 0

b7862000-b7876000 r-xp 00000000 08:07 1419763 /usr/lib/libz.so.1.2.3.3

b7876000-b7878000 rw-p 00013000 08:07 1419763 /usr/lib/libz.so.1.2.3.3

b7878000-b7c5f000 r-xp 00000000 08:07 1418413 /usr/lib/libcuda.so.190.53

b7c5f000-b7c64000 rw-p 003e6000 08:07 1418413 /usr/lib/libcuda.so.190.53

b7c64000-b7c8c000 rw-p b7c64000 00:00 0

b7c8c000-b7c93000 r-xp 00000000 08:07 1025049 /lib/tls/i686/cmov/librt-2.8.90.so

b7c93000-b7c94000 r–p 00007000 08:07 1025049 /lib/tls/i686/cmov/librt-2.8.90.so

b7c94000-b7c95000 rw-p 00008000 08:07 1025049 /lib/tls/i686/cmov/librt-2.8.90.so

b7c95000-b7caa000 r-xp 00000000 08:07 1025045 /lib/tls/i686/cmov/libpthread-2.8.90.so

b7caa000-b7cab000 r–p 00014000 08:07 1025045 /lib/tls/i686/cmov/libpthread-2.8.90.so

b7cab000-b7cac000 rw-p 00015000 08:07 1025045 /lib/tls/i686/cmov/libpthread-2.8.90.so

b7cac000-b7cae000 rw-p b7cac000 00:00 0

b7cae000-b7cb0000 r-xp 00000000 08:07 1025025 /lib/tls/i686/cmov/libdl-2.8.90.so

b7cb0000-b7cb1000 r–p 00001000 08:07 1025025 /lib/tls/i686/cmov/libdl-2.8.90.so

b7cb1000-b7cb2000 rw-p 00002000 08:07 1025025 /lib/tls/i686/cmov/libdl-2.8.90.so

b7cb2000-b7e0a000 r-xp 00000000 08:07 1025019 /lib/tls/i686/cmov/libc-2.8.90.so

b7e0a000-b7e0c000 r–p 00158000 08:07 1025019 /lib/tls/i686/cmov/libc-2.8.90.so

b7e0c000-b7e0d000 rw-p 0015a000 08:07 1025019 /lib/tls/i686/cmov/libc-2.8.90.so

b7e0d000-b7e10000 rw-p b7e0d000 00:00 0

b7e10000-b7e1d000 r-xp 00000000 08:07 1008157 /lib/libgcc_s.so.1

b7e1d000-b7e1e000 r–p 0000c000 08:07 1008157 /lib/libgcc_s.so.1

b7e1e000-b7e1f000 rw-p 0000d000 08:07 1008157 /lib/libgcc_s.so.1

b7e1f000-b7e43000 r-xp 00000000 08:07 1025027 /lib/tls/i686/cmov/libm-2.8.90.so

b7e43000-b7e44000 r–p 00023000 08:07 1025027 /lib/tls/i686/cmov/libm-2.8.90.so

b7e44000-b7e45000 rw-p 00024000 08:07 1025027 /lib/tls/i686/cmov/libm-2.8.90.so

b7e45000-b7e46000 rw-p b7e45000 00:00 0

b7e46000-b7f29000 r-xp 00000000 08:07 1420060 /usr/lib/libstdc++.so.6.0.10

b7f29000-b7f2d000 r–p 000e3000 08:07 1420060 /usr/lib/libstdc++.so.6.0.10

b7f2d000-b7f2e000 rw-p 000e7000 08:07 1420060 /usr/lib/libstdc++.so.6.0.10

b7f2e000-b7f34000 rw-p b7f2e000 00:00 0

b7f34000-b7f78000 r-xp 00000000 08:07 1420231 /usr/lib/libcudart.so.2

b7f78000-b7f79000 r–p 00043000 08:07 1420231 /usr/lib/libcudart.so.2

b7f79000-b7f7a000 rw-p 00044000 08:07 1420231 /usr/lib/libcudart.so.2

b7f87000-b7f89000 rw-p b7f87000 00:00 0

b7f89000-b7fa3000 r-xp 00000000 08:07 1007635 /lib/ld-2.8.90.so

b7fa3000-b7fa4000 r-xp b7fa3000 00:00 0 [vdso]

b7fa4000-b7fa5000 r–p 0001a000 08:07 1007635 /lib/ld-2.8.90.so

b7fa5000-b7fa6000 rw-p 0001b000 08:07 1007635 /lib/ld-2.8.90.so

bf890000-bf8a3000 rwxp bffeb000 00:00 0 [stack]

bf8a3000-bf8a5000 rw-p bfffe000 00:00 0

Aborted

thank’s now there are no error of complitaion, but I have an other error when i run my program :

*** glibc detected *** ./vectMat: free(): invalid next size (normal): 0x0834f958 ***

======= Backtrace: =========

/lib/tls/i686/cmov/libc.so.6[0xb7d213f4]

/lib/tls/i686/cmov/libc.so.6(cfree+0x96)[0xb7d23456]

/lib/tls/i686/cmov/libc.so.6(fclose+0x144)[0xb7d11004]

/lib/tls/i686/cmov/libc.so.6(get_nprocs+0x16e)[0xb7d92e1e]

/usr/lib/libcuda.so[0xb78e16a0]

/usr/lib/libcuda.so[0xb78d75c1]

/usr/lib/libcuda.so(cuInit+0x41)[0xb793adc1]

/usr/lib/libcudart.so.2[0xb7f6a6a3]

/usr/lib/libcudart.so.2[0xb7f6ab2f]

/usr/lib/libcudart.so.2(cudaMalloc+0x29)[0xb7f4f289]

./vectMat[0x8048ce1]

./vectMat[0x8048ea8]

/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7cc8685]

./vectMat[0x80487c1]

======= Memory map: ========

08048000-0804b000 r-xp 00000000 08:07 876635 /root/NVIDIA_GPU_Computing_SDK/C/bin/linux/release/vectMat

0804b000-0804c000 r–p 00002000 08:07 876635 /root/NVIDIA_GPU_Computing_SDK/C/bin/linux/release/vectMat

0804c000-0804d000 rw-p 00003000 08:07 876635 /root/NVIDIA_GPU_Computing_SDK/C/bin/linux/release/vectMat

0834f000-08370000 rw-p 0834f000 00:00 0 [heap]

b7700000-b7721000 rw-p b7700000 00:00 0

b7721000-b7800000 —p b7721000 00:00 0

b7862000-b7876000 r-xp 00000000 08:07 1419763 /usr/lib/libz.so.1.2.3.3

b7876000-b7878000 rw-p 00013000 08:07 1419763 /usr/lib/libz.so.1.2.3.3

b7878000-b7c5f000 r-xp 00000000 08:07 1418413 /usr/lib/libcuda.so.190.53

b7c5f000-b7c64000 rw-p 003e6000 08:07 1418413 /usr/lib/libcuda.so.190.53

b7c64000-b7c8c000 rw-p b7c64000 00:00 0

b7c8c000-b7c93000 r-xp 00000000 08:07 1025049 /lib/tls/i686/cmov/librt-2.8.90.so

b7c93000-b7c94000 r–p 00007000 08:07 1025049 /lib/tls/i686/cmov/librt-2.8.90.so

b7c94000-b7c95000 rw-p 00008000 08:07 1025049 /lib/tls/i686/cmov/librt-2.8.90.so

b7c95000-b7caa000 r-xp 00000000 08:07 1025045 /lib/tls/i686/cmov/libpthread-2.8.90.so

b7caa000-b7cab000 r–p 00014000 08:07 1025045 /lib/tls/i686/cmov/libpthread-2.8.90.so

b7cab000-b7cac000 rw-p 00015000 08:07 1025045 /lib/tls/i686/cmov/libpthread-2.8.90.so

b7cac000-b7cae000 rw-p b7cac000 00:00 0

b7cae000-b7cb0000 r-xp 00000000 08:07 1025025 /lib/tls/i686/cmov/libdl-2.8.90.so

b7cb0000-b7cb1000 r–p 00001000 08:07 1025025 /lib/tls/i686/cmov/libdl-2.8.90.so

b7cb1000-b7cb2000 rw-p 00002000 08:07 1025025 /lib/tls/i686/cmov/libdl-2.8.90.so

b7cb2000-b7e0a000 r-xp 00000000 08:07 1025019 /lib/tls/i686/cmov/libc-2.8.90.so

b7e0a000-b7e0c000 r–p 00158000 08:07 1025019 /lib/tls/i686/cmov/libc-2.8.90.so

b7e0c000-b7e0d000 rw-p 0015a000 08:07 1025019 /lib/tls/i686/cmov/libc-2.8.90.so

b7e0d000-b7e10000 rw-p b7e0d000 00:00 0

b7e10000-b7e1d000 r-xp 00000000 08:07 1008157 /lib/libgcc_s.so.1

b7e1d000-b7e1e000 r–p 0000c000 08:07 1008157 /lib/libgcc_s.so.1

b7e1e000-b7e1f000 rw-p 0000d000 08:07 1008157 /lib/libgcc_s.so.1

b7e1f000-b7e43000 r-xp 00000000 08:07 1025027 /lib/tls/i686/cmov/libm-2.8.90.so

b7e43000-b7e44000 r–p 00023000 08:07 1025027 /lib/tls/i686/cmov/libm-2.8.90.so

b7e44000-b7e45000 rw-p 00024000 08:07 1025027 /lib/tls/i686/cmov/libm-2.8.90.so

b7e45000-b7e46000 rw-p b7e45000 00:00 0

b7e46000-b7f29000 r-xp 00000000 08:07 1420060 /usr/lib/libstdc++.so.6.0.10

b7f29000-b7f2d000 r–p 000e3000 08:07 1420060 /usr/lib/libstdc++.so.6.0.10

b7f2d000-b7f2e000 rw-p 000e7000 08:07 1420060 /usr/lib/libstdc++.so.6.0.10

b7f2e000-b7f34000 rw-p b7f2e000 00:00 0

b7f34000-b7f78000 r-xp 00000000 08:07 1420231 /usr/lib/libcudart.so.2

b7f78000-b7f79000 r–p 00043000 08:07 1420231 /usr/lib/libcudart.so.2

b7f79000-b7f7a000 rw-p 00044000 08:07 1420231 /usr/lib/libcudart.so.2

b7f87000-b7f89000 rw-p b7f87000 00:00 0

b7f89000-b7fa3000 r-xp 00000000 08:07 1007635 /lib/ld-2.8.90.so

b7fa3000-b7fa4000 r-xp b7fa3000 00:00 0 [vdso]

b7fa4000-b7fa5000 r–p 0001a000 08:07 1007635 /lib/ld-2.8.90.so

b7fa5000-b7fa6000 rw-p 0001b000 08:07 1007635 /lib/ld-2.8.90.so

bf890000-bf8a3000 rwxp bffeb000 00:00 0 [stack]

bf8a3000-bf8a5000 rw-p bfffe000 00:00 0

Aborted

You are scribbling past the end of the host arrays. Change the initialization to
[font=“Courier New”]// initialize host memory
for (int i=0; i<WidthWidth; i++) Ma[i] = (float)i;
for (int j=0; j<Width
Width; j++) Na[j] = (float)j;
[/font]

You are scribbling past the end of the host arrays. Change the initialization to
[font=“Courier New”]// initialize host memory
for (int i=0; i<WidthWidth; i++) Ma[i] = (float)i;
for (int j=0; j<Width
Width; j++) Na[j] = (float)j;
[/font]

thank you very much tera

now i have no problem

thank you very much tera

now i have no problem