Hi Anthony,<br>I'm sorry, in this case I have to disagree with you.<br>Because it is not max(t1,t2) but t1+t2 (this is the real result I got)<br>I use fflush(stdout) also<br><br>What I think is that, Cluster runs two programmes alternatively.<br>
i.e. Process A runs for a while (say t3 seconds) then process B for sometime and so on.<br>Therefore, ultimately both the processes will run for t1+t2<br><br>Cluster: MPICH2<br>Fedora 8<br><br><div class="gmail_quote">2008/11/26 Anthony Chan <span dir="ltr"><<a href="mailto:chan@mcs.anl.gov">chan@mcs.anl.gov</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
If process A and B are launched by mpiexec, the time taken<br>
by mpiexec should be max(t1,t2) not t1 + t2. As Rajeev said,<br>
calling fflush(stdout) after each printf() is the fastest way<br>
to get each process's stdout printed to your console.<br>
<br>
A.Chan<br>
<div><div></div><div class="Wj3C7c">----- "Waruna Ranasinghe" <<a href="mailto:warunapww@gmail.com">warunapww@gmail.com</a>> wrote:<br>
<br>
> Hi Rajeev,<br>
> Actually this is not what I'm talking about.<br>
> Say there are processes A and B<br>
> Process A utilize 100% of the cpu while it runs. The answer will<br>
> appear in<br>
> t1 seconds<br>
> Process B also utilize 100% of the cpu while it runs. The answer will<br>
> appear<br>
> in t2 seconds<br>
><br>
> When I run both the process A and B at the same time, The both answers<br>
> will<br>
> appear in t1 + t2 seconds. where as I want to get the Process A's<br>
> answer<br>
> first. (Here Process A is submitted before Process B)<br>
><br>
> Is there anything that I can do to make this happen.<br>
><br>
> Thank You,<br>
> Waruna<br>
><br>
> 2008/11/26 Rajeev Thakur <<a href="mailto:thakur@mcs.anl.gov">thakur@mcs.anl.gov</a>><br>
><br>
> > If you are refering to the output of "printf", you can try adding<br>
> an<br>
> > fflush(stdout) after the printf. You don't have much control over<br>
> the order<br>
> > in which it is printed from different processes.<br>
> ><br>
> > Rajeev<br>
> ><br>
> > ------------------------------<br>
> > *From:* <a href="mailto:mpich-discuss-bounces@mcs.anl.gov">mpich-discuss-bounces@mcs.anl.gov</a> [mailto:<br>
> > <a href="mailto:mpich-discuss-bounces@mcs.anl.gov">mpich-discuss-bounces@mcs.anl.gov</a>] *On Behalf Of *Waruna Ranasinghe<br>
> > *Sent:* Tuesday, November 25, 2008 1:35 AM<br>
> > *To:* <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
> > *Subject:* [mpich-discuss] Clarification needed on running processes<br>
> on<br>
> > MPICH2<br>
> ><br>
> > Hi all,<br>
> > I submitted 3 processes at the same time using mpiexec. the results<br>
> of each<br>
> > process appears only after all the processes have finished. (I guess<br>
> that<br>
> > the way mpich schedule it).<br>
> > What if I want to get the result of the process, which was submitted<br>
> first,<br>
> > first. (like first in first out).<br>
> ><br>
> > I use MPICH2 cluster in Fedora 8 (with mpd)<br>
> ><br>
> > Thank you.<br>
> > Waruna Ranasinghe<br>
> ><br>
> ><br>
</div></div></blockquote></div><br>