|
[Sponsors] |
April 29, 2005, 10:04 |
MPICH for Windows (Fortran)
|
#1 |
Guest
Posts: n/a
|
Hello,
I have installed MPICH for Windows and tried to compile my first program. As I use Fortran, I have included the file mpif.h. I cannot call the routine MPI_INIT(). The compiler report that this routine is not defined. Effectively, MPI_INIT() does not appear in mpif.h, while its C prototype may be found in mpi.h. Has the distribution of mpif.h a known bug? Thanks in advance for your help. jojo |
|
April 29, 2005, 10:43 |
Re: MPICH for Windows (Fortran)
|
#2 |
Guest
Posts: n/a
|
Sounds like you're not linking to the correct libraries.
|
|
May 2, 2005, 10:54 |
Re: MPICH for Windows (Fortran)
|
#3 |
Guest
Posts: n/a
|
Thanks a lot for your answer.
In which library file is MPI_INIT? MPI appears very unclear for me. I do not really understand how it is organized. Thanks, Best Regards, jojo |
|
May 2, 2005, 12:31 |
Re: MPICH for Windows (Fortran)
|
#4 |
Guest
Posts: n/a
|
On my system it looks like libmpi.a. You can use the 'nm' command to search archives. Try 'nm "library name" | grep -i mpi_init ' to look at the archive "library name". If the object is in the archive and defined you should only see a line that begins with 'T' followed by the object name.
|
|
May 3, 2005, 10:10 |
Re: MPICH for Windows (Fortran)
|
#5 |
Guest
Posts: n/a
|
I have found libmpich.a. Unfortunately, I use Windows XP and cannot read libmpich.a but I assume it is OK as you mention.
This file is in MPICH\SDK.gcc\lib and my (simple) makefile is as follows: ================================================== = # Makefile toto: toto.o g77 -I"C:\Program Files\MPICH\SDK.gcc\include" -L"C:\Program Files\MPICH\SDK.gcc\lib" -lmpich -o toto toto.o toto.o: toto.f g77 -I"C:\Program Files\MPICH\SDK.gcc\include" -L"C:\Program Files\MPICH\SDK.gcc\lib" -lmpich -c toto.f ================================================== == This makefile does not lead to any error excepted the one I mentioned when I try to include MPI routines but I think it is wrong and this is my problem. Thanks a lot for your help. jojo |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fortran Compiler-CFX12.1 | Araz | CFX | 13 | March 27, 2017 06:37 |
distributed mpich problem | Trevor | CFX | 15 | January 9, 2007 18:08 |
visual fortran | Monica | Main CFD Forum | 1 | August 28, 2004 21:45 |
Intel Fortran (ifort 8) and MPICH | Goicox | Main CFD Forum | 4 | April 28, 2004 01:59 |
Fortran77 or Fortran 90 | Swapnil | CFX | 2 | November 26, 2002 16:16 |