Newsgroups: comp.parallel.mpi
From: smiller@intelsun.rus.uni-stuttgart.de (Shannon Miller)
Subject: Identifying -who- uses MPI on your system
Organization: Comp.Center (RUS), U of Stuttgart, FRG
Date: 4 Aug 1994 10:50:49 GMT
Message-ID: <31qh69$22sb@info2.rus.uni-stuttgart.de>

Our Paragon users are scattered among many different buildings and
even cities.  I wanted an easy way to see just -who- is playing
with MPI here.

To get an idea, I modified MPI_Init() to append a single line to
the file /usr/local/mpi/admin/usrlog whenever it is called by Node 0 of
an application.

The modification is simply to add two lines to the file
/usr/local/mpi/mpich/src/env/init.c in the MPI_Init routine.  After
the lines:

---
    if (MPIR_Has_been_initialized)
    return
        MPIR_ERROR( (MPI_Comm)0, MPI_ERR_INIT, "Can not MPI_INIT again" );
---

Add:

---
    if(mynode() == 0)
        system("echo $USER called MPI_Init at `date` >> \
/usr/local/mpi/admin/usrlog");
---

Admittedly this is a real hack - even the usrlog file must be world-
writeable - but it's simple enough to be added to future versions of
MPI (unless the developers add a hook for something like this) very
easily.

And now I can see who is using MPI and how often.

I'm open to hear better ways...

--Shannon

+--------------------------------------+
| Mr. Shannon Miller, Customer Support |
| Intel Supercomputer Systems Division +------------------------------+
| Regionales Rechenzentrum der         | smiller@rus.uni-stuttgart.de |
|   Universitaet Stuttgart             | or  smiller@ssd.intel.com    |
| Allmandring 30  (* Letters Only)     | Tel:  +49-711-678-8738       |
| 70550 Stuttgart, Germany             | FAX:  +49-711-678-8363       |
+--------------------------------------+------------------------------+
| * Freight:  Allmandring 3A, 70569 Stuttgart 80, Germany             |
+---------------------------------------------------------------------+

