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

enomem problem

pjeandel
Beginner
1,140 Views
Hi all,

I am trying to run a code that has in the past run on NEC vector machines, on an intel xeon x5550 blade (sgi). The code is written in F90, and compiles with no warning messages. It requires a relatively large amount of memory, around 6 GB, and has large, statically declared, arrays (typically 512x119x460). I am running into strange behaviour regarding memory, and openmp (compiler version 11.1).

- compiled with "ifort -O0 -r8 -mcmodel=medium -o no_omp filename.f90 " and run with ulimit -s unlimited, the execution fails with the following message: execve("./test_omp", ["test_omp"], [/* 89 vars */]) = -1 ENOMEM (Cannot allocate memory)

+++ killed by SIGKILL +++

- compiled with "ifort -O0 -r8 -openmp -mcmodel=medium -o no_omp filename.f90 " and run on any number of threads between 1 and 8, I get no problems.

Can anyone point me in the right direction for solving this problem?

Many thanks

0 Kudos
2 Replies
Stephen_D_Intel
Employee
1,139 Views

Hello,

The -openmp compiler option invokes the -automatic option which will move more of your program's variables to the run-time stack. You could try building the no_omp version of your program with the -automatic option to see if it has any effect.

Regards,
Steve D.
Intel Developer Support

0 Kudos
TimP
Honored Contributor III
1,139 Views

The -openmp compiler option invokes the -automatic option which will move more of your program's variables to the run-time stack.

Specifically, setting -openmp or -auto, or declaring the function/subroutine recursive, places locally declared arrays on the stack, and makes them go out of scope when the subroutine exits, unless they are declared with SAVE.
0 Kudos
Reply