Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

OMP: error #101: out of heap memory

Ralph_Altenfeld
Beginner
1,498 Views

Hello,

I am making my first tries using the OpenMP library

using Visual Studio and Intel Fortran 11.1.054.

I set the flag for OpenMP to -QOpenMP compile and

then launch the code. As a result I got the following

error:

OMP: error #101: out of heap memory

How can I solve this problem?

Thank you for your help

Cheers

Antoine

0 Kudos
6 Replies
TimP
Honored Contributor III
1,498 Views

It may be useful to have more information. I think you mean a run-time error.

For example, if running on XP 32-bit, do you have /3GB switch set in boot.ini?

heap-arrays compile switch is not good in combination with /Qopenmp.

0 Kudos
Ralph_Altenfeld
Beginner
1,498 Views
Quoting tim18

It may be useful to have more information. I think you mean a run-time error.

For example, if running on XP 32-bit, do you have /3GB switch set in boot.ini?

heap-arrays compile switch is not good in combination with /Qopenmp.

Hello,

I am using a 32 bit version of my code on a 64 bit machine. The unparallelized version of the code showed to work properly (I guess that the memory requirements are not that big, it should not have failed due to memory shortage). I switched off the heap array flag (/heap-arrays). The code is still not working and failing for the same reason (error #101)

Thank you

Antoine

0 Kudos
Ralph_Altenfeld
Beginner
1,498 Views
Quoting tim18

It may be useful to have more information. I think you mean a run-time error.

For example, if running on XP 32-bit, do you have /3GB switch set in boot.ini?

heap-arrays compile switch is not good in combination with /Qopenmp.

Hello,

I am using a 32 bit version of my code on a 64 bit machine. The unparallelized version of the code showed to work properly (I guess that the memory requirements are not that big, it should not have failed due to memory shortage). I switched off the heap array flag (/heap-arrays). The code is still not working and failing for the same reason (error #101)

Thank you

Antoine

I made further research concerning my problem and I found out that this problem can be

changed using the KMP_STACKSIZE environment variable.

When KMP_STACKSIZE is too small (32k) I still get the error 101.

When I set KMP_STACKSIZE too a very big value (256M) I get another error

OMP: error #136: Cannot create thread

OMP: system error #8: Not enough storage is available to process this command

Can one help me with this???

Thank you

Antoine

0 Kudos
jimdempseyatthecove
Honored Contributor III
1,498 Views

how many hardware threads are available on this system?

Jim

0 Kudos
TimP
Honored Contributor III
1,498 Views
The defaults for KMP_STACKSIZE are in the ifort help file (2MB for 32-bit compiler). That should be a clue that you would consider values such as 4MB. If you want to support many threads, staying with 32-bit software won't make sense.
0 Kudos
rico_caldeira
Beginner
1,498 Views
Hey, Antonie.

I had the same problem and it was annoying me a lot!
My solved my problem by setting well the number of threads to use.
As i was defining it with the routine OMP_SET_NUM_THREADS(NTH), the Number NTH was coming from another routine and my program was not doing it well. When I set it manually to use 2 threads (OMP_SET_NUM_THREADS(2)) it worked well. The program was trying to set a large number of threadds before.
I dont know if it helps you. Anyway, it took me some time to discover.

bye,

Ricardo.
0 Kudos
Reply