PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Course

PVF problems with visual studio 2010
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
torkelh



Joined: 30 Jan 2012
Posts: 3

PostPosted: Tue Jan 31, 2012 2:43 am    Post subject: PVF problems with visual studio 2010 Reply with quote

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,

Code:

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.
Back to top
View user's profile
mecej4



Joined: 19 Jun 2011
Posts: 62

PostPosted: Tue Jan 31, 2012 4:58 am    Post subject: Re: PVF problems with visual studio 2010 Reply with quote

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.
Back to top
View user's profile
torkelh



Joined: 30 Jan 2012
Posts: 3

PostPosted: Tue Jan 31, 2012 6:44 am    Post subject: Reply with quote

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...
Back to top
View user's profile
mecej4



Joined: 19 Jun 2011
Posts: 62

PostPosted: Tue Jan 31, 2012 10:20 am    Post subject: Reply with quote

Some of those instructions are unexpected -- they manipulate segment register contents. Beyond that, I am stumped. Sorry!
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6700
Location: The Portland Group Inc.

PostPosted: Fri Feb 03, 2012 10:37 am    Post subject: Reply with quote

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,
Mat
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group