Global optimization error

Hi,

I’m getting the following error message:
[font=“Courier New”][indent]1>Signal: caught in Global Optimization – Expression Reshaping phase.
1>(0): Error: Signal caught in phase Global Optimization – Expression Reshaping – processing aborted
1>nvopencc ERROR: C:\Program Files\NVIDIA Corporation\CUDA\bin/…/open64/lib//be.exe returned non-zero status 3
[/indent][/font]
From these error strings I can’t even make out what I’m doing wrong to cause this error. Any idea? :rolleyes:

Thanks.

This seems like a problem in compiler. You should file bug report or post minimal source code that reproduces the problem here.

Thanks AndreiB. Here is the minimal code which produces this compilation error:

[codebox]define NUM 8

define INDEX(x, y, z, SIZ) ((z) * (SIZ) * (SIZ) + (y) * (SIZ) + (x))

define EQ3(val0, val1) ((val0.x == val1.x) && (val0.y == val1.y) && (val0.z == val1.z))

short4* buf0 = NULL;

short4* buf1 = NULL;

const int SIZ = 16;

global void

fixFunc

(

short4*,

short4*,

int

);

int main()

{

// Allocate memory

int bufSize = SIZ * SIZ * SIZ * sizeof(short4); 

cudaMalloc((void**) &buf0, bufSize);

cudaMalloc((void**) &buf1, bufSize);

// Call kernel

dim3 block = dim3(SIZ, 2, 2);

dim3 grid = dim3(SIZ / block.y, SIZ / block.z);

fixFunc<<< grid, block >>>(buf0, buf1,	SIZ);

// Free memory

cudaFree(buf0);

cudaFree(buf1);

return 0;

}

// Dummy function

device short

dummyFunc

(

short4 p0,

short4 p1,

short4 p2,

short4 p3

)

{

return 0;

}

global void

fixFunc

(

short4*	inBuf,

short4*	outBuf,

int		size

)

{

int tx = threadIdx.x;

int ty = blockIdx.x * blockDim.y + threadIdx.y; 

int tz = blockIdx.y * blockDim.z + threadIdx.z;

const short LOC[NUM][3] = {

	{+1, +1, +1},

	{+1, +1, -1},

	{+1, -1, +1},

	{-1, +1, +1},

	{+1, -1, -1},

	{-1, +1, -1},

	{-1, -1, +1},

	{-1, -1, -1},	};

const short ORD[NUM] = {

	-1,

	+1,

	+1,

	+1,

	-1,

	-1,

	-1,

	+1,

};

short4 curVal = inBuf[INDEX(tx, ty, tz, size)];

short4 outVal = make_short4(0, 0, 0, 0);

bool outReady = false;

for (int ni = 0; ni < NUM; ++ni)

{

	int np[3][3] = {	{tx + LOC[ni][0],	ty,					tz},

						{tx,				ty + LOC[ni][1],	tz},

						{tx,				ty,					tz + LOC[ni][2]}	};

	short4 buddies[3];

	bool belongs = false;

	for (int i = 0; i < 3; ++i)

	{

		buddies[i] = inBuf[INDEX(np[i][0], np[i][1], np[i][2], size)];

		if ( EQ3(buddies[i], curVal) )

			belongs = true;

	}

	if (belongs)

		continue;

	if ( EQ3(buddies[0], buddies[1]) || EQ3(buddies[0], buddies[2]) || EQ3(buddies[1], buddies[2]) )

		continue;

	short3 ord;

	if (ORD[ni] > 0)

		ord = make_short3(0, 1, 2);

	else

		ord = make_short3(0, 2, 1);

	short4 p[4] = {	make_short4(buddies[ord.x].x, buddies[ord.x].y, buddies[ord.x].z, buddies[ord.x].w),

					make_short4(buddies[ord.y].x, buddies[ord.y].y, buddies[ord.y].z, buddies[ord.y].w),

					make_short4(buddies[ord.z].x, buddies[ord.z].y, buddies[ord.z].z, buddies[ord.z].w),

					make_short4(curVal.x, curVal.y, curVal.z, curVal.w)	};

	if (dummyFunc(p[0], p[1], p[2], p[3]) == 0)

	{

		outReady = true;

		continue;

	}

}

if (outReady)

	outBuf[INDEX(tx, ty, tz, size)] = outVal;

else

	outBuf[INDEX(tx, ty, tz, size)] = curVal;

return;

}[/codebox]

The compiler version is:[font=“Courier New”][indent]

nvcc: NVIDIA ® Cuda compiler driver

Copyright © 2005-2007 NVIDIA Corporation

Built on Sun_Dec_14_07:50:14_PST_2008

Cuda compilation tools, release 2.1, V0.2.1221[/indent][/font]

Where can I file a bug report to NVIDIA?

I have also encountered this error. Unfortunately I cannot post code, but the error seems to be associated with a kernel calling another kernel inside a while loop. In my case, kernel A calls kernel B, which says “while (something simple), call kernel C”. AndreiB is also calling a kernel in a loop, so maybe we’re seeing the same thing.

The error message is:
1>Signal: caught in Global Optimization – Expression Reshaping phase.
1>(0): Error: Signal caught in phase Global Optimization – Expression Reshaping – processing aborted
1>nvopencc ERROR: C:\CUDA\bin/…/open64/lib//be.exe returned non-zero status 3

My code compiles fine in CUDA 2.0, but crashes the compiler in 2.1 and 2.2 beta. It’s preventing me from upgrading and using all those nice new features! Any chance of getting a fix soon?

Brian

Brian, if you have access to 2.2 beta then I assume that you’re a registered developer. You can (and should) file a bug report. Without doing so chances that this will be fixed are quite low.

Oddly enough, I had tried that, but the bug reporting system appears to be down (looks like a database connection issue). Where does one file meta-bug-reports?

Brian

I have the same issue and just wanted to know if there is a way out?