Are you absolutely sure that you're using the latest LAM/MPI SVN
snapshot?
-----
[11:32] queeg:~/mpi % laminfo -version lam full
LAM/MPI: 7.2b1svn10044
[11:32] queeg:~/mpi % mpicc string.c -o string
[11:33] queeg:~/mpi % mpirun -np 1 string << EOF
? foo
? bar
? baz
? EOF
MCW rank 0 got string: foo
MCW rank 0 got string: bar
MCW rank 0 got string: baz
EOF detected -- goodbye!
[11:33] queeg:~/mpi %
-----
As I mentioned in a previous mail, the stdin redirection is broken in
7.1 and 7.1.1. The latest SVN snapshot (which will eventually become
7.1.2) has the fixes for stdin redirection.
On Feb 9, 2005, at 11:16 AM, Eiso AB wrote:
> Jeff Squyres wrote:
>> On Feb 9, 2005, at 9:17 AM, Eiso AB wrote:
>>> I installed the svn tarball, compiled using FC=ifort (intel-8.0)
>>> then recompiled cyana using the new mpif77, and tried again.
>>> Alas it still gives me the cyana prompt instead of executing
>>> the commands from erract to EOF
>>>
>>> this is the script I'm trying to run
>>> ===================================
>>> #!/bin/sh
>>> cd /home/eiso/BUG
>>> date +'%d-%b-%Y %H:%M:%S'
>>> lamboot -v $NODEFILE
>>> cyana -t intel-lam -c 'mpirun -x CYANALIB -np 5' << EOF
>> I'm afraid that I don't know anything about cyana. I can tell you
>> that all LAM does is redirect the stdin of mpirun, not of your cyana
>> program. So your <<EOF stuff should work properly to the top-level
>> cyana application, as far as I can tell (but not necessarily to
>> mpirun).
>> But then again, cyana could be doing some odd things with its stdin;
>> I really have no idea what it is *supposed* to do when you <<EOF
>> things to it...?
>> You can test the basic functionality of the stdin redirection in LAM
>> with the following simple program:
>> -----
>> #include <stdio.h>
>> #include <mpi.h>
>> int main(int argc, char* argv[])
>> {
>> int rank;
>> char str[BUFSIZ];
>> MPI_Init(NULL, NULL);
>> MPI_Comm_rank(MPI_COMM_WORLD, &rank);
>> if (0 == rank) {
>> while (fgets(str, BUFSIZ, stdin)) {
>> printf("MCW rank 0 got string: %s", str);
>> }
>> printf("EOF detected -- goodbye!\n");
>> }
>> MPI_Barrier(MPI_COMM_WORLD);
>> MPI_Finalize();
>> return 0;
>> }
>> -----
>> [9:41] queeg:~/mpi % mpirun -np 1 ./string << EOF
>> ? foo
>> ? bar
>> ? baz
>> ? EOF
>> MCW rank 0 got string: foo
>> MCW rank 0 got string: bar
>> MCW rank 0 got string: baz
>> EOF detected -- goodbye!
>> [9:41] queeg:~/mpi %
>> -----
>
> ok, I get :
>
> eiso_at_ant18> mpirun -np 1 ./string << EOF
> ? foo
> ? bar
> ? baz
> ? EOF # nothing happens after return
> # return
> MCW rank 0 got string:
> # return
> MCW rank 0 got string:
> # return
> MCW rank 0 got string:
>
>
> I guess it could be the same problem.
>
> Eiso
>
>
>
>
>
> --
> _________
> _________________/ Eiso AB \___________________________
>
> o
>
> o Dept. of NMR Spectroscopy
> Bijvoet Center for Biomol. Research
> Utrecht University
> o Padualaan 8, 3584 CH Utrecht
> . . The Netherlands
> o ^
> | - _ eiso_at_[hidden]
> \__|__/
> | http://www.nmr.chem.uu.nl/~eiso
> | tel: +31-30-2539929
> / \
> / \
> | |
> ___ ._| |_. _________________________________________
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>
--
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/
|