Re: [OMPI users] Regarding the execution time calculation

2012-05-09 Thread Jingcha Joba
True. I was curious as to what happens when I am time sharing the CPU.

--
Sent from my iPhone

On May 8, 2012, at 3:11 AM, TERRY DONTJE  wrote:

> On 5/7/2012 8:40 PM, Jeff Squyres (jsquyres) wrote:
>> 
>> On May 7, 2012, at 8:31 PM, Jingcha Joba wrote:
>> 
>>> So in the above stated example, end-start will be: >> took> + 20ms ?
>>>  
>>> (time slice of P2 + P3 = 20ms)
>> More or less (there's nonzero amount of time required for the kernel 
>> scheduler, and the time quantum for each of P2 and P3 is likely not 
>> *exactly* 10ms).  But you're over thinking this.  
>> 
>> The elapsed wall-clock time is simply (end-start).
>> 
> To kind of add to what Jeff is saying, the case you are describing sounds 
> like oversubscription.  If you really need to find the "pure" performance of 
> the code you should be running on a dedicated cluster otherwise you'll be 
> battling other issues in addition to timeslicing.  
> 
> -- 
> Terry D. Dontje | Principal Software Engineer
> Developer Tools Engineering | +1.781.442.2631
> Oracle - Performance Technologies
> 95 Network Drive, Burlington, MA 01803
> Email terry.don...@oracle.com
> 
> 
> 
> ___
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users


Re: [OMPI users] Regarding the execution time calculation

2012-05-08 Thread TERRY DONTJE

On 5/7/2012 8:40 PM, Jeff Squyres (jsquyres) wrote:

On May 7, 2012, at 8:31 PM, Jingcha Joba wrote:


So in the above stated example, end-start will be:  + 
20ms ?

(time slice of P2 + P3 = 20ms)

More or less (there's nonzero amount of time required for the kernel scheduler, 
and the time quantum for each of P2 and P3 is likely not *exactly* 10ms).  But 
you're over thinking this.

The elapsed wall-clock time is simply (end-start).

To kind of add to what Jeff is saying, the case you are describing 
sounds like oversubscription.  If you really need to find the "pure" 
performance of the code you should be running on a dedicated cluster 
otherwise you'll be battling other issues in addition to timeslicing.


--
Terry D. Dontje | Principal Software Engineer
Developer Tools Engineering | +1.781.442.2631
Oracle *- Performance Technologies*
95 Network Drive, Burlington, MA 01803
Email terry.don...@oracle.com 





Re: [OMPI users] Regarding the execution time calculation

2012-05-07 Thread Jingcha Joba
Jeff,
So in the above stated example, end-start will be:  + 20ms ?

(time slice of P2 + P3 = 20ms)


On Mon, May 7, 2012 at 1:42 PM, Jeff Squyres (jsquyres)
wrote:

> On May 7, 2012, at 2:39 PM, Jingcha Joba wrote:
>
> > OK.This explains that if a process gets "migrated" from one CPU to
> another, the time is not "affected". But it still doesn't explain if the
> process gets scheduled back to the same CPU.
>
> MPI_Wtime() doesn't tell you any of this stuff.  It just tells you the
> time *right now*.  Basically, MPI_Wtime() can be used to compute wall-clock
> timings (which are really the only relevant timings when measuring
> delivered performance, anyway).
>
> What happens before or after that is not covered in the scope of
> MPI_Wtime().
>
> --
> Jeff Squyres
> jsquy...@cisco.com
> For corporate legal information go to:
> http://www.cisco.com/web/about/doing_business/legal/cri/
>
>
> ___
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>


Re: [OMPI users] Regarding the execution time calculation

2012-05-07 Thread Jeff Squyres (jsquyres)
On May 7, 2012, at 2:39 PM, Jingcha Joba wrote:

> OK.This explains that if a process gets "migrated" from one CPU to another, 
> the time is not "affected". But it still doesn't explain if the process gets 
> scheduled back to the same CPU.

MPI_Wtime() doesn't tell you any of this stuff.  It just tells you the time 
*right now*.  Basically, MPI_Wtime() can be used to compute wall-clock timings 
(which are really the only relevant timings when measuring delivered 
performance, anyway).

What happens before or after that is not covered in the scope of MPI_Wtime().

-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/




Re: [OMPI users] Regarding the execution time calculation

2012-05-07 Thread Jingcha Joba
OK.This explains that if a process gets "migrated" from one CPU to another,
the time is not "affected". But it still doesn't explain if the process
gets scheduled back to the same CPU.

Just in case I have not explained my question clearly, let me explain it
from the schedular's perspective.
Lets assume that there are 3 processes, P1 an MPI process, P2 and P3 are
otehr active processes. Assume that the timeslice for each process is 10ms.

