LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2004-10-06 13:53:18


Looks like we goofed -- stdin redirection was accidentally disabled on
platforms that supported file descriptor passing while we were working
towards cygwin compatability (cygwin does not support fd passing, and
therefore stdin for the lowest ranking process does not get stdin).

7.1.2b3 fixes this problem -- I just released it on
http://www.lam-mpi.org/beta/.

Could you give it a whirl?

On Oct 5, 2004, at 5:29 AM, Carlo Carloni Calame wrote:

> Dear Pierre,
>
> yes, I think it's a lam-mpi 7.1 (and 7.1.1) problem. With previous
> versions, redirection worked fine. As you suggest, I'll try with a
> simple C code...
>
> Carlo
>
> On Tue, 2004-10-05 at 10:51, Pierre Valiron wrote:
>> Dear Carlo,
>>
>> I see nothing wrong in your your not-so-silly code.
>>
>> I tried it on my pc (LAM 7.0.4 + Intel Fortran) and redirection works
>> nicely (as it should). I added
>> write(6,*) a
>> before the MPI_finalize and I get:
>>
>> $ mpirun -np 2 a.out < 1.dat
>> 0.00000000000000D+000 (unitialized for proc 1)
>> 3.00000000000000 (correct for proc 0)
>>
>> while 1.dat contains the number 3.
>>
>> The obvious conclusion is that the input redirect is broken on lam
>> 7.1.1,
>> at least for Forttran users.
>>
>> May be a similar test should be carried on in C (I am too old to learn
>> this strange language) to get a further hint about the problem.
>>
>> Pierre.
>>
>>
>>
>> On Tue, 5 Oct 2004, Carlo Carloni Calame wrote:
>>
>>> Dear lam-mpi users and developers,
>>>
>>> I have some problems when running a program with mpirun and reading
>>> standard input from a file. If I compile the following silly fortran
>>> code
>>>
>>> program read_variable
>>> implicit double precision (a-h,o-z)
>>> include 'mpif.h'
>>>
>>> call MPI_init(ie)
>>> call MPI_comm_rank(MPI_COMM_WORLD,myid,ie)
>>>
>>> if (myid.eq.0) read*,a
>>>
>>> call MPI_finalize(ie)
>>> stop
>>> end
>>>
>>> with the command mpif77 "mpif77 sillycode.f -o sillycode" and I give
>>> the
>>> commands
>>>
>>> echo 1 > inputfile
>>> mpirun -np 2 ./sillycode < inputfile
>>>
>>> the program still waits reading from the terminal. If I understand
>>> correctly in the mpirun man page, such a redirection can be done.
>>> I booted lam-mpi with the command "lamboot -v lamhosts", where the
>>> file
>>> lamhosts contains this line "mycomputer cpu=2".
>>
>
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>

-- 
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/