I have seen strange things about fortran compilers and the suffix of files.

use mpi

is a fortran 90 thing, not 77, many compilers want fortran 90 codes to end in .f90 or .F90

Try renaming carfoo.f  to cartfoo.f90  and try again.

I have attached a helloworld.f90 that uses use mpi that works on our openmpi installs.

Attachment: helloworld.f90
Description: Binary data



Brock Palen
www.umich.edu/~brockp
Center for Advanced Computing
bro...@umich.edu
(734)936-1985



On Jul 30, 2008, at 4:15 PM, Scott Beardsley wrote:
Brock Palen wrote:
On all MPI's I have always used there was only MPI
use mpi;

Please excuse my admittedly gross ignorance of all things Fortran but why does "include 'mpif.h'" work but "use mpi" does not? When I try the "use mpi" method I get errors like:

$ mpif90 -c cart.f

      call mpi_cart_get(   igcomm,2,ivdimx,lvperx, mygrid,       ierr)
           ^
pathf95-389 pathf90: ERROR CART, File = cart.f, Line = 34, Column = 12
No specific match can be found for the generic subprogram call "MPI_CART_GET"

$ mpif90 -c cartfoo.f
$ diff cart.f cartfoo.f
3,4c3,4
< C     include 'mpif.h'
<       use mpi;
---
>       include 'mpif.h'
> C      use mpi;
$

From the googling I've done it seems like "use mpi" is preferred [1]. I've made sure that my $LD_LIBRARY_PATH has the directory that MPI.mod is in.

Scott
--------
[1] http://www.mpi-forum.org/docs/mpi-20-html/node243.htm
_______________________________________________
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users



Reply via email to