I am running the Intel® Fortran Composer XE for OS X vs. 14.0.4 on a Mac OSX 10.11.5. with i7 and 16 GB RAM.
I am allocating arrays dynamically and everything works fine when the program needs less than about 1GB
RAM (checked with activity monitor). However, as soon as get over 1 GB I get the error message
a.out(16358,0xa4442000) malloc: *** mach_vm_map(size=2128674816) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
forrtl: severe (41): insufficient virtual memory
although almost 10 GB RAM should be available.
I compile in command line mode with no extra flags apart from different optimization levels (no difference here).
Can someone please help me ?
Thank you for your answer.
Indeed I meant to type 14.0.4. (upgraded OSX from Snow Leopard to El Capitan without upgrading compiler). Is this the problem ?
Also: when I compile without any flags isn't it 64-bit by default ?
ifort 14.0.4 is not officially supported under the OS X 10.11.5 so that also means it was never tested. We introduced support for that version of OS X in our 16.0.4 release (almost 2 years later). You should consider upgrading to a newer version when its convenient.
If you do not explicitly source compilervars.sh/csh and pick an architecture, the default ifort link setup on OS X most times refers to Intel 64. It is gated by what was installed last.
To check use: ifort -V
Yes, indeed, ifort-V returned
"Intel(R) Fortran Compiler XE for applications running on IA-32, Version 18.104.22.168 Build 20140805"
Changed path in .profile from ...bin/ia32 to ...bin/intel64 and ... everything works fine:
ifort -V returns
"Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 22.214.171.124 Build 20140805"
as it should and all RAM can be used.
Thank you very much for your help!