- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I get a segmentation fault when I call ippGetCpuFreqMhz().
Ubuntu 12.04 LTS
Intel® Core™ i7-4610M CPU @ 3.00GHz × 4
static libraries
Netbeans IDE 7.4
gcc -o dist/Debug/GNU-Linux-x86/timingtestipp build/Debug/GNU-Linux-x86/src/CicDownSamp.o build/Debug/GNU-Linux-x86/src/TimingTestIpp.o -L../lib -L/opt/intel/ipp/lib/intel64 -lsidekiq__x86_64 /opt/intel/ipp/lib/intel64/libippcc.a /opt/intel/ipp/lib/intel64/libippch.a /opt/intel/ipp/lib/intel64/libippcore.a /opt/intel/ipp/lib/intel64/libippcv.a /opt/intel/ipp/lib/intel64/libippdc.a /opt/intel/ipp/lib/intel64/libippi.a /opt/intel/ipp/lib/intel64/libipps.a /opt/intel/ipp/lib/intel64/libippvm.a -lpthread -lm -lrt -ldl
Let me know if you need more.
Thanks,
Grant Schmick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Grant,
pMhz is not initialized in your case, correct code is below:
int *pMhz;
int iCpuMhz;
pMhz = &iCpuMhz;
ippStatus = ippGetCpuFreqMhz(pMhz);
or simpler one:
int iCpuMhz;
ippStatus = ippGetCpuFreqMhz(&iCpuMhz);
regards, Igor
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also: IPP_VERSION_STR "8.2.2"
Language: C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Grant,
Can I see how you declare a variable for and call ippGetCpuFreqMhz() in your code?
Thank you
- Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jon,
Here's the relevant code:
... #define READ_CPU_FREQ #ifdef READ_CPU_FREQ int *pMhz; int iCpuMhz; #endif ... #ifdef READ_CPU_FREQ // read the processor speed ippStatus = ippGetCpuFreqMhz(pMhz); iCpuMhz = *pMhz; #endif ...
The fault occurs on the function call; if I comment it out, it doesn't occur.
Thanks,
Grant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Grant,
pMhz is not initialized in your case, correct code is below:
int *pMhz;
int iCpuMhz;
pMhz = &iCpuMhz;
ippStatus = ippGetCpuFreqMhz(pMhz);
or simpler one:
int iCpuMhz;
ippStatus = ippGetCpuFreqMhz(&iCpuMhz);
regards, Igor

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page