PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

pgcc version inconsistencies

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
David Pimentel



Joined: 23 Apr 2009
Posts: 3

PostPosted: Mon Apr 23, 2012 4:07 pm    Post subject: pgcc version inconsistencies Reply with quote

I compile the following example code using both pgcc 11.4 and 12.3:

Code:
#include <stdio>
#include <float>

int main ()
{
  printf("DBL_MIN = %e\n", DBL_MIN);
  printf("DBL_MAX = %e\n", DBL_MAX);

  return 0;
}


pgcc Version 11.4 is successful:

Code:
machine 531: pgcc -V -o dbl_max_test.x dbl_max_test.c

pgcc 11.4-0 64-bit target on x86-64 Linux -tp istanbul
Copyright 1989-2000, The Portland Group, Inc.  All Rights Reserved.
Copyright 2000-2011, STMicroelectronics, Inc.  All Rights Reserved.
PGC/x86-64 Linux 11.4-0
Copyright 1989-2000, The Portland Group, Inc.  All Rights Reserved.
Copyright 2000-2011, STMicroelectronics, Inc.  All Rights Reserved.
godzilla.lanl.gov 532: pgcc -V -v -o dbl_max_test.x dbl_max_test.c

pgcc 11.4-0 64-bit target on x86-64 Linux -tp istanbul
Copyright 1989-2000, The Portland Group, Inc.  All Rights Reserved.
Copyright 2000-2011, STMicroelectronics, Inc.  All Rights Reserved.

/opt/local/vendor/pgi-11.4/linux86-64/11.4/bin/pgc dbl_max_test.c -opt 1 -version -x 119 0xa10000 -x 122 0x40 -x 123 0x1000 -x 127 4 -x 127 17 -x 19 0x400000 -x 28 0x40000 -x 120 0x10000000 -x 70 0x8000 -x 122 1 -x 125 0x20000 -quad -x 59 4 -x 59 4 -tp istanbul -x 120 0x1000 -astype 0 -stdinc /opt/local/vendor/pgi-11.4/linux86-64/11.4/include-gcc41:/opt/local/vendor/pgi-11.4/linux86-64/11.4/include:/usr/local/include:/usr/lib/gcc/x86_64-redhat-linux/4.1.2/include:/usr/lib/gcc/x86_64-redhat-linux/4.1.2/include:/usr/include -def unix -def __unix -def __unix__ -def linux -def __linux -def __linux__ -def __NO_MATH_INLINES -def __x86_64__ -def __LONG_MAX__=9223372036854775807L -def '__SIZE_TYPE__=unsigned long int' -def '__PTRDIFF_TYPE__=long int' -def __THROW= -def __extension__= -def __amd64__ -def __SSE__ -def __MMX__ -def __SSE2__ -def __SSE3__ -def __SSE4A__ -def __ABM__ -predicate '#machine(x86_64) #lint(off) #system(posix) #cpu(x86_64)' -cmdline '+pgcc dbl_max_test.c -V -v -o dbl_max_test.x' -x 123 0x80000000 -x 123 4 -x 2 0x400 -x 119 0x20 -def __pgnu_vsn=40102 -alwaysinline /opt/local/vendor/pgi-11.4/linux86-64/11.4/lib/libintrinsics.il 4 -x 120 0x200000 -asm /tmp/pgccVfLenHYQPQlN.s
PGC/x86-64 Linux 11.4-0
Copyright 1989-2000, The Portland Group, Inc.  All Rights Reserved.
Copyright 2000-2011, STMicroelectronics, Inc.  All Rights Reserved.
PGC-I-0222-Redundant definition for symbol __THROW (/usr/include/sys/cdefs.h: 63)
PGC-I-0222-Redundant definition for symbol __extension__ (/usr/include/sys/cdefs.h: 287)
PGC/x86-64 Linux 11.4-0: compilation completed with informational messages

/usr/bin/as /tmp/pgccVfLenHYQPQlN.s -o /tmp/pgccNfLe1QM0hcO-.o

/usr/bin/ld /usr/lib64/crt1.o /usr/lib64/crti.o /opt/local/vendor/pgi-11.4/linux86-64/11.4/lib/trace_init.o /usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtbegin.o /opt/local/vendor/pgi-11.4/linux86-64/11.4/lib/initmp.o -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 /opt/local/vendor/pgi-11.4/linux86-64/11.4/lib/pgi.ld -L/opt/local/vendor/pgi-11.4/share_objects/lib64 -L/opt/local/vendor/pgi-11.4/linux86-64/11.4/lib -L/usr/lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 /tmp/pgccNfLe1QM0hcO-.o -rpath /opt/local/vendor/pgi-11.4/share_objects/lib64 -rpath /opt/local/vendor/pgi-11.4/linux86-64/11.4/lib -o dbl_max_test.x /opt/local/vendor/pgi-11.4/linux86-64/11.4/lib/nonuma.o -lpgmp -lpthread -lnspgc -lpgc -lm -lgcc -lc -lgcc /usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtend.o /usr/lib64/crtn.o
Unlinking /tmp/pgccVfLenHYQPQlN.s
Unlinking /tmp/pgccNfLe1QM0hcO-.o
godzilla.lanl.gov 533: db
db2dvi               db41_dump            db42_checkpoint      db42_verify          db_printlog          dbilogstrip          dbus-launch
db2html              db41_load            db42_deadlock        db_archive           db_recover           dbimp                dbus-monitor
db2pdf               db41_printlog        db42_dump            db_checkpoint        db_stat              dbiprof              dbus-send
db2ps                db41_recover         db42_load            db_codegen           db_upgrade           dbiproxy             dbus-uuidgen
db2rtf               db41_stat            db42_printlog        db_deadlock          db_verify            dbl_max_test.x       
db41_archive         db41_upgrade         db42_recover         db_dump              dbconverter-2        dbus-binding-tool   
db41_checkpoint      db41_verify          db42_stat            db_hotbackup         dbcp                 dbus-cleanup-sockets
db41_deadlock        db42_archive         db42_upgrade         db_load              dbdump               dbus-daemon         


