[mpich-discuss] Modifying ssh calls for MPICH2

Jed Brown jedbrown at mcs.anl.gov
Tue Jan 17 18:13:58 CST 2012


On Tue, Jan 17, 2012 at 17:58, Pavan Balaji <balaji at mcs.anl.gov> wrote:

> Not unless you specified the optimization flags in CFLAGS.  The README has
> information on how to give an optimization flag only to MPICH2, and not the
> application it's compiling.


I'm aware of this, however

1. autoconf convention is that ./configure CFLAGS=... affects the flags
that are used to build the library, but generally do not affect the
semantics of the thing being built.

2. The packaging environments for many Linux distributions set CFLAGS
according to some convention, possibly modified by the user's preferences.
The result is that each packager eventually learns that MPICH2 is special
and they write something like the following. New distributions,
institutions rolling their own packages, and users compiling from source
themselves tend not to know about this special case, so we still see it
frequently on petsc-maint.

https://aur.archlinux.org/packages/mp/mpich2/PKGBUILD :

  # CFLAGS etc are normally written into the wrapper compilers.  This
  # gives surprising results, e.g. when the user wants to compile their
  # program without optimization.
  export MPICH2LIB_CFLAGS="$CFLAGS";      unset CFLAGS
  export MPICH2LIB_CXXFLAGS="$CXXFLAGS";  unset CXXFLAGS
  export MPICH2LIB_FFLAGS="$FFLAGS";      unset FFLAGS
  export MPICH2LIB_F90FLAGS="$F90FLAGS";  unset F90FLAGS
  export MPICH2LIB_LDFLAGS="$LDFLAGS";    unset LDFLAGS

(This needs to unset LDFLAGS because -Wl,--as-needed breaks the wrappers.)


http://packages.debian.org/sid/mpich2 :

DEB_CONFIGURE_SCRIPT_ENV += MPICH2LIB_CFLAGS="$(CFLAGS)" CFLAGS=""
DEB_CONFIGURE_SCRIPT_ENV += MPICH2LIB_CXXFLAGS="$(CXXFLAGS)" CXXFLAGS=""
DEB_CONFIGURE_SCRIPT_ENV += MPICH2LIB_FFLAGS="$(FFLAGS)" FFLAGS=""
DEB_CONFIGURE_SCRIPT_ENV += MPICH2LIB_FCFLAGS="$(FCFLAGS)" FCFLAGS=""


If it were up to me, I would have used CFLAGS et al to build MPICH2 (as per
convention) and have MPICH2WRAPPER_CFLAGS, etc, for those users that wanted
to add something to the wrappers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20120117/bc576b5f/attachment-0001.htm>


More information about the mpich-discuss mailing list