Open MPI logo

MTT Devel Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all MTT Users mailing list

Subject: [MTT users] LD_LIBRARY_PATH setting in masks a wrapper compiler issue
From: Ethan Mallove (ethan.mallove_at_[hidden])
Date: 2008-05-05 14:47:23

Line 386 of MTT/Test/ sets LD_LIBRARY_PATH. This
appears to have masked a problem in my wrapper compiler
(missing -R/foo/lib flags).

    if ($mpi_install->{libdir}) {
        if (exists($ENV{LD_LIBRARY_PATH})) {
            $ENV{LD_LIBRARY_PATH} = "$mpi_install->{libdir}:" .
        } else {
            $ENV{LD_LIBRARY_PATH} = $mpi_install->{libdir};

Is the rationale for setting LD_LIBRARY_PATH for the
mpirun's the same as the rationale described below (from

    my %ENV_SAVE = %ENV;
    $ENV{TMPDIR} = "$config->{installdir}/tmp";
    mkdir($ENV{TMPDIR}, 0777);
    # The intent here is just to ensure that the LD_LIBRARY_PATH
    # in the environment does not point to shared libraries
    # outside of MTT's scope that would interfere with "make
    # check" (e.g., another outside of MTT). Just
    # prepend our own $libdir to LD_LIBRARY_PATH and hope that
    # that's Good Enough. :-)
    if (exists($ENV{LD_LIBRARY_PATH})) {
        $ENV{LD_LIBRARY_PATH} = "$config->{libdir}:$ENV{LD_LIBRARY_PATH}";
    } else {
        $ENV{LD_LIBRARY_PATH} = "$config->{libdir}";

If so, could we make MTT a little smarter. E.g., actually
check for a (and/or other possibly conflicting
DSOs), and if there's no conflict then skip the
LD_LIBRARY_PATH setting. (This way a wrapper compiler issue
is not masked.)