[mpich2-dev] CFLAGS ordering in mpicc

Joe Ratterman jratt at us.ibm.com
Wed Jun 25 10:13:22 CDT 2008


We are looking at a problem reported by a user.  We recently moved some
files around in our system.  Previously, various communication include files
were located in the same dir as the MPI header files.  This was simple for
the users, but for various reasons they have been moved into another area,
which we added to the WRAPPER_CFLAGS var via the CFLAGS var at configure
time.

It seems that the user is having difficulty over-riding the built-in helper
directory.  For example:
mpicc -show -I/11111111111 -c foo.c -I/2222222222
cc -I/bgsys/drivers/ppcfloor/comm/sys/include -I/11111111111 -c foo.c
-I/2222222222 -I/bgsys/drivers/ppcfloor/comm/include
MPI Files : /bgsys/drivers/ppcfloor/comm/include
Other comm includes (that the user hopes to over-ride) :
/bgsys/drivers/ppcfloor/comm/sys/include

The following are the interesting lines in the mpicc file
prefix=/bgsys/drivers/ppcfloor/comm
includedir=${prefix}/include
WRAPPER_CFLAGS="-I/bgsys/drivers/ppcfloor/comm/sys/include"
CFLAGS="$WRAPPER_CFLAGS"
$Show $CC $CFLAGS "${allargs[@]}" -I$includedir

It doesn't really seem correct (in this case anyway) to have CFLAGS ahead of
the user args.  Is there a specific reason that I am missing?  Is it
something that should be changed?
MPICH2 Version 1.0.7


Thanks,
Joe Ratterman
jratt at us.ibm.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mcs.anl.gov/mailman/private/mpich2-dev/attachments/20080625/ca956f74/attachment.htm>


More information about the mpich2-dev mailing list