- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I keep running into this problem using OpenMP where my executable doesn't run and gives me the following error:
OMP: Error#136: Cannot create thread
OMP: System error #8: Not enough storage is available to process this commant
OMP: Error #178: Function GetExitCodeThread() failed:
OMP: System error #6: The handle is invalid
I am using visual fortran with visual studio 2008. In the linker settings I have set stack size to 50 000 000, and the heap size to 1500 000 000. I have made all my arrays "save" and set heap arrays in fortran->optimization to 0.
My computer has 48Gigs of RAM so I know that should not be an issue.
Any help would be greatly appreciated.
OMP: Error#136: Cannot create thread
OMP: System error #8: Not enough storage is available to process this commant
OMP: Error #178: Function GetExitCodeThread() failed:
OMP: System error #6: The handle is invalid
I am using visual fortran with visual studio 2008. In the linker settings I have set stack size to 50 000 000, and the heap size to 1500 000 000. I have made all my arrays "save" and set heap arrays in fortran->optimization to 0.
My computer has 48Gigs of RAM so I know that should not be an issue.
Any help would be greatly appreciated.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I further realize that if I decrease the stack size it sometimes works? I am very confused!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may need to set the environment variable KMP_STACKSIZE to a larger value - this specifies the amount of stack per thread.
The amount of RAM is not relevant. What is important is the amount of virtual address space available to a process. Is this a 32-bit or 64-bit application?
The amount of RAM is not relevant. What is important is the amount of virtual address space available to a process. Is this a 32-bit or 64-bit application?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is a 32-bit application.
Two follow-up questions:
- How do I create a 64-bit application using visual fortran and visual studio 2008?
- How do I set KMP_STACKSIZE?
Thanks.
Two follow-up questions:
- How do I create a 64-bit application using visual fortran and visual studio 2008?
- How do I set KMP_STACKSIZE?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For 64-bit application, you must install the Microsoft C++ X64 and the ifort Intel64. Then you can change your project setting to X64. You will need the Windows X64 to run.
KMP_STACKSIZE default will increase to 4MB when you switch to 64-bit compilation. You can control it by the environment variable or by the subroutine call, both in the ifort documentation.
KMP_STACKSIZE default will increase to 4MB when you switch to 64-bit compilation. You can control it by the environment variable or by the subroutine call, both in the ifort documentation.
![](/skins/images/71A9511A625CE5D5D45FB59952A4AA71/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page