Issue Details (XML | Word | Printable)

Key: GANT-114
Type: Bug Bug
Status: Open Open
Priority: Critical Critical
Assignee: Unassigned
Reporter: Russel Winder
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Gant

Gant causes disruption to parallel execution

Created: 07/Dec/09 09:13 AM   Updated: 08/Dec/09 04:23 AM
Component/s: None
Affects Version/s: 1.8.0
Fix Version/s: 1.10.0

Time Tracking:
Not Specified

Environment: Ubuntu 9.10 Karmic Koala, OpenJDK, Groovy Trunk 2009-12-07, Gant Trunk 2009-12-07, twin quad-core.


 Description  « Hide

The Groovy script:

evaluate ( ( new File ( 'aFunction.groovy' ) ).text )

//target ( 'default' : '' ) {
  startTime = System.nanoTime ( )
  def threads = [ ]
  for ( i in 0 ..< repeatCount ) {
    thread = new Thread ( aFunction )
    threads << thread
    thread.start ( )
  }
  for ( thread in threads ) { thread.join ( ) }
  elapseTime = ( System.nanoTime ( ) - startTime ) / 1E9
  println ( 'Elapse time = ' + elapseTime ) 
  //}

executes as expected using all 8 cores. Removing the comment bigraphs from the two commented lines and executing the script as a Gant script leads to the binding of thread to core to be lost, and for there to be an effective sequentialization of the execution due to thrashing of the threads scheduling.

evaluate ( ( new File ( 'aFunction.groovy' ) ).text )

target ( 'default' : '' ) {
  startTime = System.nanoTime ( )
  def threads = [ ]
  for ( i in 0 ..< repeatCount ) {
    thread = new Thread ( aFunction )
    threads << thread
    thread.start ( )
  }
  for ( thread in threads ) { thread.join ( ) }
  elapseTime = ( System.nanoTime ( ) - startTime ) / 1E9
  println ( 'Elapse time = ' + elapseTime ) 
}


There are no comments yet on this issue.