pgcc Version 12.3 fails:

Code:
machine 539: pgcc -V -v -o dbl_max_test.x dbl_max_test.c

pgcc 12.3-0 64-bit target on x86-64 Linux -tp istanbul
Copyright 1989-2000, The Portland Group, Inc.  All Rights Reserved.
Copyright 2000-2012, STMicroelectronics, Inc.  All Rights Reserved.

/opt/local/vendor/pgi-12.3/linux86-64/12.3/bin/pgc dbl_max_test.c -opt 1 -version -x 119 0xa10000 -x 122 0x40 -x 123 0x1000 -x 127 4 -x 127 17 -x 19 0x400000 -x 28 0x40000 -x 120 0x10000000 -x 70 0x8000 -x 122 1 -x 125 0x20000 -quad -x 59 4 -x 59 4 -tp istanbul -x 120 0x1000 -astype 0 -stdinc /opt/local/vendor/pgi-12.3/linux86-64/12.3/include:/usr/local/include:/usr/lib/gcc/x86_64-redhat-linux/4.1.2/include:/usr/lib/gcc/x86_64-redhat-linux/4.1.2/include:/usr/include -def unix -def __unix -def __unix__ -def linux -def __linux -def __linux__ -def __NO_MATH_INLINES -def __x86_64__ -def __LONG_MAX__=9223372036854775807L -def '__SIZE_TYPE__=unsigned long int' -def '__PTRDIFF_TYPE__=long int' -def __THROW= -def __extension__= -def __amd64__ -def __SSE__ -def __MMX__ -def __SSE2__ -def __SSE3__ -def __SSE4A__ -def __ABM__ -predicate '#machine(x86_64) #lint(off) #system(posix) #cpu(x86_64)' -cmdline '+pgcc dbl_max_test.c -V -v -o dbl_max_test.x' -x 123 0x80000000 -x 123 4 -x 2 0x400 -x 119 0x20 -def __pgnu_vsn=40102 -alwaysinline /opt/local/vendor/pgi-12.3/linux86-64/12.3/lib/libintrinsics.il 4 -x 120 0x200000 -asm /tmp/pgccOHoh44xSBGj7.s
PGC/x86-64 Linux 12.3-0
Copyright 1989-2000, The Portland Group, Inc.  All Rights Reserved.
Copyright 2000-2012, STMicroelectronics, Inc.  All Rights Reserved.
PGC-I-0222-Redundant definition for symbol __THROW (/usr/include/sys/cdefs.h: 63)
PGC-I-0222-Redundant definition for symbol __extension__ (/usr/include/sys/cdefs.h: 287)
PGC-S-0039-Use of undeclared variable __DBL_MIN__ (dbl_max_test.c: 6)
PGC-S-0039-Use of undeclared variable __DBL_MAX__ (dbl_max_test.c: 7)
PGC/x86-64 Linux 12.3-0: compilation completed with severe errors
pgcc-Fatal-ccompile completed with exit code 1

Unlinking /tmp/pgccOHoh44xSBGj7.s


The float.h is found for pgcc 11.4 as follows::

Code:
machine 541: find /opt/local/vendor/pgi-11.4/linux86-64/11.4 -name float.h
/opt/local/vendor/pgi-11.4/linux86-64/11.4/include/float.h


The float.h is found for pgcc 12.3 as follows::

Code:
machine 542: find /opt/local/vendor/pgi-12.3/linux86-64/12.3 -name float.h
/opt/local/vendor/pgi-12.3/linux86-64/12.3/include-gcc41/float.h
/opt/local/vendor/pgi-12.3/linux86-64/12.3/include-gcc40/float.h
/opt/local/vendor/pgi-12.3/linux86-64/12.3/include-gcc34/float.h
/opt/local/vendor/pgi-12.3/linux86-64/12.3/include-gcc33/float.h


I do not know if this is a problem with our installation of 12.3 or is a bug. Any help is appreciated.[/code]
Back to top
View user's profile
David Gunter



Joined: 15 Sep 2005
Posts: 25

PostPosted: Tue Apr 24, 2012 8:16 am    Post subject: Reply with quote

I thought at first that your mistake is leaving out the ".h" extension to the header files. But after typing my reply I discovered that this wonderful forum removes the extensions inside the code tags.

So assuming you actually did include the <stdio.h> and <float.h> headers correctly, I was able to compile this test code with no errors using PGI 10.9, 11.1, 12.1 and 12.4. They all gave the same answer as well.

-david
Back to top
View user's profile
David Pimentel



Joined: 23 Apr 2009
Posts: 3

PostPosted: Tue Apr 24, 2012 9:16 am    Post subject: Thanks Reply with quote

I did include the .h extensions in test code. Interesting that the forum software hides them.

Thanks for the feedback. I will look into a faulty installation of the compiler.
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
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