Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

Task scheduler init Segfaults

josh_rychlinski
Beginner
610 Views
Here is the valgrind output:
==2671== Process terminating with default action of signal 4 (SIGILL)
==2671== Illegal opcode at address 0x4E34CA7
==2671== at 0x4E34CA7: __TBB_machine_cmpswp1(void volatile*, signed char, signed char) (linux_em64t.h:90)
==2671== by 0x4E34ED8: __TBB_TryLockByte(unsigned char volatile&) (tbb_machine.h:478)
==2671== by 0x4E34F32: __TBB_LockByte(unsigned char volatile&) (tbb_machine.h:484)
==2671== by 0x614F034: MallocMutex::scoped_lock::scoped_lock(MallocMutex&) (Customize.h:66)
==2671== by 0x614E975: ThreadingSubstrate::Internal::checkInitialization() (MemoryAllocator.cpp:1175)
==2671== by 0x614EA51: scalable_malloc (MemoryAllocator.cpp:1355)
==2671== by 0x4E311F9: tbb::internal::NFS_Allocate(unsigned long, unsigned long, void*) (cache_aligned_allocator.cpp:135)
==2671== by 0x4E37737: tbb::internal::Arena::allocate_arena(unsigned, unsigned) (task.cpp:988)
==2671== by 0x4E37B0C: tbb::task_scheduler_init::initialize(int) (task.cpp:1999)
==2671== by 0x403138: tbb::task_scheduler_init::task_scheduler_init(int) (task_scheduler_init.h:75)
==2671== by 0x402E6C: main (main.cpp:49)

I am running RedHat Linux 5 on a Dell Optiplex 745. Any help would be greatly appreciated, I have written several routines that use various parallel_ algorithms but I can't test them to do weird errors.
0 Kudos
3 Replies
AJ13
New Contributor I
610 Views
Pretty sure I've run into this. If you're using gcc, try compiling with -O2. Otherwise please post your compile flags.

AJ
0 Kudos
Alexey-Kukanov
Employee
610 Views

Josh,

what TBB package do you use? Can you reproduce the issue with the latest development update? As far as I remember there was an issue in MallocMutex class that was fixed in development updates.

0 Kudos
josh_rychlinski
Beginner
610 Views
I am using the Commercially Aligned Release. I messed around with my .cshrc startup script a little more and added -O2 as the above suggested and now it works dandy (twice as fast or so). Now I can proceeding with adding TBB to Huffman :)
0 Kudos
Reply