[Beowulf] MPI Fortran I/O Issues

Geoff Jacobs gdjacobs at gmail.com
Mon Dec 12 21:55:18 EST 2005


Timo R. Mechler wrote:

> Hi all,
>
> I have written a simple Fortran program with MPI that prompts the user
> for input values.  Now the code is sound and compiles with mpif77,
> however when I go to execute it with mpirun, I always get the
> following error:
>
> list in: end of file
> apparent state: unit 5 (unnamed)
> last format: list io
> lately reading direct formatted external IO
>
>
> The cluster I'm using this on is a 6x Dual 750mhz, 512mb ram, running
> Rocks 3.3.0
>
> Any ideas as to why I might be getting this error? MPI code that
> doesn't ask for user input (i.e. "hardwired" values) seems to run just
> fine on the cluster. Thanks in advance for the help.
>
> Best Regards,
>
> -Timo Mechler
>
>
>
>
> _______________________________________________
> Beowulf mailing list, Beowulf at beowulf.org
> To change your subscription (digest mode or unsubscribe) visit
> http://www.beowulf.org/mailman/listinfo/beowulf
>
      program testinput
      character*20 name
      write (*,'(a25)'),"Please enter your name: "
      read *,name
      write (*,'(a6,a20)'),"Hello ",name
      stop
      end

lorien:[~/ftest]$ mpif77 -Wall ftest.f

lorien:[~/ftest]$ mpirun -np 2 ./a.out
 Please enter your name: 
At line 4 of file ftest.f
Fortran runtime error: End of file
Me
STOP 0 Please enter your name: 
Hello Me

The executable(s) do not run properly because they cannot execute an interactive command (console input) from a non-interactive session (headless ssh or rsh). Logical unit 5 is, of course, STDIN.

You often have a process capable of interaction running on the "head" node (rank=0). Notice how, in my example, one process accepted input, while the other did not. The data must be passed from the interactive process to whichever other process(es) need it.

Here is the best resource that I've found for introductory information on MPI calls.
http://www.tacc.utexas.edu/services/userguides/mpi/

It is correct, simple, and well organized.

Beyond that, google is your friend. I suggest "MPI tutorial" be your first search terms.

My last advice is to play around a bit. Make a few simple examples to familiarize yourself with the way things work before you make an application of substantial size.

-- 
Geoffrey D. Jacobs
MORE CORE AVAILABLE, BUT NONE FOR YOU.

_______________________________________________
Beowulf mailing list, Beowulf at beowulf.org
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf



More information about the Beowulf mailing list