I get a seg fault in clBuildProgram() when I call async_work_group_copy() with struct arguments. The struct is defined as:
typedef struct _MSScanInfo
{
unsigned int mMinMZ;
unsigned int mMaxMZ;
unsigned int mTotalCurrent;
unsigned int mMSLevel;
unsigned int mNumPeaks;
unsigned int mPrecursorMass;
unsigned int mNumHoles;
unsigned int charge;
}MSScanInfo;
typedef struct _MSScanInfo
{
unsigned int mMinMZ;
unsigned int mMaxMZ;
unsigned int mTotalCurrent;
unsigned int mMSLevel;
unsigned int mNumPeaks;
unsigned int mPrecursorMass;
unsigned int mNumHoles;
unsigned int mCharge;
}MSScanInfo;
__kernel void preprocessSpectra(__global unsigned int* intensity,
__global unsigned int* mz,
__global unsigned int* intensity2,
__global unsigned int* mz2,
unsigned int stride,
__global MSScanInfo* scanInfo,
float cutoffFactor,
__global unsigned int* classThreshhold,
unsigned int numClasses)
{
__local unsigned int scratch1;
__local unsigned int scratch2;
__local unsigned int scanZeros[64];
__local unsigned int scanOnes[64];
__local MSScanInfo scanInfoLocal;
size_t mySpectra = get_global_id(1);
unsigned int arrayLen;
unsigned int maxPeak;
event_t loadInfoDone;
loadInfoDone
= async_work_group_copy(&scanInfoLocal,
&scanInfo[mySpectra],
1,
0);
}
stack trace:
#0 0x00007ffff6c73052 in ?? () from /lib/libc.so.6
#1 0x00007ffff5917de6 in ?? ()
from /nfs/sw/opencl/ati/current/lib/x86_64/libatiocl64.so
#2 0x00007ffff59197a1 in ?? ()
from /nfs/sw/opencl/ati/current/lib/x86_64/libatiocl64.so
#3 0x00007ffff591aa40 in ?? ()
from /nfs/sw/opencl/ati/current/lib/x86_64/libatiocl64.so
#4 0x00007ffff58fc1ae in ?? ()
from /nfs/sw/opencl/ati/current/lib/x86_64/libatiocl64.so
#5 0x00007ffff5902161 in ?? ()
from /nfs/sw/opencl/ati/current/lib/x86_64/libatiocl64.so
#6 0x00007ffff58fc5a2 in ?? ()
from /nfs/sw/opencl/ati/current/lib/x86_64/libatiocl64.so
#7 0x00007ffff5900647 in ?? ()
from /nfs/sw/opencl/ati/current/lib/x86_64/libatiocl64.so
Yeah I figured this shouldn't actually be allowed. I'll just cast to an unsigned int pointer.