PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

CUDA Fortran samples compilation problem
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
hupca_ovidiu



Joined: 16 Oct 2009
Posts: 3

PostPosted: Fri Oct 16, 2009 5:09 am    Post subject: CUDA Fortran samples compilation problem Reply with quote

Hello,

I am using PGI 9.0-4 for Fortran and I am trying to complile the GPU samples in /etc/samples. However, I get the following list of errors.

My configuration is:

Fedora 10 X86_64
gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
PGI 9.0-4
NVIDIA CUDA 2.2

ENVIRONMENT VARIABLES:
Quote:


PATH=/usr/lib64/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/apophys/bin:/usr/local/cuda/bin:/opt/pgi/linux86-64/9.0-4/bin

PGI=/opt/pgi





ERRORS:
Quote:


NOTE: your trial license will expire in 14 days, 9.95 hours.
NOTE: your trial license will expire in 14 days, 9.95 hours.
/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/x86_64-redhat-linux/bits/c++config.h(1642): error: expected a "{"

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/bits/cpp_type_traits.h(74): error: expected a "{"

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/bits/cpp_type_traits.h(81): error: expected a "{"

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/bits/cpp_type_traits.h(299): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/bits/cpp_type_traits.h(299): error: too many arguments for class template "<error>::__is_normal_iterator"

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/bits/cpp_type_traits.h(299): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/bits/cpp_type_traits.h(299): error: too many arguments for class template "<error>::__is_normal_iterator"

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/bits/cpp_type_traits.h(299): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/bits/cpp_type_traits.h(299): error: too many arguments for class template "<error>::__is_normal_iterator"

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(43): error: expected a "{"

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(70): error: namespace "std" has no member "__is_integer"

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(70): error: type name is not allowed

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(70): error: too few arguments for class template "<error>::__enable_if"

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(70): error: explicit type is missing ("int" assumed)

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(70): error: explicit type is missing ("int" assumed)

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(70): error: template parameter "_Tp" may not be redeclared in this scope

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(70): error: expected a ";"

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(73): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(113): error: namespace "std" has no member "__is_integer"

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(113): error: type name is not allowed

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(113): error: too few arguments for class template "<error>::__enable_if"

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(113): error: explicit type is missing ("int" assumed)

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(113): error: explicit type is missing ("int" assumed)

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(113): error: template parameter "_Tp" may not be redeclared in this scope

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(113): error: expected a ";"

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(116): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(164): error: namespace "std" has no member "__is_integer"

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(164): error: type name is not allowed

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(164): error: the global scope has no "__value"

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(169): error: a template argument list is not allowed in a declaration of a primary template

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(176): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(177): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(187): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(188): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(189): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(199): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(200): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(201): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/ext/type_traits.h(202): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(82): error: expected a "{"

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(121): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(121): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(137): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(137): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(153): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(153): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(170): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(171): error: expected an identifier

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(171): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(170): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(171): error: expected an identifier

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(171): error: "typename" may not be specified here

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(171): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(191): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(191): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(207): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(207): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(223): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(223): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(239): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(239): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(255): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(255): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(271): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(271): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(297): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(297): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(313): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(313): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(329): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(329): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(345): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(345): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(385): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(386): error: expected an identifier

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(386): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(385): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(386): error: expected an identifier

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(386): error: "typename" may not be specified here

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(386): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(406): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(406): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(422): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(422): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(438): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(438): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(454): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(454): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(470): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(470): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(475): error: expected a ";"

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(483): error: expected a "{"

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(505): error: expected a "{"

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(508): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(508): error: name followed by "::" must be a class or namespace name

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cmath(615): error: expected a ";"

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/bits/cmath.tcc(40): error: expected a "{"

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cstddef(53): error: expected a "{"

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cstdlib(105): error: expected a "{"

/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/cstdlib(162): error: expected a "{"

Error limit reached.
100 errors detected in the compilation of "/tmp/pgnvdqQ4hWzw7PRrm.nv0".
Compilation terminated.
PGF90-F-0000-Internal compiler error. pgnvd job exited with nonzero status code 0 (f1.f90: 53)
make: *** [f1.exe] Error 2



Seems like a configuration problem. Does anybody know a solution?

Thank you
Back to top
View user's profile
mkcolg



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

PostPosted: Fri Oct 16, 2009 7:36 am    Post subject: Reply with quote

Hi hupca_ovidiu,

From our FAQs http://www.pgroup.com/userforum/viewtopic.php?t=1488

Q. When I try to compile any accelerator program I get the follow error messages:

Code:

% make f1.exe
pgfortran -o f1.exe f1.f90 -ta=nvidia -Minfo=accel -fast
/usr/include/c++/4.3/x86_64-suse-linux/bits/c++config.h(1642): error: expected a "{"

/usr/include/c++/4.3/bits/cpp_type_traits.h(74): error: expected a "{"

/usr/include/c++/4.3/bits/cpp_type_traits.h(81): error: expected a "{"

/usr/include/c++/4.3/bits/cpp_type_traits.h(299): error: name followed by "::" must be a class or namespace name

/usr/include/c++/4.3/bits/cpp_type_traits.h(299): error: too many arguments for class template "<error>::__is_normal_iterator"

/usr/include/c++/4.3/bits/cpp_type_traits.h(299): error: name followed by "::" must be a class or namespace name
... continues


A. This error is caused by an incompatibility between the GNU g++ 4.3 header files and the NVIDIA installation. To work around this issue add the line "set GCCVERSION=40301" line to your $PGI/linux86-64/<release>/bin/sitenvrc file.

For example:
Code:

cat /usr/pgi/linux86-64/9.0-1/bin/sitenvrc
set NVOPEN64DIR=/opt/cuda/open64/lib;
set CUDADIR=/opt/cuda/bin;
set CUDALIB=/opt/cuda/lib;
set GCCVERSION=40301;


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



Joined: 16 Oct 2009
Posts: 3

PostPosted: Mon Oct 19, 2009 5:52 am    Post subject: Reply with quote

Thank you, that was it.

I looked through some of the threads on the forum before posting, but that one's title didn't seem to relate to my problem...

Ovidiu
Back to top
View user's profile
Discover



Joined: 27 Jul 2006
Posts: 4

PostPosted: Fri Mar 11, 2011 5:27 pm    Post subject: Still having this problem Reply with quote

I know that this is a pretty ancient thread but I am still seeing this problem at our site. Setting the sitenvrc does not seem to help.

The original pgi compiler install was done under SLES10 which had an earlier version of GCC than under SLES11. I have tried creating a .mypgirc file that has the settings that would be placed under the localrc for the install. This seems to allow me to compile trivial code (hello world, etc) but if you attempt to use the pgi cudo fortran features you get the same list of errors as displayed in the original post.

I attempted to open up a support ticket but didn't get any response. I am hoping someone else here has an idea. I can try re-installing the compilers under an alternative location but I would really like to avoid that if possible.

thanks
Nick
Back to top
View user's profile
mkcolg



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

PostPosted: Fri Mar 11, 2011 6:13 pm    Post subject: Reply with quote

Hi Nick,

"sitenvrc" was deprecated and the GCCVERSION setting should now be placed in "localrc". Though, you'll also need to change in 'localrc' the location of the GCC directories as well. Note that the easiest thing to do when upgrading the OS, would be to also reinstall the compilers. While not necessary, it makes sure all the correct bits are set.
Quote:

I attempted to open up a support ticket but didn't get any response
I ask our Customer Support but unfortunately they haven't seen a mail for you. When did you send it and to which email account?

Best regards,
Mat
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming 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