During the first time slice that P1 gets, it calls the MPI_Wtime(), stores
it in "start" variable and does half of the solver. Unfortunately, at this
ponit the timeslice of P1 got over, and the OS schedules P2 and P3 before
getting back to P1. So it takes 20ms, before P1 gets its share of CPU back,
at which point it completes the remaining half of the solver, and
calculated MPI_Wtime() and stores it in end. In short, it required two
timeslice for the MPI process to complete.

If the "wall clock" (a global counter) and there is no way for me to "save"
the value when the context switch occured from P1 to P2 and re-initialize
counting as soon as context switches from P3 back to P1, then it would
include the time spent by the process P2 and P3 as well (20ms in this case)
. 
PS: To keep it simple, I am not considering the preemption that might
happen due to an interrupt, or the overhead of context switching.


--
Joba
On Sat, May 5, 2012 at 9:04 AM, Eugene Loh  wrote:

> **
> MPI_Wtime() returns the elapsed time since some arbitrary time in the
> past.  It is a measure of "wallclock" time, not of CPU time or anything.
>
>
> On 5/4/2012 3:08 PM, Jingcha Joba wrote:
>
> Lets say I have a code like this
>
> start = MPI_Wtime()
> 
> stop = MPI_Wtime();
>
> What happens when right after start=MPI_Wtime(), the timeslice of the
> process ( from the operating system's perspective not the MPI process) is
> over, and the operating system schedules a next process, after saving the
> context switch, and eventually this application would resume, once its
> process is scheduled back by the os.
>
> Does MPI_Wtime() takes care of storing/updating the time when this
> happens?
>
> Of course, part of the answer lies in the implementation of Wtime.
>
>
>  On Fri, May 4, 2012 at 3:53 AM, Jeff Squyres  wrote:
>
>> On May 3, 2012, at 2:02 PM, Jingcha Joba wrote:
>>
>> > Not related to this question , but just curious, is Wtime context
>> switch safe ?
>>
>>  Not sure exactly what you're asking here...?
>>
>> --
>> Jeff Squyres
>> jsquy...@cisco.com
>> For corporate legal information go to:
>> http://www.cisco.com/web/about/doing_business/legal/cri/
>>
>>
>> ___
>> users mailing list
>> us...@open-mpi.org
>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>>
>
>
> ___
> users mailing 
> listusers@open-mpi.orghttp://www.open-mpi.org/mailman/listinfo.cgi/users
>
>
> ___
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>


Re: [OMPI users] Regarding the execution time calculation

2012-05-05 Thread Eugene Loh
MPI_Wtime() returns the elapsed time since some arbitrary time in the 
past.  It is a measure of "wallclock" time, not of CPU time or anything.


On 5/4/2012 3:08 PM, Jingcha Joba wrote:

Lets say I have a code like this
start = MPI_Wtime()

stop = MPI_Wtime();
What happens when right after start=MPI_Wtime(), the timeslice of the 
process ( from the operating system's perspective not the MPI 
process) is over, and the operating system schedules a next process, 
after saving the context switch, and eventually this application would 
resume, once its process is scheduled back by the os.
Does MPI_Wtime() takes care of storing/updating the time when this 
happens?

Of course, part of the answer lies in the implementation of Wtime.

On Fri, May 4, 2012 at 3:53 AM, Jeff Squyres > wrote:


On May 3, 2012, at 2:02 PM, Jingcha Joba wrote:

> Not related to this question , but just curious, is Wtime
context switch safe ?

Not sure exactly what you're asking here...?

--
Jeff Squyres
jsquy...@cisco.com 
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/


___
users mailing list
us...@open-mpi.org 
http://www.open-mpi.org/mailman/listinfo.cgi/users



___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users


Re: [OMPI users] Regarding the execution time calculation

2012-05-04 Thread Jingcha Joba
Lets say I have a code like this

start = MPI_Wtime()

stop = MPI_Wtime();

What happens when right after start=MPI_Wtime(), the timeslice of the
process ( from the operating system's perspective not the MPI process) is
over, and the operating system schedules a next process, after saving the
context switch, and eventually this application would resume, once its
process is scheduled back by the os.

Does MPI_Wtime() takes care of storing/updating the time when this happens?

Of course, part of the answer lies in the implementation of Wtime.


On Fri, May 4, 2012 at 3:53 AM, Jeff Squyres  wrote:

> On May 3, 2012, at 2:02 PM, Jingcha Joba wrote:
>
> > Not related to this question , but just curious, is Wtime context switch
> safe ?
>
> Not sure exactly what you're asking here...?
>
> --
> Jeff Squyres
> jsquy...@cisco.com
> For corporate legal information go to:
> http://www.cisco.com/web/about/doing_business/legal/cri/
>
>
> ___
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>


Re: [OMPI users] Regarding the execution time calculation

2012-05-04 Thread Jeff Squyres
A few nodes:

1. I think you posted an incorrect version of your code -- it's calling 
MPI_Test on an uninitialized request.

2. This looks like a homework problem.  I try very hard not to do peoples' 
homework.  :-)  My first comment to you stands: you need to be more 
fine-grained in your timing and figure out where the increase in time is coming 
from.  Here's another hint: compare the relative sizes of execution times of 
the different parts of your program and use that to deduce why your program is 
not scaling.

Good luck!



On May 4, 2012, at 7:44 AM, seshendra seshu wrote:

> Hi,
> I haven't used the more mpi process also but still am still unable to reduce 
> my exection time.Here is my code http://seshendramln.blogspot.se/  
> and please help me in solving.  
> In this code iam getting the same execution time in i increase or decrease 
> the no.of nodes.
> 
> thanking you
> 
> 
> With regards 
> seshendra
> 
> 
> On Fri, May 4, 2012 at 12:55 PM, Jeff Squyres  wrote:
> You probably need to be more fine-grained in your timing.  Find out exactly 
> what is increasing in time.  This is a common symptom for codes that do not 
> scale well -- i.e., adding more MPI processes actually causes it to slow down.
> 
> 
> On May 3, 2012, at 7:48 AM, seshendra seshu wrote:
> 
> > Hi,
> > I have written an parallel program and when i run my program on 4,8,16 
> > nodes and calculated the execution time at master using MPI_Wtime in master 
> > node. The problem the execution time is increasing rapidly like NON 
> > parallel program-55 sec, and for parallel program 2-nodes--60sec , 4-nodes 
> > 74sec, 8-node--120 sec and for 16 nodes---for 180 sec. can i know my 
> > problem in parallel version actually the time needs to be decreased but it 
> > is increasing i dont the reason. i have calculated my time as shown below
> >
> >
> > main(argv,argc)
> > {
> > double start,end;
> > start= MPI_Wtime;
> > // done some work
> > {
> > // start send from master node and receiving it
> > end =MPI_Wtime;
> > cout<<"execution time"< > }
> > //in slave nodes done some work
> >  MPI_Finalize;
> > }
> >
> > Please help me in solving this problem.
> >
> > --
> >  WITH REGARDS
> > M.L.N.Seshendra
> > ___
> > users mailing list
> > us...@open-mpi.org
> > http://www.open-mpi.org/mailman/listinfo.cgi/users
> 
> 
> --
> Jeff Squyres
> jsquy...@cisco.com
> For corporate legal information go to: 
> http://www.cisco.com/web/about/doing_business/legal/cri/
> 
> 
> ___
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users
> 
> 
> 
> -- 
>  WITH REGARDS
> M.L.N.Seshendra
> ___
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/




Re: [OMPI users] Regarding the execution time calculation

2012-05-04 Thread seshendra seshu
Hi,
I haven't used the more mpi process also but still am still unable to
reduce my exection time.Here is my code *http://seshendramln.blogspot.se/*
and please help me in solving.
In this code iam getting the same execution time in i increase or decrease
the no.of nodes.

thanking you


With regards
seshendra


On Fri, May 4, 2012 at 12:55 PM, Jeff Squyres  wrote:

> You probably need to be more fine-grained in your timing.  Find out
> exactly what is increasing in time.  This is a common symptom for codes
> that do not scale well -- i.e., adding more MPI processes actually causes
> it to slow down.
>
>
> On May 3, 2012, at 7:48 AM, seshendra seshu wrote:
>
> > Hi,
> > I have written an parallel program and when i run my program on 4,8,16
> nodes and calculated the execution time at master using MPI_Wtime in master
> node. The problem the execution time is increasing rapidly like NON
> parallel program-55 sec, and for parallel program 2-nodes--60sec , 4-nodes
> 74sec, 8-node--120 sec and for 16 nodes---for 180 sec. can i know my
> problem in parallel version actually the time needs to be decreased but it
> is increasing i dont the reason. i have calculated my time as shown below
> >
> >
> > main(argv,argc)
> > {
> > double start,end;
> > start= MPI_Wtime;
> > // done some work
> > {
> > // start send from master node and receiving it
> > end =MPI_Wtime;
> > cout<<"execution time"< > }
> > //in slave nodes done some work
> >  MPI_Finalize;
> > }
> >
> > Please help me in solving this problem.
> >
> > --
> >  WITH REGARDS
> > M.L.N.Seshendra
> > ___
> > users mailing list
> > us...@open-mpi.org
> > http://www.open-mpi.org/mailman/listinfo.cgi/users
>
>
> --
> Jeff Squyres
> jsquy...@cisco.com
> For corporate legal information go to:
> http://www.cisco.com/web/about/doing_business/legal/cri/
>
>
> ___
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>



-- 
 WITH REGARDS
M.L.N.Seshendra


Re: [OMPI users] Regarding the execution time calculation

2012-05-04 Thread Jeff Squyres
You probably need to be more fine-grained in your timing.  Find out exactly 
what is increasing in time.  This is a common symptom for codes that do not 
scale well -- i.e., adding more MPI processes actually causes it to slow down.


On May 3, 2012, at 7:48 AM, seshendra seshu wrote:

> Hi,
> I have written an parallel program and when i run my program on 4,8,16 nodes 
> and calculated the execution time at master using MPI_Wtime in master node. 
> The problem the execution time is increasing rapidly like NON parallel 
> program-55 sec, and for parallel program 2-nodes--60sec , 4-nodes 74sec, 
> 8-node--120 sec and for 16 nodes---for 180 sec. can i know my problem in 
> parallel version actually the time needs to be decreased but it is increasing 
> i dont the reason. i have calculated my time as shown below
> 
> 
> main(argv,argc)
> {
> double start,end;
> start= MPI_Wtime;
> // done some work
> {
> // start send from master node and receiving it
> end =MPI_Wtime;
> cout<<"execution time"< }
> //in slave nodes done some work
>  MPI_Finalize;
> }
> 
> Please help me in solving this problem.
> 
> -- 
>  WITH REGARDS
> M.L.N.Seshendra
> ___
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/




Re: [OMPI users] Regarding the execution time calculation

2012-05-04 Thread Jeff Squyres
On May 3, 2012, at 2:02 PM, Jingcha Joba wrote:

> Not related to this question , but just curious, is Wtime context switch safe 
> ?

Not sure exactly what you're asking here...?

-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/




Re: [OMPI users] Regarding the execution time calculation

2012-05-03 Thread Jingcha Joba
Not related to this question , but just curious, is Wtime context switch safe ?

--
Sent from my iPhone

On May 3, 2012, at 4:48 AM, seshendra seshu  wrote:

> Hi,
> I have written an parallel program and when i run my program on 4,8,16 nodes 
> and calculated the execution time at master using MPI_Wtime in master node. 
> The problem the execution time is increasing rapidly like NON parallel 
> program-55 sec, and for parallel program 2-nodes--60sec , 4-nodes 74sec, 
> 8-node--120 sec and for 16 nodes---for 180 sec. can i know my problem in 
> parallel version actually the time needs to be decreased but it is increasing 
> i dont the reason. i have calculated my time as shown below
> 
> 
> main(argv,argc)
> {
> double start,end;
> start= MPI_Wtime;
> // done some work
> {
> // start send from master node and receiving it
> end =MPI_Wtime;
> cout<<"execution time"< }
> //in slave nodes done some work
>  MPI_Finalize;
> }
> 
> Please help me in solving this problem.
> 
> -- 
>  WITH REGARDS
> M.L.N.Seshendra
> ___
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users



Re: [OMPI users] Regarding the execution time calculation

2012-05-03 Thread Björn Adlerborn
Hi, could you also attach your current code ?

 

Regards

Björn

 

From: users-boun...@open-mpi.org [mailto:users-boun...@open-mpi.org] On
Behalf Of seshendra seshu
Sent: den 3 maj 2012 13:49
To: Open MPI Users
Subject: [OMPI users] Regarding the execution time calculation

 

Hi,
I have written an parallel program and when i run my program on 4,8,16 nodes
and calculated the execution time at master using MPI_Wtime in master node.
The problem the execution time is increasing rapidly like NON parallel
program-55 sec, and for parallel program 2-nodes--60sec , 4-nodes 74sec,
8-node--120 sec and for 16 nodes---for 180 sec. can i know my problem in
parallel version actually the time needs to be decreased but it is
increasing i dont the reason. i have calculated my time as shown below


main(argv,argc)
{
double start,end;
start= MPI_Wtime;
// done some work
{
// start send from master node and receiving it
end =MPI_Wtime;
cout<<"execution time"<<end-start;
}
//in slave nodes done some work
 MPI_Finalize;
}

Please help me in solving this problem.

-- 
 WITH REGARDS
M.L.N.Seshendra



[OMPI users] Regarding the execution time calculation

2012-05-03 Thread seshendra seshu
Hi,
I have written an parallel program and when i run my program on 4,8,16
nodes and calculated the execution time at master using MPI_Wtime in master
node. The problem the execution time is increasing rapidly like NON
parallel program-55 sec, and for parallel program 2-nodes--60sec , 4-nodes
74sec, 8-node--120 sec and for 16 nodes---for 180 sec. can i know my
problem in parallel version actually the time needs to be decreased but it
is increasing i dont the reason. i have calculated my time as shown below


main(argv,argc)
{
double start,end;
start= MPI_Wtime;
// done some work
{
// start send from master node and receiving it
end =MPI_Wtime;
cout<<"execution time"<