PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Course

Warnings about macro offsetof

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



Joined: 17 May 2007
Posts: 14

PostPosted: Wed Jan 06, 2010 1:59 pm    Post subject: Warnings about macro offsetof Reply with quote

I'm installing PGI 9.0-3 on a production Linux cluster. We've had this version available for "friendly-users" for a couple of months, and had no reports of problems, nor had I seen any in my own testing. Today, I'm getting the following:

PGC-W-0258-Argument 1 in macro offsetof is not identical to previous definition (/usr/lib/gcc/x86_64-redhat-linux/3.4.5/include/stddef.h: 414)
PGC-W-0258-Argument 2 in macro offsetof is not identical to previous definition (/usr/lib/gcc/x86_64-redhat-linux/3.4.5/include/stddef.h: 414)


when compiling a trivial OpenMPI C program. I see this with all the OpenMPIs currently available on this cluster, namely, 1.2.4, 1.3.2, 1.3.3, and 1.4.

My first guess was that there was something wrong with my production build, so I went back to my "friendly" 9.0-3 installation. Same warnings - which I did not get previously.

1. How important is this warning? ;-) Because that's what my users are going to ask.

2. It doesn't look like there have been any changes to the gcc or any of the OpenMPIs in quite a while (except the 1.4 is a much newer build, of course). What else can I look at for possible causes?
Back to top
View user's profile
gap



Joined: 17 May 2007
Posts: 14

PostPosted: Wed Jan 06, 2010 4:18 pm    Post subject: A little more info Reply with quote

The reported problem exists on a RHEL4 cluster. I have separate "friendly" builds on a RHEL5 cluster, and a Fedora 9 cluster, and I do not see the same warning on those clusters.

Digging into the differences, I see that all three clusters have a short "stddef.h" file in the include directory. All three redefine the macro "__builtin_offsetof". The RHEL4 cluster, and ONLY the RHEL4 cluster, also redefines "offsetof" from the macro in the gcc include file. So help me understand what problem we're solving here, starting with PGI 9.

We are still trying to figure out how none of the friendly users (including me) ever saw this before today.
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Jan 06, 2010 5:10 pm    Post subject: Reply with quote

Hi Gap,

The GNU definitions for "offsetof" changed between RHEL4 and RHEL5 with the RHEL4 version being incomparable with PGI. Hence, we needed to provide our own definition of "offsetof" on RHEL4.

However, the PGI stddef.h include file first undefines "offsetof" before defining the PGI version. I'm able to recreate your warnings but only if I remove the "undef". Perhaps your local PGI "stddef.h" file was modified?

- Mat
Back to top
View user's profile
gap



Joined: 17 May 2007
Posts: 14

PostPosted: Wed Jan 06, 2010 5:33 pm    Post subject: Reply with quote

mkcolg wrote:
Hi Gap,
<snip>
However, the PGI stddef.h include file first undefines "offsetof" before defining the PGI version. I'm able to recreate your warnings but only if I remove the "undef". Perhaps your local PGI "stddef.h" file was modified?

- Mat


I don't believe the PGI stddef.h was modified; in particular, the "undef" is there. The only time I receive the warnings is when OpenMPI is in the mix. That is, a plain ol' C compile doesn't have any problems. So I'm leaning towards worrying that the local OpenMPI builds themselves are dependent on the PGI with which they were built - or rather, pre-9.0 builds aren't compatible with 9.0, at least in this tiny detail. Sigh.

We skipped version 8, by the way. Due to our conservative change control, I still had version 8 in early testing when 9.0 was released. The production OpenMPIs are built with 7.1-6 and 7.2-5.

More testing tomorrow.
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