- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Will -heap-arrays flag be ignored if -openmp is used for compilation?
BTW, will -heap-array cause any issue with thread-safety?
Thanks,
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No it won't be ignored. It should not cause thread safety issues. The pointer to the storage is per-thread and threads don't share the same heap-allocated temporary. (If there is a conflict, that's a bug we want to know about.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve,
Thanks for your reply. But here is what I found from this doc.
-openmp Interaction with –heap-arrays
• -openmp will cause the compiler use slightly different behavior for –heap-arrays
• Procedure local data with –heap-arrays and –openmp are STACK allocated (therefore, thread-safe) – must explicitly override with SAVE attribute to get on heap • Automatic arrays: descriptor allocated on stack, data allocated in heap (thus, also thread-safe).
• OpenMP puts a heavy load on stack, threadprivate variables need stack allocation
• Use stack-increasing methods – you will need much more stack than an non-OpenMP application
So for automatic and temporary data, what is the actual behavior for Intel comipler "intel/compiler-14.0.1/bin/ifort"
Is it possible to have a test program to validate where the automatic and temporary data is allocated?
I'd like to test for -heap-array with and without -openmp?
Thanks,
Qiang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't know what the 14.0 compiler's behavior is and don't recommend using that unsupported version. Ideally you'd want to avoid anything that creates temporary array copies.
That presentation you found is a decade old.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So the 14.0 compiler is not supported by Intel any more?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No. The current compiler is 16.0. We will accept bug reports on 15.0 but it is unlikely that there will be any more 15.0 updates. 14.0 is unsupported.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page