[Darshan-users] Using darshan for non-MPI programs

Julian Kunkel juliankunkel at googlemail.com
Tue Jun 4 17:24:29 CDT 2013


Hi
With ld's wrap option I think you can provide a main() replacement which
calls (p)mpi_init() then the real main and (p)mpi_finalize() afterwards.

This way you only have to recompile POSIX apps wrapping against you
"darshaning" main method.

Regards
Julian

-- send with android. Sorry for typos.
Am 04.06.2013 19:03 schrieb "Michael Kluge" <michael.kluge at tu-dresden.de>:

> Hi Kevin,
>
> if I really want to use darshan for POSIX programs on single hosts, then
> it should be fairly easy to emulate the semantics of the MPI calls through
> a couple of pthread calls. It might even be possible to replace the few MPI
> funktions used in darshan with a generic abstraction layer and create an
> MPI and POSIX-only implementation of that layer. Just thinking ...
>
>
> Regards, Michael
>
> Am 04.06.2013 18:49, schrieb Kevin Harms:
>
>> Michael,
>>
>>    Darshan itself needs MPI. It uses some collective calls and file
>> routines when generating the log. The log is written when MPI_Finalize is
>> called. If you're going to modify your POSIX program, then it seems easier
>> to just instrument your main() with MPI_Init() and MPI_Finalize().
>>
>>    Using:
>>
>> void __attribute__ ((constructor)) PMPI_Init()
>>
>>    i think would work to initialize darshan, but you still need to call
>> PMPI_Finalize at some point to get the log.
>>
>> kevin
>>
>> On Jun 4, 2013, at 8:37 AM, Michael Kluge <michael.kluge at tu-dresden.de>
>> wrote:
>>
>>  Dear list,
>>>
>>> if I understand all the documentation well, darshan collects profiles of
>>> MPI programs only because it will initialize itself from a wrapper to
>>> MPI_Init(). Is this the only case, why pure POSIX programs (maybe
>>> multithreaded) would not work together with darshan?
>>>
>>> Is there any chance that an approach that uses
>>>
>>> void __attribute__ ((constructor)) my_lib_init()
>>> (see: http://gcc.gnu.org/onlinedocs/**gcc/Function-Attributes.html<http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html>
>>> )
>>>
>>> from gcc would work as well for pure POSIX programs?
>>>
>>>
>>> Regards, Michael
>>>
>>> --
>>> Dr.-Ing. Michael Kluge
>>>
>>> Technische Universität Dresden
>>> Center for Information Services and
>>> High Performance Computing (ZIH)
>>> D-01062 Dresden
>>> Germany
>>>
>>> Contact:
>>> Willersbau, Room WIL A 208
>>> Phone:  (+49) 351 463-34217
>>> Fax:    (+49) 351 463-37773
>>> e-mail: michael.kluge at tu-dresden.de
>>> WWW:    http://www.tu-dresden.de/zih
>>>
>>> ______________________________**_________________
>>> Darshan-users mailing list
>>> Darshan-users at lists.mcs.anl.**gov <Darshan-users at lists.mcs.anl.gov>
>>> https://lists.mcs.anl.gov/**mailman/listinfo/darshan-users<https://lists.mcs.anl.gov/mailman/listinfo/darshan-users>
>>>
>>
>>
> ______________________________**_________________
> Darshan-users mailing list
> Darshan-users at lists.mcs.anl.**gov <Darshan-users at lists.mcs.anl.gov>
> https://lists.mcs.anl.gov/**mailman/listinfo/darshan-users<https://lists.mcs.anl.gov/mailman/listinfo/darshan-users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-users/attachments/20130605/9cc016ec/attachment.html>


More information about the Darshan-users mailing list