CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

MPICH for Windows (Fortran)

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 29, 2005, 09:04
Default MPICH for Windows (Fortran)
  #1
jojo
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
  Reply With Quote

Old   April 29, 2005, 09:43
Default Re: MPICH for Windows (Fortran)
  #2
ag
Guest
 
Posts: n/a
Sounds like you're not linking to the correct libraries.
  Reply With Quote

Old   May 2, 2005, 09:54
Default Re: MPICH for Windows (Fortran)
  #3
jojo
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
  Reply With Quote

Old   May 2, 2005, 11:31
Default Re: MPICH for Windows (Fortran)
  #4
ag
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.
  Reply With Quote

Old   May 3, 2005, 09:10
Default Re: MPICH for Windows (Fortran)
  #5
jojo
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

  Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fortran Compiler-CFX12.1 Araz CFX 12 November 2, 2014 13:46
distributed mpich problem Trevor CFX 15 January 9, 2007 18:08
visual fortran Monica Main CFD Forum 1 August 28, 2004 20:45
Intel Fortran (ifort 8) and MPICH Goicox Main CFD Forum 4 April 28, 2004 00:59
Fortran77 or Fortran 90 Swapnil CFX 2 November 26, 2002 16:16


All times are GMT -4. The time now is 12:50.