[Pw_forum] Fatal Error: File 'mpif.h' not found.
Chao Cao
cao at qtp.ufl.edu
Wed Apr 25 07:49:45 CEST 2007
Hongyi Zhao wrote:
> On Wed, Apr 25, 2007 at 12:03:33AM -0400, Chao Cao wrote:
>
>> If you have mpif90, make sure in make.sys your FC is set to mpif90;
>>
>
> I've the followings and so many others alike:
>
> --------
> mpicc
> mpif77
> mpif77.lam
> mpif77.mpich
> mpif77.mpich-mpd
> mpif77.mpich-shmem
> mpif77.openmpi
> mpif90.openmpi
> --------
>
> According your advices, should I configure pwscf like this:
>
> ./configure FC=mpicc
>
> or
>
> ./configure FC=mpif90.openmpi
>
That depend on which MPI you are using. Find it out using "which mpirun"
and you can see the PATH to the MPI version you are actually running,
and your FC should be the one in that PATH.
Also, from what you said, it seems to me that the only reasonable
compiler is mpif90.openmpi since PWSCF is a fortran 90 code. Therefore I
would recommend you use
FC=mpif90.openmpi ./configure
Or, you could simply modify the make.sys file so that FC is set to
mpif90.openmpi in that file.
> In fact, in this way, I will meet the same error messages.
>
If this does not solve your problem, it probably is because of your
PATH/LD_LIBRARY_PATH environment variables. You may need to change them
so that the default MPI environment is openmpi. However, it's still
wierd. Put your result of "mpif90.openmpi -show"
>
>> otherwise issue "locate mpif.h" under console to find the path and then
>> add the path to your FFLAGS like -I/PATH/TO/THE/FILE.
>>
>
> I've mpif.h in many locations on my system, such as, /usr/include,
> /usr/lib/mpich/include/, but the *locate mpif.h* command give me
> nothing, why?
>
hmm, that's not your fault. I guess the system does not maintain a
indexdb, or the admin forgot to put updatedb in crontab?
> P.S. I have poor knowledge about mpi. In my case, my
> machine is just a standalone computer, not a member of a cluster, should
> I use mpi or not?
>
>
That means do not use MPI. MPI is for cluster only.
hehe, that solves everything.
BTW, you should put this last sentence in front of everything...:p
> Thanks in advance.
> ---
> Hongyi Zhao
> GnuPG DSA: 0xD108493B
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://www.democritos.it/mailman/listinfo/pw_forum
>
Best,
Chao Cao
More information about the users
mailing list