<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi ,
<br>
<br>
I am trying to use MPI profiling to make mpi_init from a F77 program call my MPI_Init (written in C), but I do not manage to achieve that. In this simple F77 program:<br>
       program main<br>
       include  'mpif.h'      <br>
       integer error<br>
       call mpi_init(error)<br>
       call mpi_finalize(error)<br>
       end<br>
<br>
I try to make the mpi_init  call: <br>
int MPI_Init (int *argc, char ***argv){  int ret;<br>
  printf("My function!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");<br>
  ret = PMPI_Init(argc, argv);<br>
  return ret;<br>
}<br>
<br>
My MPI_Init belongs to a library libtarget.a I created. I use -profile for compiling and I created the target.conf containing:<br>
PROFILE_PRELIB="-L/homes/fisaila/benches/try/staticlib_mpif77 -ltarget" <br>
in the right place. <br>
<br>
The library appears in the command line  before the mpich library: <br>
mpif77 -show -g -profile=target init_finalize.f -o init_finalize<br>
gfortran -g init_finalize.f -o init_finalize -I/homes/fisaila/software/mpich/include -L/homes/fisaila/software/mpich/lib -L/homes/fisaila/benches/try/staticlib_mpif77 -ltarget -Wl,-rpath -Wl,/homes/fisaila/software/mpich/lib -lmpich -lopa -lmpl -lrt -lpthread<br>
<br>
However, the program never gets into my MPI_Init. <br>
<br>
Any suggestion about what I am missing?<br>
<br>
Thanks<br>
Florin<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</div>
</body>
</html>