Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Beginner
18 Views

Virtual machine and OpenMP issue

I am running VMware 8.1.0 on a Mac Laptop with OS X El Capitan. In the virtual machine, I have installed Windows 7 with Microsoft Visual Studio 2012 (Professional Edition) and Intel® Parallel Studio XE Professional Edition for Fortran Windows (2017). The virtual machine has 4 processors allocated.

My issue arises when I try running a code containing OpenMP directives. This code runs fine on a PC with Windows 7 and Microsoft Visual Studio 2012 (Professional Edition) and Intel® Parallel Studio XE Professional Edition for Fortran Windows (2016).

I have compiled the code in Release with the following options:

/nologo /O3 /free /Qopenmp /warn:all /fpe:0 /module:"x64\Release\\" /object:"x64\Release\\" /Fd"x64\Release\vc110.pdb" /libs:dll /threads /c

-heap-arrays

When I press start, I get the following error:

“Debugging information for test3.exe cannot be found or does not match. Binary was not built with debug information. Do you want to continue debugging?”

If I say yes, the code crashed:

“Microsoft Visual Studio C Runtime Library has detected a fatal error in test3.exe”

The error is in dbghook.c. In another forum I found to try Crtl+F5; in this case I get:

“severe (170): Program exception – stack overflow”

I also get this error if I try to run the exe from the command line.

The code is not in a shared folder between mac and windows.

Here is the test code I am running:

program main
	
	implicit none
	real,dimension(20,300,300) :: a
	integer :: i,j,k
	
	!$OMP parallel do private(i,j,k)
	do k = 1,20
		do j = 1,300
			do i = 1,300
				a(i,j,k) = i+j+k
			enddo
		enddo
	enddo
	!$OMP end parallel do
	
	print*,'end'
	read(*,*)
	
	end

 

0 Kudos
4 Replies
Highlighted
18 Views

I can reproduce this on a

I can reproduce this on a normal Windows system. Perhaps you just need enough cores. The default stack on Windows is quite small, and this program appears to need more than the default 1MB. Try building with /link /stack:10000000 . In Visual Studio this is Linker > System > Stack Reserve Size.

In some OpenMP programs you might also need to set the OMP_STACK_SIZE environment variable, but not this one.

Retired 12/31/2016
0 Kudos
Highlighted
New Contributor II
18 Views

You appear to have the

You appear to have the dimensions out of order:

Try real,dimension(300,300,20) :: a

or to overcome the stack problem I would prefer:

real,allocatable,dimension(:,:,:) :: a

allocate ( a(300,300,20) )

0 Kudos
Highlighted
Beginner
18 Views

Steve I tried both

Steve, I tried both suggestions but they did not work, I still receive the msg and cannot run the code in Release mode with OpenMP + Optimizations.

John, sorry for the example, the code I have is huge and works well on a different machine. I was trying to put together a simpler example to test. You're correct that the dimensions were wrong.

Any other thing I could do?

Sara

0 Kudos
Highlighted
18 Views

You may need to increase the

You may need to increase the stack further. Experiment with larger numbers, but don't start out insanely big as this will then reduce available memory elsewhere. 

I corrected your array indexing and built and ran with and without increasing the stack.As you can see here, it worked.

C:\Projects>ifort /Qopenmp U696391.f90
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R
) 64, Version 17.0.0.109 Build 20160721
Copyright (C) 1985-2016 Intel Corporation.  All rights reserved.

Microsoft (R) Incremental Linker Version 14.00.24210.0
Copyright (C) Microsoft Corporation.  All rights reserved.

-out:U696391.exe
-subsystem:console
-defaultlib:libiomp5md.lib
-nodefaultlib:vcomp.lib
-nodefaultlib:vcompd.lib
U696391.obj

C:\Projects>U696391.exe
forrtl: severe (170): Program Exception - stack overflow
Image              PC                Routine            Line        Source

U696391.exe        000000013FE7D838  Unknown               Unknown  Unknown
U696391.exe        000000013FE21032  Unknown               Unknown  Unknown
U696391.exe        000000013FE7D61E  Unknown               Unknown  Unknown
U696391.exe        000000013FE7DA59  Unknown               Unknown  Unknown
kernel32.dll       00000000770859CD  Unknown               Unknown  Unknown
ntdll.dll          00000000771BA2E1  Unknown               Unknown  Unknown

C:\Projects>ifort /Qopenmp U696391.f90 /link /stack:10000000
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R
) 64, Version 17.0.0.109 Build 20160721
Copyright (C) 1985-2016 Intel Corporation.  All rights reserved.

Microsoft (R) Incremental Linker Version 14.00.24210.0
Copyright (C) Microsoft Corporation.  All rights reserved.

-out:U696391.exe
-subsystem:console
-defaultlib:libiomp5md.lib
-nodefaultlib:vcomp.lib
-nodefaultlib:vcompd.lib
/stack:10000000
U696391.obj

C:\Projects>U696391.exe
 end

 

Retired 12/31/2016
0 Kudos