CUDA SDK applications have seg. faults when linked with ocelot

71 views
Skip to first unread message

Lorenz Braun

unread,
May 21, 2015, 10:20:29 AM5/21/15
to gpuo...@googlegroups.com
Hi everybody,

i am trying to analyze some applications of the CUDA 5.0 SDK Examples with Ocelot and MacSim. I use CUDA 5.0 and Ocelot 2.1.2235 (SVN Revision 2235). When Linking the NBody and the convolutionFFT2D application with ocelot (& ocelotTrace) and running them i get segmentation faults, even though the application run fine when not linked with ocelot.

Here are the error messages. I used a script to automate everything thats why it says "./$cuda_bin".

NBody:
[...]
(39.473490) X86TraceGenerator.cpp:771:  New kernel launched
(39./macSim_Auswertung.sh: line 20: 12631 Segmentation fault      (core dumped) ./$cuda_bin




convolutionFFT2D:
CUDA error at main.cpp:177 code=5(CUFFT_INTERNAL_ERROR) "cufftExecR2C(fftPlanFwd, (cufftReal *)d_PaddedKernel, (cufftComplex *)d_KernelSpectrum)"
./macSim_Auswertung.sh: line 18:  1663 Segmentation fault      (core dumped) ./$cuda_bin


Has anybody any idea why this segmentation fault occurs or how to fix it? Might it be a bug?

Regards
Lorenz

Jin Wang

unread,
Jun 30, 2015, 8:06:19 PM6/30/15
to gpuo...@googlegroups.com
Hi Lorenz,

The problem with convolutionFFT2D is that it uses the cufft library. Currently Ocelot does not support any CUDA library (e.g. cublas, cufft etc). These libraries were shipped in binary and there is not easy way for ocelot to reverse engineer them or implement them as backdoor APIs.

For NBody, it seems like the problem is with macSim. You probably want to contact macsim discussion group to see if they have an idea. Also could you run it again with gdb and get a pinpoint on which function causes the segmentation fault?

Regards,

Jin

Lorenz Braun

unread,
Jul 1, 2015, 1:45:07 PM7/1/15
to gpuo...@googlegroups.com
Hi Jin,

thanks for the response. I did not know that the CUDA libraries are not supported by ocelot. That explains at least this error.

The macSim_Auswertung.sh script was written by me to do generate the ocelot trace and running MacSim afterwards. The segmentation fault occurred in the line where the ocelot binary was executed. But i will try to pinpoint the function which generates the segmentation fault nonetheless (hopefully tomorrow).

Best regards
Lorenz

Lorenz Braun

unread,
Jul 7, 2015, 6:57:38 AM7/7/15
to gpuo...@googlegroups.com
Hi,

i had some problems to build the trace library with debug flags, but finally i got it right.

Here is where the segmentation fault occurs:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff3a37213 in llvm::StringRef::operator[](unsigned long) const () at StringRef.h:192
192          return Data[Index];

Full Log is here: http://pastebin.com/w4ULxrzZ
i can provide more infos if needed.

best regards
Lorenz

Jin Wang

unread,
Jul 7, 2015, 1:43:35 PM7/7/15
to gpuo...@googlegroups.com
Hi Lorenz,

It looks like the problem occurs in LLVM. Since you are generating traces, you probably do not need the LLVM backend. Therefore, you may turn the LLVM backend off when building ocelot by using "--no_llvm".

Jin

--
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.
For more options, visit https://groups.google.com/d/optout.

Lorenz Braun

unread,
Jul 9, 2015, 5:05:51 AM7/9/15
to gpuo...@googlegroups.com
Hi Jin,

i tested nBody without LLVM and it worked. Thank you!

Lorenz
Reply all
Reply to author
Forward
0 new messages