- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OpenMP can use a lot of stack space, and it can often depend on the size of the problem input to a program. I think it would be very useful to support the -heap-array option for OpenMP temporaries. The source code can always be modified to allocate heap memory within the parallel region, but this would minimize code changes to a non-parallel program, and would also allow "-heap-arrays
OTOH, maybe huge stacks will not be an issue as parallel becomes more common. On an x86_64 system with 8 cores and only 6G RAM, I can run a 16-thread OpenMP test program with OMP_STACKSIZE="16G".
Joe Krahn
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Joe,
It's an interesting suggestion, and one I'll bring up with our engineers. The knee-jerk reaction will undoubtably be "but anything on heap can be accessed (hence potentially corrupted) by all threads. There is not enough protection on heap to protect from one thread corrupting another's data on heap".
And I suspect there would be a fair amount of work for each thread private var access to determine: 1) is this on stack or heap? If on heap, where did I put it for THIS thread (some sort of index perhaps??).
The implementation might get pretty complex.
But I will ask if this is possible.
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hope this helps,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page