Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] OpenMPI portability problems: debug info isn't helpful
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2008-10-18 08:46:52

On Oct 16, 2008, at 1:39 PM, Aleksej Saushev wrote:

> [asau.local:04648] opal_ifinit: ioctl(SIOCGIFFLAGS) failed with
> errno=6
> [snip]
> Why don't you use strerror(3) to print errno value explanation?

I don't know; whoever wrote that just chose not to there. Shrug.

>> From <sys/errno.h>:
> #define ENXIO 6 /* Device not configured */
> It seems that I have to debug network interface probing,
> how should I use *_output subroutines so that they do print?

opal_output(0, "...printf-like stuff here...", ...printf varargs...);

Should always output. Stream 0 is our "unconditional" stream; it goes
to stderr. You'll see opal_output(0) output from mpirun and MPI apps;
we usually close the stderr from orted's by default.

Make sure that you re-build and re-install OMPI properly or your
output won't show up. You can either do a top-level "make
install" (which might be lengthy, depending on the speed of your
system(s), and especially if you're iteratively editing opal/util/
if.c), or you can do the following:

cd top-ompi-src-dir
cd opal
make install-am

If you built OMPI with shared libraries, that should be sufficient to
recompile opal/util/if.c, rebuild, and re-install it.
Or, if you *really* want to streamline, you can do something like this:

cd top-ompi-src-dir
cd opal
cd util && make && cd .. && make install-am

And then repeat that last step as necessary (this is the kind of thing
I do when I am editing a single .c file in one of OMPI's libs).

Jeff Squyres
Cisco Systems