PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Installation Problem with omp_lib.h

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Licenses and Installation
View previous topic :: View next topic  
Author Message
None



Joined: 27 Jul 2004
Posts: 5

PostPosted: Mon Jul 11, 2011 2:59 pm    Post subject: Installation Problem with omp_lib.h Reply with quote

I have just moved my installation to a new computer, re-installed it, and have obtained a permament license for my new installation. I obtained a demo program from www.openmp.org that is having a problem including the omp_lib.h include file. This is a standard Foratran 77 OpenMP demo program that computes pi from a series. The program includes the omp_lib.h include file:

implicit none

include 'omp_lib.h'

integer r8_logn_max
parameter ( r8_logn_max = 10 )


When I compile, this code, I am seeing a number of the following errors:

$ pgf77 -mp compute_pi.f -o compute_pi
PGFTN-S-0034-Syntax error at or near /opt/pgi/linux86-64/7.2-5/include/omp_lib.h: xx

Obviously, I am missing a lib enviroment variable or have some installation error.

If someone could suggest a solution, I would appreciate the information.


Thanks,
Jim West
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Jul 11, 2011 4:01 pm    Post subject: Reply with quote

Hi Jim,

The 'omp_lib.h' file that we ship includes F90 kind specifiers, hence the syntax error with the F77 compiler. You have a few options. Use the 'pgfortran' driver instead of 'pgf77', edit the 'omp_lib.h' to remove the F90 language features, or manually add the external refefence to OpenMP routines that you'll be using to your program.

Hope this helps,
Mat
Back to top
View user's profile
None



Joined: 27 Jul 2004
Posts: 5

PostPosted: Tue Jul 12, 2011 7:08 am    Post subject: Reply with quote

Thanks Mat!
Your note really help explain this situation.
I thought using pgf77 to complie this code would work since the included scripts used "gfortran -openmp". Given your note, I located a F90 version of compute_pi and that compiled fine with the pgf90 compiler.

Thanks,
Jim
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Licenses and Installation All times are GMT - 7 Hours
Page 1 of 1

 
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