Re: Segmentation fault when running examples

83 views
Skip to first unread message

Alexander Donn

unread,
Apr 19, 2013, 1:43:05 AM4/19/13
to gpuo...@googlegroups.com
FYI, since I am using macsim, I edit the following line in file SConscript before compiling the examples.

I replace
LIBS=additionalLibs + ['-lglut', '-locelot', libsdk, '-lGLEW', '-lGLU'])
with
LIBS=additionalLibs + ['-lglut', '-locelot', libsdk, '-lGLEW', '-lGLU', '-locelotTrace', '-lz', '-lboost_thread-mt', '-lboost_serialization-mt', '-lboost_wserialization-mt', '-lboost_filesystem-mt', '-lboost_system-mt'])

Alexander Donn

unread,
Apr 22, 2013, 12:38:23 PM4/22/13
to gpuo...@googlegroups.com
Hi all,

I figured out a part of the problem.
I re-compiled the GPUOcelot without llvm. Examples like Clock & BandwidthTest work fine now (no more "segmentation fault").
But this does not solve all the "segmentation fault" problems. Some examples still have this kind of fault.

Furthermore, how could I solve the race problem when I run ScalarProd.
The error is: "
terminate called after throwing an instance of 'hydrazine::Exception'
  what():  [PC 37] [thread 1] [cta 0] st.shared.f32 [%r27], %r18 - Shared memory race condition, address 0x4 was previously read by thread 0 without a memory barrier in between.
Near tests/cuda4.1sdk/tests/scalarProd/scalarProd_kernel.cu:65:1
"

Best regards,
Alex


On Thursday, April 18, 2013 8:10:00 PM UTC+8, Alexander Donn wrote:
Hi,

When I add "x86Trace: true" in configure.ocelot,
I got a "segmentation fault" at the end of running some examples (Clock & BandwidthTest) in cuda4.1sdk folder.
I got X86TraceGenerator.cpp:1829 ... X86TraceGenerator ... Assertion `0' failed when running SimplePrintf.
However, applications like VectorAdd & DeviceQuery work fine.

When I remove "x86Trace: true" in configure.ocelot, everything works fine.

Can anyone help me?

Thanks and Best Regards,
Alex

Andrew Kerr

unread,
Apr 22, 2013, 12:44:44 PM4/22/13
to gpuo...@googlegroups.com
It sounds like you're executing your program with the 'raceDetector' enabled and have encountered a race condition. 

'raceDetector' attempts to identify programs which omit barrier synchronizations to exchange data between certain sets of threads the programmer expects to be synchronized already. While technically a race, CUDA programs with implicit synchronization among threads of the same warp have functioned correctly on NVIDIA GPUs so far. You may wish to consult the CUDA Programming Guide for more details on this topic.

To suppress the exception, you should disable the raceDetector via editing configure.ocelot:


raceDetector: {
enabled:                False,
ignoreIrrelevantWrites: False
},





--
You received this message because you are subscribed to the Google Groups "gpuocelot" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gpuocelot+...@googlegroups.com.
To post to this group, send email to gpuo...@googlegroups.com.
Visit this group at http://groups.google.com/group/gpuocelot?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages