On 13 August 2010 05:22, Matthias Jurenz <matthias.jur...@tu-dresden.de> wrote:
> On Wednesday 11 August 2010 23:16:50 Lisandro Dalcin wrote:
>> On 11 August 2010 03:12, Matthias Jurenz <matthias.jur...@tu-dresden.de>
> wrote:
>> > Hello Lisandro,
>> >
>> > this problem will be fixed in the next Open MPI release. There was an
>> > obsolete preprocessor condition around the MPI_Init_thread wrapper, so
>> > the source code could never be compiled :-(
>> >
>> > Thanks for the hint.
>> >
>> > Matthias
>>
>> OK. Many thanks for you clarification.
>>
>> BTW, I have and additional issue. I'm trying to build as shared
>> library from libvt*.a using by passing -whole-archive to the linker.
>> The idea behind this is to use that library with LD_PRELOAD to get MPI
>> tracing of a binary compiled with plain mpicc (i.e, not mpicc-vt). For
>> example, I managed to get this trick working with MPE. Moreover, I can
>> enable MPI profiling at runtime in a Python script using mpi4pt by
>> dlopen'ing the shared lib with profiling symbols before loading the
>> mpi4py.MPI Python extension module. Being able to profile without a
>> recompile is nice ;-)
>>
>> However, see this:
>>
>> $ pwd
>> /usr/local/openmpi/1.4.2/lib
>>
>> $ ll libvt*
>> -rw-r--r--. 1 root root 410784 2010-05-05 20:40 libvt.a
>> -rw-r--r--. 1 root root 197618 2010-05-05 20:40 libvt.fmpi.a
>> -rw-r--r--. 1 root root 569128 2010-05-05 20:40 libvt.mpi.a
>> -rw-r--r--. 1 root root 503514 2010-05-05 20:40 libvt.omp.a
>> -rw-r--r--. 1 root root 661466 2010-05-05 20:40 libvt.ompi.a
>>
>> $ nm libvt* | grep pomp_rd_table
>>          U pomp_rd_table
>>          U pomp_rd_table
>>          U pomp_rd_table
>>          U pomp_rd_table
>>          U pomp_rd_table
>>          U pomp_rd_table
>>          U pomp_rd_table
>>          U pomp_rd_table
>>          U pomp_rd_table
>>          U pomp_rd_table
>>
>> That symbol (and possibly others) are undefined and I cannot found
>> them elsewhere. Is there any easy way to build a shared lib with the
>> MPI_xxx symbols?
>>
>
> Actually, the symbols above will be defined at compile/link time of the
> application by the OpenMP instrumentor "OPARI".
> However, while your application doesn't use OpenMP it should work to define 
> the
> missing symbols in a separate source file (see attachment) when building the
> shared library:
>
> gcc -fPIC -I<mpi-includedir>/vampirtrace -shared missing_syms.c -o
> libvt.mpi.so -Wl,--whole-archive <mpi-libdir>/libvt.mpi.a <mpi-
> libdir>/libotf.a -Wl,--no-whole-archive -ldl -lz -L<mpi-libdir> -lmpi
>

OK. Many thanks for the hint.

I was able to build a shared lib, dlopen() it at runtime and get MPI
traces from Python scripts without need of recompiles with mpicc-vt.
Sweet!

> FYI, the next Open MPI 1.5 will come with a newer VampirTrace which provides
> shared libraries by default.
>

Nice! ... Perhaps Open MPI mpiexec's could gain a -vt flag to enable
traces at runtime (should be easy to implement with LD_PRELOAD,
right?)...

BTW, I understand Open MPI 1.5 VT will have the MPI_Init_thread()
issue fixed. Any chance for v1.4 series?


-- 
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169

Reply via email to