Community
cancel
Showing results for 
Search instead for 
Did you mean: 
714 Views

Compile error in TBB as internal error: bad pointer when using Intel compiler

Dear all,

 

Nowadays, I purchased Intel Parallel Studio XE in order to use Intel compiler, icc with TBB.

However, I faced with compile error when switched from gcc into icc as the below,

================================================================================

/TO_USER_DIRECTORY/intel/tbb/include/tbb/machine/linux_common.h(47): internal error: bad pointer
  #if defined(__linux__) || __TBB_has_include(<linux/futex.h>)

                                                                                                 ^

================================================================================

 

Curiously, some environment succeeded in compilation but some failed though they were the same Linux OS, Ubuntu 18.04.

(Thought as irrelevant, succeeded machine is Xeon, and failed one is Core i7)

 

If you know how to resolve, I would appreciate it if you could tell me.

 

Kind regards,

Mitsuru

 

0 Kudos
17 Replies
Alexei_K_Intel
Employee
714 Views

Dear Mitsuru,

Could you, please, share the versions of the products that you use. You can add "-V" to the compiler command line to obtain the compiler version. What TBB version do you use? Is it shipped together with Intel Parallel Studio XE or have you downloaded it from github?

Regards,
Alex

714 Views

Dear Alex,

 

Thank you so much for your comment.

I checked the version as you told me and the results of both environments  was the below 

> Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.0.3.199 Build 20190206

The failed environment was tried in the TBB versions of github (tbb-2019_U5) and shipped with Intel Parallel Studio XE., and both failed.

 

After you told me your question, I have tried to switch TBB of an old TBB into TBB shipped with XE in the succeeded environment,

and I reproduced the same error there.

 

Kind regards,

Mitsuru Nishikawa

 

714 Views

P.S.

 

In the succeeded environment, I confirmed I used TBB version of github is as the below (I merely confirmed CHANGE file in the top directory)

Intel TBB 2019 Update 2

TBB_INTERFACE_VERSION == 11002

 

I hope it helps.

 

Kind regards

714 Views

Dear Alex,

 

Now I checked. In the failed environment, I switched TBB of github of U5 into U2, and then I succeeded the compilation.

At least in my machine, the recent TBB code seems to be incompatible with Intel compiler. 

 

I wish it leads to improvement of Intel TBB.

Kind regards,

Mitsuru Nishikawa

Alexei_K_Intel
Employee
714 Views

We failed to reproduce the issue. Could you, please, provide more details about your environments: compiler command line, CPU detailed version, used TBB algorithms and any other information that looks different on problematic and non-problematic environments. Is it possible to share your test application?

714 Views

Dear Alex

 

Thank you for your consideration.

 

I strongly believe Intel's test procedures are done in a correct manner, so that there must be my mistake in setting. 

 

Now my previous problematic and non-problematic environments encountered the same errors(TBB 2019 U2 succeeded, but U5 and the shipped with XE failed by icc), I told you my doubtful setting compared to official usage.

 

I used cmake build system with clion 2017.3. I set CMakeLists.txt not as official guideline, but direct reference to include directory and library directory with -ltbb compile option.

 

Though this is my hypothesis, in my setting, reference to required dependent file's directories is set incorrectly.

(Compile error occurs in compile step where a cpp file includes tbb.h, not linking step)

 

Unfortunately, I cannot share my test application code immediately. Now I purchase XE and so obtains customer support rights. Is it possible to share my codes as confidential information between you and us?

 

I hope this makes a contribution to improvement of TBB.

 

Kind regards

714 Views

P.S.

 

CMakeLists.txt is written as the below.

Paths to the tbb directories were switched between github versions and XE.

===========================================================================================

include_directories("/TO_TBB_DIRECTORY/include/")

set(TBBLIB_DIR "/TO_TBB_DIRECTORY/build/linux_intel64_gcc_cc7_libc2.27_kernel4.15.0_release")

set(LIBTBB_FLAGS "-ltbb")

link_directories(${TBBLIB_DIR})

target_link_libraries(APP_NAME ${LIBTBB_FLAGS})

===========================================================================================

 

Kind regards

399 Views

Dear TBB engineers

 

I encountered the same problem in oneTBB 2019 & 2020 as the below,

and, I found a solution.

> toTBBInclude/tbb/machine/linux_common.h(47): internal error: bad pointer
> #if defined(__linux__) || __TBB_has_include(<linux/futex.h>)

 

When #include <tbb/tbb.h> is written in the top of source file,

this error has vanished.

Therefore, I thought that this problem is rooted in the position of #include <linux/futex.h>.

 

I hope this post leads to some growth of TBB.

Alexei_K_Intel
Employee
714 Views

Dear Mitsuru,

The customer support engineer has recommended to submit a ticket through a support page (https://supporttickets.intel.com) where you can attach the confidential code. Is it convenient for you?

Regards
Alex

714 Views

Dear Alex,

 

I deeply appreciate your kindness.

 

I am going to consider whether or not to submit a ticket,

but at present, I can run my code with TBB U2, so that I will decide it as I compare with some technical alternative options.

 

Lastly, thank you so much for your helps as always.

 

Kind regards,

Mitsuru

Alexei_K_Intel
Employee
714 Views

Dear Mitsuru,

I am really sorry that we cannot reproduce the issue and enable you using TBB 2019 U5. Unfortunately, the internal compiler errors are weird and heavily depend on neighboring code and usage model. Surely, it is up to you to submit the code or not.

Regards,
Alex

714 Views

Hi,

I have exactly the same problem, getting the same error message as given in the first posting of this thread.  My configuration (via modules on the HPC cluster I am using): Intel/2019.3.199-GCC-8.3.0 with tbb/2019.4.199.  With the previous version (Intel/2019.0.117-GCC-7.3.0 with tbb/2019.0.117) the same code compiles just fine.  I therefore believe this is a real regression in the compiler and would like to ask if there have been any new developments to resolve the issue.

Best regards,

Sebastian

Sergey_N_1
Beginner
714 Views

Hello

 

I experience same problem, icc (ICC) 19.0.5.281 20190815.

 

Best regards,

Sergey.

 

Sergey_N_1
Beginner
714 Views

I noticed that problem goes away if use of __has_include is commented out .

 

Best Regards,

Sergey.

Mark_L_Intel
Employee
714 Views

Hello All,

    Thank you all for participating in this discussion.  The issue seems to be the  compiler regression. We consulted with our compiler support group and the recommendation is to move this discussion into Compiler related Forum. The Compiler support engineer is aware of the issue. 

   

714 Views

Dear Sergey N., Mark L.

 

Thank you for your cooperations.

I wish this resolution of this issue leads to advance of TBB library.

 

Kind regards

Sergey_N_1
Beginner
714 Views

Hello,

This issue persists in parallel studio 2020 intel compiler (icc (ICC) 19.1.0.166 20191121)

Another workaround (rather than editing tbb headers) would be to define __has_include macro to return 1 somewhere before including tbb.h

 

 

Reply