PVF problems with visual studio 2010

Greetings. I apologise in advance if I am not using the correct subforum, but there is no explicit forum for technical issues, and this is the closest match I found.

I am attempting to get a feel for PVF, and am using the 14-day trial. I initially tried out the “hello world” example from the user guide,

program main   

implicit none
print *, "Hello World"

end program main

but while it compiles it crashes when run, giving the error message “HelloWorld.exe has stopped working”. I have tried compiling with the fortran compiler in Cygwin, and the same program both compiles and runs there, so I assume there is some configuration issue, but I have been completely unable to figure out what it could be.

I hope someone here could shed some light on what I might be doing wrong.

Thanks in advance.

Presumably, you have GDB installed with Cygwin.

If so, and you run the PGI compiled HelloWorld.exe under GDB, you may obtain more information about what causes the compiled program to fail.

Good idea, this is what I get from gdb:

Program received signal SIGILL, Illegal instruction.
0x00401151 in ?? ()

I took a peek in the disassembly in vs2010, and these are the surrounding lines:

401146 popl %eax
401147 subl $0x8,%esp
40114A movl $0x456064,(%esp)
401151 lds %eax,%edi
401153 ja 0xFFFFFFE8 <0x40113D>
401155 popl %es
401156 sldt (%eax)

When running in debug mode in vs2010 the line prefixed with 401151 is indeed where the program seems to hang.

I’m not sure how useful all of this is, but hopefully someone can make sense of it…

Some of those instructions are unexpected – they manipulate segment register contents. Beyond that, I am stumped. Sorry!

Hi torkelh,

What type of processor are you using? My guess it’s a Intel Sandybridge and hence by default, PGI will produce AVX instructions. However, you need to have Windows 7 SP2 installed, since prior versions do not recognise AVX and your program will immediately fail at runtime.

To fix, either update your Windows version or target an older processor (such as -tp nehalem-64) so that AVX instructions aren’t used.

Hope this helps,

Thank you!

This certainly seems to have solved the problem. Your response is much appreciated.