Problem with Output when using CUDA

Hey all!!

I’m trying to see at the screen the result of my kernel. But I just see this answer:

Final Inverse Matrix

1.#Q0 1.#Q0 1.#Q0

1.#Q0 1.#Q0 1.#Q0

1.#Q0 1.#Q0 1.#Q0

Before printing this, I’m copying these matrix from device to host. All the math behind this is on kernel. Anyone knows what´s happening here?

Maybe a problem of output format??

I’m using a C function to generate this output. The code is shown below:

[codebox]float printMatPoint(float *matriz)

{

int i, j;

float somatorio=0.0;

for ( i = 0 ; i<LINE_TAM_MAX ; i++)

        {

            for ( j = 0 ; j<COLUMN_TAM_MAX ; j++)

            {

                printf( "%01.3f " ,matriz[i * COLUMN_TAM_MAX + j]);

                somatorio += (float)matriz[i * COLUMN_TAM_MAX + j];

            }

            printf( "\n" );

        }

return somatorio;

}

[/codebox]

OBS: “somatorio” is only a test variable.

Thanks!

Lys Marie.

Hey all!

The matrizx that I was using was invalid variables. When I copied into the GPU, the mathematical operations were performed upon these invalid values, resulting in a matrix result with invalid values.

I’ve fixed it and now is working perfectly.

Cya soon!

Lys Marie.

Hey all!

The matrizx that I was using was invalid variables. When I copied into the GPU, the mathematical operations were performed upon these invalid values, resulting in a matrix result with invalid values.

I’ve fixed it and now is working perfectly.

Cya soon!

Lys Marie.