Hi, Brian,
Things are as exactly as your wild guess. I did have a very old version
of mpif.h under my project directory. I never noticed it was there. I
must copied it very long time ago. Everything is fine now.
Thank you very much for your help.
Zhang
On Wed, 2005-03-30 at 09:27 -0500, Brian Barrett wrote:
> On Mar 30, 2005, at 12:11 AM, Yeliang Zhang wrote:
>
> > This program runs fine under any directory other than my project
> > directory.
> >
> > As long as it is run under my project directory, no matter the
> > executable is generated by simple mpif77 or make file, there will be
> > error:
>
> When you say it runs fine under any directory other than your project
> directory, are you compiling outside of your project directory as well?
> Or copying the binary around? Or giving a full (or relative) path
> into your project directory?
>
> There really isn't enough information in your e-mail for me to figure
> out what is going on. But if I were to make a wild guess, I think you
> are using the wrong mpif.h to compile your application when you compile
> in your project directory, but use the right version when you compile
> anywhere else.
>
> We see this every now and then with Fortran programs (not so much with
> C programs - they will usually fail to link). Someone will copy
> MPICH's mpif.h into the project directory, then try to compile with LAM
> and it all goes downhill from there. If there is an mpif.h in your
> project directory, delete it and see if that helps.
>
> Brian
>
|