- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My code which works fine with gcc, causes a segmentation fault with icpc. Please find the reduced down code, which replicates the same below. I am attaching the cpp file with all the details needed, OS, CPUinfo, etc, along with the preprocess file.
#include <memory>
#include <exception>
void action( void ) ;
void func( void )
{
const char *errstr = NULL ;
const long ndata = 128 ;
std::shared_ptr<long> bdata[ ndata ] ;
#if defined( _OPENMP )
#pragma omp parallel for \
num_threads( 4 ) \
default( none ) \
shared( bdata, errstr )
#endif /* _OPENMP */
for( long i = 1 ; i < ndata ; ++i )
{
#if defined( _OPENMP )
#pragma omp flush( errstr )
#endif /* _OPENMP */
try { action() ; }
catch( std::exception &oops ) { errstr = "error" ; }
catch( ... ) { errstr = "error" ; }
}
}
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Arnov,
Thanks for sharing the reproducer and also for the detailed information of your environment.
We are looking into this issue internally, we will get back to you soon.
Regards,
Vidya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for triaging notes and for the reproducer. This bug is escalated to the development team. It should be fixed in the upcoming compiler updates.
By the way, the issue is not reproducible with ICX when compiling ` icx -fiopenmp -c crash.cpp `. You just need to resolve and `error: variable 'ndata' must have explicitly specified data sharing attributes` . I changed 'default (none)' to 'default(shared)' and compile the code. So,ICX might be a workaround for you.
We will no longer respond to this thread. We will update the thread as soon as the fix is available.
If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The issue was fixed in the latest compiler icpc (ICC) 2021.6.0 20220226
which is available as part of the oneAPI Base Toolkit https://www.intel.com/content/www/us/en/developer/tools/oneapi/toolkits.html or at https://www.intel.com/content/www/us/en/developer/articles/tool/oneapi-standalone-components.html#inpage-nav-6-undefined.
Please check and confirm the solution, thanks.

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