Re: [OMPI users] Problems in 4.0.1 version and printf function
I installed MPICH and it was working normally. So I recompile OpenMPI and reinstall it, and it works. I had some problems with environment variables and I also solve it.] Now it is working perfectly. Well, Thanks for the support! Nilton. Em qui, 9 de mai de 2019 às 11:35, Jeff Squyres (jsquyres) < jsquy...@cisco.com> escreveu: > Stdout forwarding should continue to work in v4.0.x just like it did in > v3.0.x. I.e., printf's from your app should appear in the stdout of mpirun. > > Sometimes they can get buffered, however, such as if you redirect the > stdout to a file or to a pipe. Such shell buffering may only emit output > when it sees \n's, or a buffer-full at a time (e.g., 4K?). > > For example (typed directly in my mail client -- YMMV): > > --- > $ cat foo.c > #include > int main(int args, char* argv[]) { > MPI_Init(NULL, NULL); > printf("Hello, world\n"); > sleep(60); > MPI_Finalize(); > Return 0; > } > $ mpicc foo.c -o foo > $ mpirun -np 1 foo > Hello, world > <...waits 60 seconds...> > $ mpirun -np 1 foo | tee out.txt > <...waits 60 seconds> > Hello, world > $ > --- > > The latter run may not emit anything for 60 seconds because the single > line of "Hello, world" may not have been an entire buffer-full, so the pipe > chose not to emit it until a) it fills its buffer, or b) the program > completes. > > Buffering like that depends very much on how the buffering is implemented > (e.g., by the shell). So it may be outside of Open MPI's control. > > > > On May 8, 2019, at 9:02 PM, Nilton Luiz Queiroz Junior via users < > users@lists.open-mpi.org> wrote: > > > > I had upgraded my MPI from 3.0.0 to 4.0.1 version, so when I compile > (with mpicc) and run (with mpirun) any .c source file that uses printf > function from stdio, i dont get the print results in stdout. Does anyone > knows what it can be? > > > > I'm very thankful for your attention. > > > > Nilton. > > ___ > > users mailing list > > users@lists.open-mpi.org > > https://lists.open-mpi.org/mailman/listinfo/users > > > -- > Jeff Squyres > jsquy...@cisco.com > > ___ users mailing list users@lists.open-mpi.org https://lists.open-mpi.org/mailman/listinfo/users
Re: [OMPI users] Problems in 4.0.1 version and printf function
Stdout forwarding should continue to work in v4.0.x just like it did in v3.0.x. I.e., printf's from your app should appear in the stdout of mpirun. Sometimes they can get buffered, however, such as if you redirect the stdout to a file or to a pipe. Such shell buffering may only emit output when it sees \n's, or a buffer-full at a time (e.g., 4K?). For example (typed directly in my mail client -- YMMV): --- $ cat foo.c #include int main(int args, char* argv[]) { MPI_Init(NULL, NULL); printf("Hello, world\n"); sleep(60); MPI_Finalize(); Return 0; } $ mpicc foo.c -o foo $ mpirun -np 1 foo Hello, world <...waits 60 seconds...> $ mpirun -np 1 foo | tee out.txt <...waits 60 seconds> Hello, world $ --- The latter run may not emit anything for 60 seconds because the single line of "Hello, world" may not have been an entire buffer-full, so the pipe chose not to emit it until a) it fills its buffer, or b) the program completes. Buffering like that depends very much on how the buffering is implemented (e.g., by the shell). So it may be outside of Open MPI's control. > On May 8, 2019, at 9:02 PM, Nilton Luiz Queiroz Junior via users > wrote: > > I had upgraded my MPI from 3.0.0 to 4.0.1 version, so when I compile (with > mpicc) and run (with mpirun) any .c source file that uses printf function > from stdio, i dont get the print results in stdout. Does anyone knows what it > can be? > > I'm very thankful for your attention. > > Nilton. > ___ > users mailing list > users@lists.open-mpi.org > https://lists.open-mpi.org/mailman/listinfo/users -- Jeff Squyres jsquy...@cisco.com ___ users mailing list users@lists.open-mpi.org https://lists.open-mpi.org/mailman/listinfo/users
[OMPI users] Problems in 4.0.1 version and printf function
I had upgraded my MPI from 3.0.0 to 4.0.1 version, so when I compile (with mpicc) and run (with mpirun) any .c source file that uses printf function from stdio, i dont get the print results in stdout. Does anyone knows what it can be? I'm very thankful for your attention. Nilton. ___ users mailing list users@lists.open-mpi.org https://lists.open-mpi.org/mailman/listinfo/users