LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Qiang Xu (qxu2_at_[hidden])
Date: 2005-12-05 12:31:54


Hi,

I write a profiling lib (libmyprof.a)with PMPI, and use it to profile the NAS bechmark (NPB2.3).

For IS which is in C, everything works fine. Just recompile it with -lmyprof, and I could get the profile.

But for other bechmarks, which is in Fortran. I could not link with my profiling lib (libmyprof.a) even I
use the -lmyprof option during compilation.

And I figure out two methods to make it work.

1. Just write a dummy function in my libmyprof.a say
int sample
{
   return 0
}

and write a "interface" fortan file which just call this function. then compile this "interface" fortran file with those fortran bechmark.

This time my profiling lib is linked with the bechmarks.

2. It is the problem of fortran call c function, because PMPI is written in C.
So I just write a "interface" file in C, someone say I need to wrap all the function in the profiling lib this way, but seems to me one function
the MPI_init_ is good enough.

int MPI_Init_( argc, argv )
int * argc;
char *** argv;
{
  MPI_Init(argc, argv);
}
 
My question is that those method seems a little bit awkward, anyone could give me a decent solution?

Thanks.

Qiang