[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: icc dependency generation

From: Akim Demaille
Subject: Re: icc dependency generation
Date: Thu, 26 Jun 2003 14:47:24 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

 > On Thu, Jun 26, 2003 at 11:23:04AM +0200, Ralf Wildenhues wrote:
 >> Intel compiler icc version 7.1 handles the -MF option inconsistently.
 >> Documentation states that it has to be used together with -M or -MM.
 >> If used with -MD, for example, it will replace the file ending with .d:
 > [...]
 >> Subsequently, the depcomp 'icc' mode will not be detected correctly
 >> during the ./configure run, since it uses '-MD -MF'.

 > This sucks.  If -MF cannot work with -MD, depcomp will have to call icc
 > twice: one time to get dependency information, and another time to do
 > the actual compilation.  This will be slower.

 > Or we could use -MD alone, but as ICC does respect subdirectories (at
 > least with ICC 7.0, compiling foo/bar.c with -MD would create ./bar.d
 > instead of foo/bar.d -- could you check this with 7.1?) we'd need to
 > implement some locking scheme in depcomp so that compiling foo/bar.c
 > and baz/bar.c in parallel do not write the same bar.d.

 >> Any suggestions?

 > Complain to Intel, if not already done.

 >> Which compiler version is the current depcomp supposed
 >> to work with?

 > 7.0

Err, maybe my message went unnoticed, but you might find additional
information here too.

From: Akim Demaille <address@hidden>
Subject: Re: Icc 7.0, distcc, Automake
To: address@hidden
cc: Automake List <address@hidden>
Date: Thu, 26 Jun 2003 11:01:12 +0200
X-Sent: 3 hours, 45 minutes, 35 seconds ago

For the records, I'm using the following script.  It results in a
correct compilation with Automake, Icc, and Distcc.

[4. text/x-sh; dicc]

#! /bin/sh


# ICC needs to be taught that *.ii is C++.
# The wonderful news is that:
# % /home/lrde/lrde/usr/bin/icc I-dont-exist
# ld: cannot open I-dont-exist: No such file or directory
# % /home/lrde/lrde/usr/bin/icc -c I-dont-exist
# icc per se does not complain about missing files...  That's
# why understanding the problems takes so long....
case "$@" in
  *.cc*|*.cpp*) set -- -Kc++ "$@" ;;

# ICC is not able to honor both -E and -M, but Automake wants -M,
# and -E will be added by distcc.
case "$@" in
  # Push a token among the arguments that will be used to notice when we
  # ended options/arguments parsing.
  set -- "$@" "$arg_sep"
  # Parse command line arguments.
  while test x"$1" != x"$arg_sep"; do
    case "$1" in
      -MF) shift
           minus_M_args="$minus_M_args -MF$1" ;;               
      -M*) minus_M_args="$minus_M_args $1" ;;
      -E)  minus_E=-E;;
      *) set -- "$@" "$1";;
  # Pop the token
if test "x$minus_E" != x; then
  echo "$0: don't know what to do with -E" >&2

if test "x$minus_M_args" != x; then
  $icc $minus_M_args "$@"
exec /usr/bin/distcc $icc "$@"

But the speedup is really miserable: none AFAICS (on several runs).  I
must say that my src hierarchy is poor for -j, as it heavily uses
Automake and many small modules compiled sequentially.  Here are the
figure I get:

make -j4 CC=icc CXX=icc  250,09s user 17,22s system 46% cpu 9:38,68 total

make -j4 CC=dicc CXX=dicc  257,89s user 22,69s system 55% cpu 8:22,51 total

reply via email to

[Prev in Thread] Current Thread [Next in Thread]