I’m getting the following error while trying to compile some code with CUDA 2.3 on OS X:
Assertion failure at line 123 of …/…/be/cg/NVISA/expand.cxx:
Compiler Error in file /tmp/tmpxft_000044d8_00000000-7_kCalculateCustomNonbondedForces.cpp3.i during Code_Expansion phase:
unexpected mtype
nvopencc INTERNAL ERROR: /usr/local/cuda/bin/…/open64/lib//be returned non-zero status 1
The error seems to be triggered by the following piece of code:
[codebox]float value = 0.0f;
switch (expression->op[i])
{
case CONSTANT:
value = expression->arg[i];
break;
case VARIABLE1:
value = vars1.x;
break;
case VARIABLE2:
value = vars1.y;
break;
… lots more cases …
}
[/codebox]
If I comment out either the VARIABLE1 or VARIABLE2 case, it compiles correctly. Having two different case statements that refer to different elements of vars1 (which is a float4) produces the error. Unfortunately, that’s essential for me. Any suggestions for workarounds?
I just encountered the same thing on a linux system with only 2.3.
It may be fixed in 3.0 though since the same code had compiled fine on a system with the latest compiler