Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] RFC: Use automake "silent rules"
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2009-10-26 10:42:21


WHAT: Change OMPI's verbose build output to use Automake's new
"silent" rules output (see below)

WHEN: For the 1.5 series (no particular release targeted)

WHY: Tidy up the output from "make all"; a nice side effect is that it
becomes significantly easier to see compiler warnings

WHERE: configure.ac., ROMIO and VT's configure.in scripts (see patch
below)

TIMEOUT: Tuesday teleconf, Nov 3 (next week).

=================================================================

Details:

In the hwloc project, Pavan from Argonne suggested using Automake
1.11's new "silent rules" option to significantly reduce the output
during "make all". For example, our current output looks like this:

libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../opal/include -
I../../orte/include -I../../opal/mca/paffinity/linux/plpa/src/libplpa -
I../.. -g -Wall -Wundef -Wno-long-long -Wsign-compare -Wmissing-
prototypes -Wstrict-prototypes -Wcomment -pedantic -Werror-implicit-
function-declaration -finline-functions -fno-strict-aliasing -pthread -
fvisibility=hidden -MT opal_datatype_destroy.lo -MD -MP -MF .deps/
opal_datatype_destroy.Tpo -c opal_datatype_destroy.c -fPIC -DPIC -
o .libs/opal_datatype_destroy.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../opal/include -
I../../orte/include -I../../opal/mca/paffinity/linux/plpa/src/libplpa -
I../.. -g -Wall -Wundef -Wno-long-long -Wsign-compare -Wmissing-
prototypes -Wstrict-prototypes -Wcomment -pedantic -Werror-implicit-
function-declaration -finline-functions -fno-strict-aliasing -pthread -
fvisibility=hidden -MT opal_datatype_create_contiguous.lo -MD -MP -
MF .deps/opal_datatype_create_contiguous.Tpo -c
opal_datatype_create_contiguous.c -fPIC -DPIC -o .libs/
opal_datatype_create_contiguous.o

With the new silent rules, the output looks like this:

   CC opal_datatype_create_contiguous.lo
   CC opal_datatype_destroy.lo

Basically, the compile command line is not echoed. Compiler stdout/
stderr, of course, is still output. A nice side-effect is that you
can see compiler warnings MUCH easier. For example:

   CC btl_sctp_component.lo
   CC btl_sctp_frag.lo
btl_sctp_frag.c: In function `mca_btl_sctp_frag_large_send':
btl_sctp_frag.c:179: warning: int format, different type arg (arg 3)
btl_sctp_frag.c:179: warning: int format, different type arg (arg 5)
btl_sctp_frag.c: In function `mca_btl_sctp_frag_send':
btl_sctp_frag.c:303: warning: int format, different type arg (arg 3)
btl_sctp_frag.c:303: warning: int format, different type arg (arg 5)
   CC btl_sctp_proc.lo
   CC btl_sctp_recv_handler.lo

If you are using an Automake prior to v1.11, you won't see the new
silent rules -- it will automatically default back to the "verbose"
rules.

Note, too, that even with these changes, you can enable the verbose
"make all" output in one of two ways:

1. Add "V=1" to your "make" command line

    shell$ make all V=1

2. Add "--disable-silent-rules" to your "configure" command line:

    shell$ ./configure --disable-silent-rules ...

FWIW, "verbose" produces about 20x the output as "silent" when
building OMPI. Here's the size of outputs from two identical OMPI
builds on my system -- one with "make -j 4" and one with "make -j 4
V=1":

  * Silent output: 109 KB <-- kilobytes
  * Verbose output: 2.2 MB <-- megabytes

The one down side of using the silent rules by default is that we'll
get less diagnostic information when users send their build logs. I
think we should update the web page to request that users send build
logs of "make V=1", but I'm guessing that not everyone will do it.

The patch to do this is pretty small (adding 1 code line + 1 comment
in various configure.ac/configure.in script); I included it below for
review. Note that I did *not* silent-ize the libltdl build (which is
a dozen or so files in the beginning of the build) because we wholly
import libltdl at autogen time. I therefore didn't want to patch
libltdl (further) after importing it a) to remain as forward-
compatible as possible, and b) patching the imported libltdl build
system might be tricky in terms of timestamps / dependencies. So
those dozen-or-so files will still be "verbose", but the rest of the
files in OMPI will be "silent".

Thoughts / comments?

-- 
Jeff Squyres
jsquyres_at_[hidden]
Index: configure.ac
===================================================================
--- configure.ac	(revision 22139)
+++ configure.ac	(working copy)
@@ -55,6 +55,9 @@
  m4_pattern_allow([m4_ifval])
+# If Automake supports silent rules, enable them.
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
  # Make configure depend on the VERSION file, since it's used in  
AC_INIT
  AC_SUBST([CONFIGURE_DEPENDENCIES], ['$(top_srcdir)/VERSION'])
Index: ompi/mca/io/romio/romio/configure.in
===================================================================
--- ompi/mca/io/romio/romio/configure.in	(revision 22139)
+++ ompi/mca/io/romio/romio/configure.in	(working copy)
@@ -205,6 +205,9 @@
  # Open MPI: Init automake
  AM_INIT_AUTOMAKE(io-romio, 1.0.0, 'no')
+# Open MPI: If Automake supports silent rules, enable them.
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
  #
  # Check that an arch was set
  # If it wasn't set, try to guess using "util/tarch"
Index: ompi/contrib/vt/vt/configure.in
===================================================================
--- ompi/contrib/vt/vt/configure.in	(revision 22139)
+++ ompi/contrib/vt/vt/configure.in	(working copy)
@@ -6,6 +6,9 @@
  AM_INIT_AUTOMAKE(VampirTrace, 5.4.10)
  AM_CONFIG_HEADER(config.h)
+# Open MPI: If Automake supports silent rules, enable them.
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
  ACVT_CONF_INIT
  ACVT_CONF_TITLE([Initialization])
Index: ompi/contrib/vt/vt/extlib/otf/configure.in
===================================================================
--- ompi/contrib/vt/vt/extlib/otf/configure.in	(revision 22139)
+++ ompi/contrib/vt/vt/extlib/otf/configure.in	(working copy)
@@ -9,6 +9,9 @@
  AC_CONFIG_SRCDIR([config.h.in])
  AM_CONFIG_HEADER(config.h)
+# Open MPI: If Automake supports silent rules, enable them.
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
  # Checks for programs.
  AC_PROG_CXX
  AC_PROG_CC